diff --git a/passbook/core/templates/login/base.html b/passbook/core/templates/login/base.html index 597434c48..b69d941e0 100644 --- a/passbook/core/templates/login/base.html +++ b/passbook/core/templates/login/base.html @@ -3,6 +3,23 @@ {% load static %} {% load i18n %} +{% block head %} + +{% endblock %} + {% block body %}
@@ -33,4 +50,4 @@
-{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/passbook/core/templates/login/form.html b/passbook/core/templates/login/form.html index e3a224e88..e88d5c272 100644 --- a/passbook/core/templates/login/form.html +++ b/passbook/core/templates/login/form.html @@ -5,30 +5,18 @@ {% block card %}
-

{% trans 'Log In to Your Account' %}

+

{% trans title %}

{% include 'partials/messages.html' %}
{% csrf_token %} -
- - -
-
- - -
-
- - {% if config.password_reset.enabled %} - {% trans 'Forgot password?' %} - {% endif %} -
- + {% include 'partials/form_login.html' %} +
-{% if config.sign_up.enabled %} -

{% trans 'Need an account?' %}{% trans 'Sign up' %}

+{% if show_sign_up_notice %} +

+ {% trans 'Need an account?' %} + {% trans 'Sign up' %} +

{% endif %} -{% endblock %} \ No newline at end of file +{% endblock %} diff --git a/passbook/core/templates/partials/form_login.html b/passbook/core/templates/partials/form_login.html new file mode 100644 index 000000000..1129396a8 --- /dev/null +++ b/passbook/core/templates/partials/form_login.html @@ -0,0 +1,57 @@ +{% load utils %} +{% load i18n %} + +{% csrf_token %} +{% for field in form %} +
+ {% if field.field.widget|fieldtype == 'RadioSelect' %} + + {% for c in field %} +
+ + +
+ {% endfor %} + {% elif field.field.widget|fieldtype == 'Select' %} + +
+ {{ field }} +
+ {% elif field.field.widget|fieldtype == 'CheckboxInput' %} + + {% if show_password_forget_notice %} + {% trans 'Forgot password?' %} + {% endif %} + {% else %} + + {{ field|css_class:'form-control input-lg' }} + {% if field.help_text %} + + {{ field.help_text }} + + {% endif %} + {% endif %} + {% for error in field.errors %} +
+
+
+
+ +
+ + {{ error }} + +
+
+
+ {% endfor %} +
+{% endfor %}