Add a confirmation dialog before deleting items

master
Pierre Jaury 9 years ago
parent ec0304456b
commit ad879bc9f5

@ -27,7 +27,7 @@ Alias list
<tr>
<td>
<a href="{{ url_for('.alias_edit', alias=alias.get_id()) }}" title="Edit"><i class="fa fa-pencil"></i></a>&nbsp;
<a href="{{ url_for('.alias_delete', alias=alias.get_id()) }}" title="Delete"><i class="fa fa-trash"></i></a>
<a href="{{ url_for('.alias_delete', alias=alias.get_id()) }}" onclick="return confirm('Are you sure?')" title="Delete"><i class="fa fa-trash"></i></a>
</td>
<td>{{ alias }}</td>
<td>{{ alias.destination or '-' }}</td>

@ -28,8 +28,8 @@ Domain list
<a href="{{ url_for('.user_list', domain_name=domain.name) }}" title="Users"><i class="fa fa-envelope-o"></i></a>&nbsp;
<a href="{{ url_for('.alias_list', domain_name=domain.name) }}" title="Aliases"><i class="fa fa-at"></i></a>&nbsp;
<a href="{{ url_for('.domain_admins', domain_name=domain.name) }}" title="Administrators"><i class="fa fa-user"></i></a>&nbsp;
<a href="{{ url_for('.domain_delete', domain_name=domain.name) }}" title="Delete"><i class="fa fa-trash"></i></a>&nbsp;
<a href="{{ url_for('.domain_edit', domain_name=domain.name) }}" title="Edit"><i class="fa fa-pencil"></i></a>
<a href="{{ url_for('.domain_delete', domain_name=domain.name) }}" onclick="return confirm('Are you sure?')" title="Delete"><i class="fa fa-trash"></i></a>&nbsp;
</td>
<td>{{ domain.name }}</td>
<td>{{ domain.users | count }} / {{ domain.max_users or '∞' }}</td>

@ -22,5 +22,5 @@ to access the administration tools
{% endblock %}
{% block box_content %}
{{ wtf.quick_form(form) }}
{{ macros.form(form) }}
{% endblock %}

@ -33,7 +33,7 @@ User list
<a href="{{ url_for('.user_reply', user_email=user.get_id()) }}" title="Auto-reply"><i class="fa fa-plane"></i></a>&nbsp;
<a href="{{ url_for('.user_fetchmail', user_email=user.get_id()) }}" title="Fetched accounts"><i class="fa fa-download"></i></a>&nbsp;
<a href="{{ url_for('.user_edit', user_email=user.get_id()) }}" title="Edit"><i class="fa fa-pencil"></i></a>&nbsp;
<a href="{{ url_for('.user_delete', user_email=user.get_id()) }}" title="Delete"><i class="fa fa-trash"></i></a>
<a href="{{ url_for('.user_delete', user_email=user.get_id()) }}" onclick="return confirm('Are you sure?')" title="Delete"><i class="fa fa-trash"></i></a>
</td>
<td>{{ user }}</td>
<td>

Loading…
Cancel
Save