Skip to content

Commit e649b1c

Browse files
martinlehouxfallen
authored andcommitted
fix - Use bootstrap modal for error display
1 parent dcbac0c commit e649b1c

File tree

3 files changed

+17
-2
lines changed

3 files changed

+17
-2
lines changed

pytition/locale/fr_FR/LC_MESSAGES/django.po

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1054,7 +1054,7 @@ msgstr ""
10541054
msgid "Remove this member from the organization."
10551055
msgstr "Enlever cet utilisateur de l'organisation."
10561056

1057-
#: pytition/petition/template/orga.js:82
1057+
#: pytition/petition/templates/petition/org_member_list.html:39
10581058
msgid "Unable to remove this member from the organization."
10591059
msgstr "Impossible d'enlever cet utilisateur de l'organisation."
10601060

pytition/petition/templates/petition/org_member_list.html

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -31,3 +31,18 @@ <h4><span class="oi oi-people"></span>&nbsp;{% trans "Members" %}&nbsp;({{ org.m
3131
{% endfor %}
3232
</ul>
3333
</div>
34+
35+
<div class="modal fade" id="member_delete_error_modal">
36+
<div class="modal-dialog">
37+
<div class="modal-content">
38+
<div class="modal-body">
39+
{% trans "Unable to remove this member from the organization." %}
40+
</div>
41+
42+
<div class="modal-footer">
43+
<button type="button" class="btn btn-info" data-dismiss="modal">OK</button>
44+
</div>
45+
46+
</div>
47+
</div>
48+
</div>

pytition/petition/templates/petition/orga.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ $(function () {
7979
else
8080
window.location = window.location.href;
8181
}).fail((xhr, status, error) => {
82-
alert("{% trans 'Unable to remove this member from the organization.' %}");
82+
$('#member_delete_error_modal').modal('show')
8383
});
8484
});
8585
});

0 commit comments

Comments
 (0)