Browse Source

Fix error in profil of users with an unverified email

choose_password_during_user_creation
Jean-Romain Garnier 6 years ago
committed by Jean-Romain Garnier
parent
commit
01a52f88d3
  1. 4
      users/locale/fr/LC_MESSAGES/django.po
  2. 21
      users/templates/users/profil.html

4
users/locale/fr/LC_MESSAGES/django.po

@ -1028,6 +1028,10 @@ msgstr "Pas de connexion"
msgid "Pay for a connection"
msgstr "Payer une connexion"
#: users/templates/users/profil.html:81
msgid "Resend the email"
msgstr "Renvoyer le mail"
#: users/templates/users/profil.html:60
msgid "Ask someone with the appropriate rights to pay for a connection."
msgstr ""

21
users/templates/users/profil.html

@ -70,14 +70,21 @@ with this program; if not, write to the Free Software Foundation, Inc.,
{% elif not users.has_access %}
<div class="panel panel-danger">
<div class="panel-heading dashboard">{% trans "No connection" %}</div>
<div class="panel-body dashboard">
{% can_create Facture %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
<i class="fa fa-sign-in"></i> {% trans "Pay for a connection" %}
</a>
{% acl_else %}
{% trans "Ask someone with the appropriate rights to pay for a connection." %}
{% acl_end %}
{% if users.email_state == users.EMAIL_STATE_UNVERIFIED %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'users:resend-confirmation-email' users.id %}">
<i class="fa fa-sign-in"></i> {% trans "Resend the email" %}
</a>
{% else %}
{% can_create Facture %}
<a class="btn btn-danger btn-sm" role="button" href="{% url 'cotisations:new-facture' users.id %}">
<i class="fa fa-sign-in"></i> {% trans "Pay for a connection" %}
</a>
{% acl_else %}
{% trans "Ask someone with the appropriate rights to pay for a connection." %}
{% acl_end %}
{% endif %}
</div>
</div>
{% else %}

Loading…
Cancel
Save