Commit 38251de263956a5df50f788f6017aa0848fe800c
1 parent
8ca369ae
Exists in
master
and in
5 other branches
correção do urls e atualização do template #58
Showing
2 changed files
with
34 additions
and
42 deletions
Show diff stats
core/templates/registration/passwor_reset_confirm.html
1 | {% extends "index.html" %} | 1 | {% extends "index.html" %} |
2 | {% load i18n static %} | 2 | {% load i18n static %} |
3 | 3 | ||
4 | -{% block content%} | 4 | + {% block content%} |
5 | 5 | ||
6 | <div class="row"> | 6 | <div class="row"> |
7 | - <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> | ||
8 | - <div class="row"> | ||
9 | - <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | ||
10 | - </br> | ||
11 | - </br> | ||
12 | - <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | ||
13 | - </br> | ||
14 | - </div> | ||
15 | - </div> | ||
16 | - </div> | ||
17 | - <div class="row "> | ||
18 | - <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | ||
19 | - | ||
20 | - | ||
21 | - {% if validlink %} | ||
22 | - <h3>Nova Senha</h3> | ||
23 | - <form method="post"> | ||
24 | - {% csrf_token %} | ||
25 | - {{ form.new_password1.erros }} | ||
26 | - <label for="id_password1"> Nova Senha: </label> | ||
27 | - {form.new_password1} | ||
28 | - | ||
29 | - {{ form.new_password2.erros }} | ||
30 | - <label for="id_password2"> Confirmar Senha: </label> | ||
31 | - {form.new_password2} | ||
32 | - | ||
33 | - | ||
34 | - <button type="submit">Confirmar</button> | ||
35 | - </form> | ||
36 | - | ||
37 | - {% else %} | ||
38 | - <p> | ||
39 | - O link de redefinição de senha está inválido, possivelmente porque ele já foi utilizado. | ||
40 | - Por favor, solicite uma nova redefinição de senha. | ||
41 | - </p> | ||
42 | - {% endif %} | ||
43 | - | ||
44 | - </div> | 7 | + <div class="col-md-4 col-md-offset-4 col-xs-4 col-xs-offset-4 col-sm-4 col-sm-offset-4 col-lg-4 col-lg-offset-4 col-xl-4 col-xl-offset-4"> |
8 | + <div class="row"> | ||
9 | + <div class="col-md-offset-2 col-md-8 col-sm-offset-2 col-sm-8 col-xs-offset-2 col-xs-8 col-lg-offset-2 col-lg-8 col-xs-offset-2 col-xs-8"> | ||
10 | + </br> | ||
11 | + </br> | ||
12 | + <img src="{% static 'img/amadeus.png' %}" class="img-responsive center-block " alt="logo amadeus"> | ||
13 | + </br> | ||
45 | </div> | 14 | </div> |
46 | -</div> | 15 | + </div> |
16 | + </div> | ||
17 | + <div class="row "> | ||
18 | + <div class="col-lg-9 col-lg-offset-2 col-xs-9 col-xs-offset-2 col-sm-9 col-sm-offset-2 col-md-9 col-md-offset-2 col-xl-9 col-xl-offset-2"> | ||
19 | + | ||
20 | + | ||
21 | + | ||
22 | + {% if validlink %} | ||
23 | + | ||
24 | + <p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p> | ||
25 | + | ||
26 | + <form method="post">{% csrf_token %} | ||
27 | + {{ form.new_password1.errors }} | ||
28 | + <p class="aligned wide"><label for="id_new_password1">{% trans 'New password:' %}</label>{{ form.new_password1 }}</p> | ||
29 | + {{ form.new_password2.errors }} | ||
30 | + <p class="aligned wide"><label for="id_new_password2">{% trans 'Confirm password:' %}</label>{{ form.new_password2 }}</p> | ||
31 | + <p><input type="submit" value="{% trans 'Change my password' %}" /></p> | ||
32 | + </form> | ||
33 | + | ||
34 | + {% else %} | ||
35 | + | ||
36 | + <p>{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}</p> | ||
37 | + | ||
38 | + {% endif %} | ||
47 | 39 | ||
48 | -{% endblock content %} | 40 | + {% endblock %} |
core/urls.py
@@ -21,7 +21,7 @@ urlpatterns = [ | @@ -21,7 +21,7 @@ urlpatterns = [ | ||
21 | url(r'^reset/done/$', password_reset_done, {'template_name':'registration/passwor_reset_done.html'}), | 21 | url(r'^reset/done/$', password_reset_done, {'template_name':'registration/passwor_reset_done.html'}), |
22 | url(r'^reset/(?P<uidb64>[0-9A-Za-z]+)/(?P<token>.+)/$', password_reset_confirm, | 22 | url(r'^reset/(?P<uidb64>[0-9A-Za-z]+)/(?P<token>.+)/$', password_reset_confirm, |
23 | {'template_name':'registration/passwor_reset_confirm.html', | 23 | {'template_name':'registration/passwor_reset_confirm.html', |
24 | - 'post_reset_redirect' : 'done/'}, | 24 | + 'post_reset_redirect' : '/done/'}, |
25 | name='password_reset_confirm'), | 25 | name='password_reset_confirm'), |
26 | url(r'^done/$', password_reset_complete,{'template_name':'registration/passwor_reset_complete.html'}), | 26 | url(r'^done/$', password_reset_complete,{'template_name':'registration/passwor_reset_complete.html'}), |
27 | ] | 27 | ] |