diff --git a/templates/home.html b/templates/home.html index 9c48e49..34febf8 100644 --- a/templates/home.html +++ b/templates/home.html @@ -5,6 +5,40 @@ {% block head %} {{ super() }} {% endblock head %} +{% macro delete_modal(modal_id, confirm_text, action, payload) %} + + +{% endmacro delete_modal %} {% block content %}

Mail management

@@ -14,33 +48,11 @@ {% for mail in mails %}
  • {{ mail.mail }} - - + {{ self::delete_modal(modal_id="mailDelete" ~ loop.index, + confirm_text="Delete mail '" ~ mail.mail ~ "'", + action="/mail/delete", + payload=["mail", mail.mail]) + }}
  • {% endfor %} @@ -87,33 +99,11 @@
  • {{ alias.mail }} - - + {{ self::delete_modal(modal_id="aliasDelete" ~ loop.index, + confirm_text="Delete alias '" ~ alias.mail ~ "'", + action="/alias/delete", + payload=["mail", alias.mail]) + }}