Projet

Général

Profil

0001-templates-better-account-deletion-request-message-39.patch

Valentin Deniaud, 12 mars 2020 18:17

Télécharger (1,98 ko)

Voir les différences:

Subject: [PATCH] templates: better account deletion request message (#39980)

 .../templates/authentic2/accounts_delete_request.html  | 10 +++++++++-
 src/authentic2/views.py                                |  5 +++++
 2 files changed, 14 insertions(+), 1 deletion(-)
src/authentic2/templates/authentic2/accounts_delete_request.html
16 16
<form method="post">
17 17
  {% csrf_token %}
18 18
  <p>
19
  {% trans "Send an account-deletion validation code?" %}
19
  {% blocktrans %}
20
  Do you really want to delete your account ?
21
  {% endblocktrans %}
22
  </p>
23
  <p>
24
  {% blocktrans %}
25
  A validation message will be sent to {{ email }}. You will have to visit the
26
  link in this email in order to complete the deletion process.
27
  {% endblocktrans %}
20 28
  </p>
21 29
  <button class="submit-button" name="submit">{% trans "Send the code" %}</button>
22 30
  <button class="cancel-button" name="cancel" formnovalidate>{% trans "Cancel" %}</button>
src/authentic2/views.py
1102 1102
                _("An account deletion validation email has been sent to your email address."))
1103 1103
        return utils.redirect(request, 'account_management')
1104 1104

  
1105
    def get_context_data(self, **kwargs):
1106
        ctx = super(DeleteView, self).get_context_data(**kwargs)
1107
        ctx['email'] = self.request.user.email
1108
        return ctx
1109

  
1105 1110

  
1106 1111
class ValidateDeletionView(TemplateView):
1107 1112
    template_name = 'authentic2/accounts_delete_validation.html'
1108
-