From b666c7664b623a3777409a47b1b37692a13bc560 Mon Sep 17 00:00:00 2001 From: andryyy Date: Sat, 18 Apr 2020 10:15:03 +0200 Subject: [PATCH] [Web] ays dialog for PO deletion --- data/web/edit.php | 2 +- data/web/js/site/edit.js | 1 + data/web/js/site/user.js | 1 + data/web/lang/lang.de.json | 2 ++ data/web/lang/lang.en.json | 2 ++ data/web/user.php | 2 +- 6 files changed, 8 insertions(+), 2 deletions(-) diff --git a/data/web/edit.php b/data/web/edit.php index 06881905..2fc6bfe0 100644 --- a/data/web/edit.php +++ b/data/web/edit.php @@ -806,7 +806,7 @@ if (isset($_SESSION['mailcow_cc_role'])) {
- +
diff --git a/data/web/js/site/edit.js b/data/web/js/site/edit.js index 579a44a8..1626d4b0 100644 --- a/data/web/js/site/edit.js +++ b/data/web/js/site/edit.js @@ -1,5 +1,6 @@ $(document).ready(function() { $(".arrow-toggle").on('click', function(e) { e.preventDefault(); $(this).find('.arrow').toggleClass("animation"); }); + $("#pushover_delete").click(function() { return confirm(lang.delete_ays); }); $(".goto_checkbox").click(function( event ) { $("form[data-id='editalias'] .goto_checkbox").not(this).prop('checked', false); if ($("form[data-id='editalias'] .goto_checkbox:checked").length > 0) { diff --git a/data/web/js/site/user.js b/data/web/js/site/user.js index a04bd44c..24ad5c23 100644 --- a/data/web/js/site/user.js +++ b/data/web/js/site/user.js @@ -14,6 +14,7 @@ $(document).ready(function() { }); }); $(".arrow-toggle").on('click', function(e) { e.preventDefault(); $(this).find('.arrow').toggleClass("animation"); }); + $("#pushover_delete").click(function() { return confirm(lang.delete_ays); }); }); jQuery(function($){ // http://stackoverflow.com/questions/24816/escaping-html-strings-with-jquery diff --git a/data/web/lang/lang.de.json b/data/web/lang/lang.de.json index ad1c7ef1..129bfeb1 100644 --- a/data/web/lang/lang.de.json +++ b/data/web/lang/lang.de.json @@ -451,6 +451,7 @@ "delete1": "Lösche Nachricht nach Übertragung vom Quell-Server", "delete2": "Lösche Nachrichten von Ziel-Server, die nicht auf Quell-Server vorhanden sind", "delete2duplicates": "Lösche Duplikate im Ziel", + "delete_ays": "Soll der Löschvorgang wirklich ausgeführt werden?", "description": "Beschreibung", "domain": "Domain bearbeiten", "domain_admin": "Domain-Administrator bearbeiten", @@ -877,6 +878,7 @@ "create_syncjob": "Neuen Sync-Job erstellen", "daily": "Täglich", "day": "Tag", + "delete_ays": "Soll der Löschvorgang wirklich ausgeführt werden?", "direct_aliases": "Direkte Alias-Adressen", "direct_aliases_desc": "Nur direkte Alias-Adressen werden für benutzerdefinierte Einstellungen berücksichtigt.", "eas_reset": "ActiveSync Geräte-Cache zurücksetzen", diff --git a/data/web/lang/lang.en.json b/data/web/lang/lang.en.json index 53b0ab9f..dfd598e3 100644 --- a/data/web/lang/lang.en.json +++ b/data/web/lang/lang.en.json @@ -450,6 +450,7 @@ "delete1": "Delete from source when completed", "delete2": "Delete messages on destination that are not on source", "delete2duplicates": "Delete duplicates on destination", + "delete_ays": "Please confirm the deletion process.", "description": "Description", "domain": "Edit domain", "domain_admin": "Edit domain administrator", @@ -876,6 +877,7 @@ "create_syncjob": "Create new sync job", "daily": "Daily", "day": "day", + "delete_ays": "Please confirm the deletion process.", "direct_aliases": "Direct alias addresses", "direct_aliases_desc": "Direct alias addresses are affected by spam filter and TLS policy settings.", "eas_reset": "Reset ActiveSync device cache", diff --git a/data/web/user.php b/data/web/user.php index ad32a77f..1a40fb54 100644 --- a/data/web/user.php +++ b/data/web/user.php @@ -547,7 +547,7 @@ elseif (isset($_SESSION['mailcow_cc_role']) && $_SESSION['mailcow_cc_role'] == '
- +