diff options
author | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-23 13:45:10 +0200 |
---|---|---|
committer | Étienne Loks <etienne.loks@iggdrasil.net> | 2017-10-23 13:45:10 +0200 |
commit | 130700b0d36e6891c38dbc62f4fe87e40f4e33bf (patch) | |
tree | c2537bf9cb9738d515445c2d1482edac6ee8a746 /ishtar_common/templates/registration/login.html | |
parent | 28cf4e92222d71c7dd3ee93827231b15d4d36bb3 (diff) | |
download | Ishtar-130700b0d36e6891c38dbc62f4fe87e40f4e33bf.tar.bz2 Ishtar-130700b0d36e6891c38dbc62f4fe87e40f4e33bf.zip |
UI: work on bootstrap layout
Diffstat (limited to 'ishtar_common/templates/registration/login.html')
-rw-r--r-- | ishtar_common/templates/registration/login.html | 52 |
1 files changed, 40 insertions, 12 deletions
diff --git a/ishtar_common/templates/registration/login.html b/ishtar_common/templates/registration/login.html index e8122f150..1b6062e53 100644 --- a/ishtar_common/templates/registration/login.html +++ b/ishtar_common/templates/registration/login.html @@ -2,18 +2,46 @@ {% load i18n %} {% block content %} -<div class='form'> -<form method="post" action=".">{% csrf_token %} -<table id='login'> - <caption>{%trans "Log in"%}</caption> -{{ form.as_table }} - <tr class='submit'><td colspan='2'><input type="submit" value="{% trans 'Log in' %}" /></td></tr> - <input type="hidden" name="next" value="{{ next }}" /> -</table> -</form> +<div class="row justify-content-center"> + <div class="col-md-6"> + <h4>{%trans "Log in"%}</h4> + <form method="post" action=".">{% csrf_token %} + <input type="hidden" name="next" value="{{ next }}" /> + {% if form.non_field_errors %} + <div class="form-group row"> + {% for error in form.non_field_errors %} + <div class="form-group has-errors text-danger small"> + {{error}} + </div> + {% endfor %} + </div> + {% endif %} + + {% for field in form %} + {% if field.errors %} + <div class="form-group row has-errors text-danger small"> + {{field.errors}} + </div> + {% endif %} + <div class="form-group row"> + <label for="{{field.id}}" class="col-6 col-form-label">{{field.label}}</label> + <div class="col-6">{{field}}</div> + </div> + {% endfor %} + + <div class="row justify-content-center"> + <div class="col-12"> + <button type="submit" class="btn btn-primary">{% trans 'Log in' %}</button> + </div> + </div> + </form> + </div> </div> -<div class='info'> -<p>{% trans "Forgot password?" %} <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a></p> -<p>{% trans "Not member?" %} <a href="{% url 'registration_register' %}">{% trans "Register" %}</a></p> +<hr/> +<div class="row justify-content-center"> + <div class="col-md-6"> + <small>{% trans "Forgot password?" %} <a href="{% url 'auth_password_reset' %}">{% trans "Reset it" %}</a> – + {% trans "Not member?" %} <a href="{% url 'registration_register' %}">{% trans "Register" %}</a></small> + </div> </div> {% endblock %} |