Skip to content

Saleor Core: the high performance, composable, headless commerce API.

Improve registration forms styles

Paweł Kowalewski13cf36d8fbb0
diff --git a/saleor/registration/templates/registration/change_password.html b/saleor/registration/templates/registration/change_password.html
index f167ee460c..5266cac2f9 100644
--- a/saleor/registration/templates/registration/change_password.html
+++ b/saleor/registration/templates/registration/change_password.html
@@ -1,6 +1,6 @@
{% extends "base.html" %}
{% load i18n %}
-{% load as_horizontal_form from bootstrap %}
+{% load as_vertical_form from bootstrap %}
{% block title %}{% trans "Change password" %}{% endblock %}
@@ -11,20 +11,26 @@
{% endblock breadcrumb %}
{% block content %}
-<form method="post" class="form-horizontal">
- {% csrf_token %}
- <fieldset>
- <legend>{% trans 'Change password' %}</legend>
- {{ form|as_horizontal_form }}
- <input type="hidden" name="next" value="{{ next }}" />
- </fieldset>
+<div class="row">
+ <div class="col-sm-6">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <form method="post">
+ {% csrf_token %}
+ <fieldset>
+ <legend>{% trans 'Change password' %}</legend>
+ {{ form|as_vertical_form }}
+ <input type="hidden" name="next" value="{{ next }}" />
+ </fieldset>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <button class="btn btn-primary">
- {% trans "Update password" %}
- </button>
+ <div class="form-group">
+ <button class="btn btn-primary">
+ {% trans "Update password" %}
+ </button>
+ </div>
+ </form>
+ </div>
</div>
</div>
-</form>
+</div>
{% endblock %}
diff --git a/saleor/registration/templates/registration/login.html b/saleor/registration/templates/registration/login.html
index 9ad575fbd3..2ef6d88dfc 100644
--- a/saleor/registration/templates/registration/login.html
+++ b/saleor/registration/templates/registration/login.html
@@ -1,47 +1,51 @@
{% extends "base.html" %}
-{% load as_horizontal_form from bootstrap %}
+{% load as_vertical_form from bootstrap %}
{% load i18n %}
{% block title %}{% trans "Login" %} — {{ block.super }}{% endblock %}
{% block content %}
-<form method="post" action="{% url 'registration:login' %}" class="form-horizontal">
- {% csrf_token %}
- <fieldset>
- <legend>{% trans 'Log in' %}</legend>
- {{ form|as_horizontal_form }}
- <input type="hidden" name="next" value="{{ next }}" />
- </fieldset>
+<div class="row">
+ <div class="col-sm-6">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <form method="post" action="{% url 'registration:login' %}">
+ {% csrf_token %}
+ <fieldset>
+ <legend>{% trans 'Log in' %}</legend>
+ {{ form|as_vertical_form }}
+ <input type="hidden" name="next" value="{{ next }}" />
+ </fieldset>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <button class="btn btn-primary">
- {% trans "Log in" %}
- </button>
- <a class="btn btn-secondary" href="{% url 'registration:request_email_confirmation' %}">{% trans "I don't know my password" %}</a>
- </div>
- </div>
- <hr>
- {% if facebook_login_url or google_login_url %}
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <p>{% trans "Want to use your social profile?" %}</p>
- <p>
- {% if facebook_login_url %}
- <a class="btn btn-default zocial-facebook" href="{{ facebook_login_url }}"> {% trans "Log in using Facebook" %}</a>
+ <div class="form-group">
+ <button class="btn btn-primary">
+ {% trans "Log in" %}
+ </button>
+ <a class="btn btn-secondary" href="{% url 'registration:request_email_confirmation' %}">{% trans "I don't know my password" %}</a>
+ </div>
+ <hr>
+ {% if facebook_login_url or google_login_url %}
+ <div class="form-group">
+ <div class="col-sm-offset-2 col-sm-10">
+ <p>{% trans "Want to use your social profile?" %}</p>
+ <p>
+ {% if facebook_login_url %}
+ <a class="btn btn-default zocial-facebook" href="{{ facebook_login_url }}"> {% trans "Log in using Facebook" %}</a>
+ {% endif %}
+ {% if google_login_url %}
+ <a class="btn btn-default zocial-google" href="{{ google_login_url }}"> {% trans "Log in using Google" %}</a>
+ {% endif %}
+ </p>
+ </div>
+ </div>
+ <hr>
{% endif %}
- {% if google_login_url %}
- <a class="btn btn-default zocial-google" href="{{ google_login_url }}"> {% trans "Log in using Google" %}</a>
- {% endif %}
- </p>
+ <div class="form-group">
+ <p>{% trans "Don't have an account yet?" %} <a class="btn btn-secondary" href="{% url 'registration:request_email_confirmation' %}">{% trans "Register" %}</a></p>
+ </div>
+ </form>
</div>
</div>
- <hr>
- {% endif %}
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <p>{% trans "Don't have an account yet?" %} <a class="btn btn-secondary" href="{% url 'registration:request_email_confirmation' %}">{% trans "Register" %}</a></p>
- </div>
</div>
-</form>
+</div>
{% endblock %}
diff --git a/saleor/registration/templates/registration/request_email_confirmation.html b/saleor/registration/templates/registration/request_email_confirmation.html
index b1600866de..9c4f4b40d1 100644
--- a/saleor/registration/templates/registration/request_email_confirmation.html
+++ b/saleor/registration/templates/registration/request_email_confirmation.html
@@ -1,5 +1,5 @@
{% extends "base.html" %}
-{% load as_horizontal_form from bootstrap %}
+{% load as_vertical_form from bootstrap %}
{% load i18n %}
{% block title %}{% trans "Request email confirmation" %} — {{ block.super }}{% endblock %}
@@ -10,19 +10,25 @@
{% endblock breadcrumb %}
{% block content %}
-<form method="post" class="form-horizontal">
- {% csrf_token %}
- <fieldset>
- <legend>{% trans 'Request email confirmation' %}</legend>
- {{ form|as_horizontal_form }}
- <input type="hidden" name="next" value="{{ next }}" />
- </fieldset>
- <div class="form-group">
- <div class="col-sm-offset-2 col-sm-10">
- <button class="btn btn-primary">
- {% trans "Continue" %}
- </button>
+<div class="row">
+ <div class="col-sm-6">
+ <div class="panel panel-default">
+ <div class="panel-body">
+ <form method="post">
+ {% csrf_token %}
+ <fieldset>
+ <legend>{% trans 'Request email confirmation' %}</legend>
+ {{ form|as_vertical_form }}
+ <input type="hidden" name="next" value="{{ next }}" />
+ </fieldset>
+ <div class="form-group">
+ <button class="btn btn-primary">
+ {% trans "Continue" %}
+ </button>
+ </div>
+ </form>
+ </div>
</div>
</div>
-</form>
+</div>
{% endblock %}