Add bootstrap4 to password recovery html

This commit is contained in:
Aarni Halinen
2017-10-31 21:37:03 +02:00
parent 8c116d58de
commit 7f21b7bba2
6 changed files with 53 additions and 25 deletions
+1
View File
@@ -19,6 +19,7 @@ django-nose==1.4.4
nose-exclude==0.5.0
psycopg2==2.7.1
django-bootstrap3==8.2.3
django-bootstrap4==0.0.4
django-tables2==1.6.1
pycodestyle==2.3.1
dealer==2.0.5
+1
View File
@@ -82,6 +82,7 @@ INSTALLED_APPS = [
'rest_framework',
'django_nose',
'bootstrap3',
'bootstrap4',
'django_tables2',
'auditlog',
'phonenumber_field',
+9 -4
View File
@@ -1,8 +1,13 @@
{% extends "password_reset/base.html" %}{% load i18n %}
{% block title %}{% trans "New password set" %}{% endblock %}
{% block content %}
<p>{% trans "Your password has successfully been reset. You can use it right now on the login page." %}</p>
<p><a href="/login">Log in</a></p>
<div class="container">
<div class="d-flex justify-content-center">
<p>{% trans "Your password has successfully been reset. You can use it right now on the login page." %}</p>
</div>
<div class="d-flex justify-content-center">
<p><a href="/login">Log in</a></p>
</div>
</div>
{% endblock %}
+13 -7
View File
@@ -1,12 +1,18 @@
{% extends "password_reset/base.html" %}
{% load i18n %}
{% block title %}{% trans "Password recovery" %}{% endblock %}
{% load bootstrap4 %}
{% block content %}
<form method="post" action="{{ url }}">
{% csrf_token %}
{{ form.as_p }}
<p><input type="submit" value="{% trans "Send" %}"></p>
</form>
<div class="container">
<div class="d-flex justify-content-center">
<form method="post" action="{{ url }}" class="form">{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<button type="submit" class="btn btn-primary">
{% trans "Send" %}
</button>
{% endbuttons %}
</form>
</div>
</div>
{% endblock %}
+24 -10
View File
@@ -1,14 +1,28 @@
{% extends "password_reset/base.html" %}{% load i18n %}
{% load i18n %}
{% load bootstrap4 %}
{% block content %}
{% if invalid %}{% url "password_reset_recover" as recovery_url %}
<p>{% blocktrans %}Sorry, this password reset link is invalid. You can still <a href="{{ recovery_url }}">request a new one</a>.{% endblocktrans %}</p>
{% else %}
<p>{% blocktrans %}Hi, <strong>{{ username }}</strong>. Please choose your new password.{% endblocktrans %}</p>
<form method="post" action="{% url "password_reset_reset" token %}">
{% csrf_token %}
{{ form.as_p }}
<p><input type="submit" value="{% trans "Set new password" %}"></p>
</form>
{% endif %}
<div class="container">
{% if invalid %}{% url "password_reset_recover" as recovery_url %}
<div class="d-flex justify-content-center">
<p>{% blocktrans %}Sorry, this password reset link is invalid. You can still <a href="{{ recovery_url }}">request a new one</a>.{% endblocktrans %}</p>
</div>
{% else %}
<div class="d-flex justify-content-center">
<p>{% blocktrans %}Hi, <strong>{{ username }}</strong>. Please choose your new password.{% endblocktrans %}</p>
</div>
<div class="d-flex justify-content-center">
<form method="post" action="{% url "password_reset_reset" token %}" class="form">{% csrf_token %}
{% bootstrap_form form %}
{% buttons %}
<button type="submit" class="btn btn-primary">
{% trans "Set new password" %}
</button>
{% endbuttons %}
</form>
</div>
{% endif %}
</div>
{% endblock %}
+5 -4
View File
@@ -1,8 +1,9 @@
{% extends "password_reset/base.html" %}
{% load i18n %}
{% block title %}{% trans "Password recovery sent" %}{% endblock %}
{% block content %}
<p>{% blocktrans with ago=timestamp|timesince %}An email was sent to <strong>{{ email }}</strong> {{ ago }} ago. Use the link in it to set a new password.{% endblocktrans %}</p>
{% endblock %}
<div class="container">
<div class="d-flex justify-content-center">
<p>{% blocktrans with ago=timestamp|timesince %}An email was sent to <strong>{{ email }}</strong> {{ ago }} ago. Use the link in it to set a new password.{% endblocktrans %}</p>
</div>
</div>{% endblock %}