Projet

Général

Profil

0001-skip-users-services-warning-when-removing-an-entity-.patch

Frédéric Péters, 17 avril 2016 14:23

Télécharger (1,7 ko)

Voir les différences:

Subject: [PATCH] skip users/services warning when removing an entity if there
 are none (#8747)

 src/authentic2/manager/templates/authentic2/manager/ou_delete.html | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
src/authentic2/manager/templates/authentic2/manager/ou_delete.html
12 12
    {% csrf_token %}
13 13
    <div class="form-inner-container">
14 14
      {% block caption %}
15
      <p>{% blocktrans with user_count=object.user_set.count service_count=object.service_set.count %}There are currently {{ user_count }} users and {{ service_count }} services in this organizational unit. They will all be deleted. Are you sure you want to delete organizational unit "{{ object }}"&nbsp;?{% endblocktrans %}</p>
15
      {% if object.user_set.count or object.service_set.count %}
16
      <p>{% blocktrans with user_count=object.user_set.count service_count=object.service_set.count %}There are currently {{ user_count }} users and {{ service_count }} services in this organizational unit. They will all be deleted.{% endblocktrans %}
17
      {% endif %}
18
      <p>{% blocktrans %}Are you sure you want to delete organizational unit "{{ object }}"?{% endblocktrans %}</p>
16 19
      {% endblock %}
17 20
      <div class="buttons">
18 21
        <button>{% trans "Delete" %}</button>
19
-