diff --git a/core/templates/registration/passwor_reset_complete.html b/core/templates/registration/passwor_reset_complete.html index ad79083..a678aea 100644 --- a/core/templates/registration/passwor_reset_complete.html +++ b/core/templates/registration/passwor_reset_complete.html @@ -3,33 +3,31 @@ {% block content %} -
-
-
-
-
-
- logo amadeus -
-
-
-
-
-
-
-
-
-
- {% csrf_token %} -
-

{% trans "Your password has been set. You can go ahead and go now." %}

-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+

{% trans "Your password was reseted successful" %}

+
+
+ +
+
+
+
+
{% endblock content %} diff --git a/core/templates/registration/passwor_reset_confirm.html b/core/templates/registration/passwor_reset_confirm.html index 7abb6df..2162593 100644 --- a/core/templates/registration/passwor_reset_confirm.html +++ b/core/templates/registration/passwor_reset_confirm.html @@ -1,40 +1,75 @@ {% extends "index.html" %} -{% load i18n static %} +{% load i18n static widget_tweaks%} - {% block content%} +{% block content%} -
-
-
-
-
-
- logo amadeus -
-
-
-
-
-
+
+
+
+ +
+
+
+
+
+
+
+
+
+

{% trans "Reset Your Password" %}

+
+
+ {% if validlink %} - - {% if validlink %} - -

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

- -
{% csrf_token %} - {{ form.new_password1.errors }} -

{{ form.new_password1 }}

- {{ form.new_password2.errors }} -

{{ form.new_password2 }}

-

-
- - {% else %} - -

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

- - {% endif %} - - {% endblock %} +
+
+

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

+
+
+
+ {% csrf_token %} +
+ {% if form.new_password2.errors %} +
+
+ +
+
+ {% endif %} + {% for field in form %} +
+
+ + {% render_field field class='form-control' %} +
+
+ {% endfor %} +
+ +
+
+ {% else %} +
+
+

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

+
+
+ {% endif %} +
+
+
+
+
+
+
+{% endblock %} diff --git a/core/templates/registration/passwor_reset_done.html b/core/templates/registration/passwor_reset_done.html index 825c6ea..20ec01f 100644 --- a/core/templates/registration/passwor_reset_done.html +++ b/core/templates/registration/passwor_reset_done.html @@ -4,48 +4,33 @@
-
- -
+
+ +
- {% if success %} - - {% elif danger %} - - {% endif %}
-
-
- {% csrf_token %} -
-

{% trans "We have sent instructions to set up your password, if an account exists with the email entered. You should receive them soon." %}

-

{% trans "If you do not receive an email, please make sure you entered the address you registered, and check the spam folder." %}

-
- +
+
+

{% trans "Reset Your Password" %}

+
+
+
+
+

{% trans "We have sent instructions to set up your password, if an account exists with the email entered. You should receive them soon." %}

+

{% trans "If you do not receive an email, please make sure you entered the address you registered, and check the spam folder." %}

+
+ - +
+
+
{% endblock content %} diff --git a/core/templates/registration/passwor_reset_form.html b/core/templates/registration/passwor_reset_form.html index 12fe985..f510c01 100644 --- a/core/templates/registration/passwor_reset_form.html +++ b/core/templates/registration/passwor_reset_form.html @@ -3,58 +3,58 @@ {% block content%}
-
-
- -
-
+
+
+ +
+
- {% if success %} - - {% elif danger %} - - {% endif %}
+
+
+

{% trans "Reset Your Password" %}

+
+
-
+
{% csrf_token %} + {% if form.email.errors %} +
+
+ +
+ {% endif %}
- + -
-
-
- +
+
+
+
-
-
+
+ - -
- +
+
- + +
diff --git a/core/urls.py b/core/urls.py index 01f91ee..10fcf7c 100644 --- a/core/urls.py +++ b/core/urls.py @@ -20,7 +20,6 @@ router.register(r'subjectapi', SubjectViewSet) urlpatterns = [ url(r'^$', views.login, name='home'), url(r'^register/$', views.RegisterUser.as_view(), name='register'), - url(r'^remember_password/$', views.remember_password, name='remember_password'), url(r'^logout/$', auth_views.logout, {'next_page': 'core:home'}, name='logout'), url(r'^notification/([0-9]+)/$', views.processNotification, name='notification_read'), url(r'^getNotifications/$', views.getNotifications, name='getNotifications'), @@ -44,5 +43,3 @@ urlpatterns = [ url(r'^done/$', password_reset_complete,{'template_name':'registration/passwor_reset_complete.html'}), ] - - diff --git a/core/views.py b/core/views.py index 0c2782c..84a43d5 100644 --- a/core/views.py +++ b/core/views.py @@ -52,28 +52,6 @@ class RegisterUser(CreateView, NotificationMixin): def create_account(request): return render(request, "create_account.html") - -def remember_password(request): - context = {} - if request.POST: - email = request.POST['email'] - registration = request.POST['registration'] - if email and registration: - subject = _('Recover your password') - message = _('Hello {0}, \nRecover your password to use your account.\nNumber of registration: {1}\nLink for recuver password.\n\nRespectfully,\nTeam Amadeus.'.format(request.user,registration)) - try: - send_mail(subject, message, settings.DEFAULT_FROM_EMAIL, [email],fail_silently=False) - context['success'] = 'Email successfully sent' - except BadHeaderError: - context['email'] = email - context['registration'] = registration - context['danger'] = 'E-mail does not send' - else: - context['email'] = email - context['registration'] = registration - context['danger'] = 'E-mail does not send' - return render(request, "remember_password.html",context) - def login(request): context = {} -- libgit2 0.21.2