From e4e8abb1b9f04b6852d2b64e8ae99476d27ee11a Mon Sep 17 00:00:00 2001 From: Kristian Feldsam Date: Sun, 3 Sep 2023 12:31:59 +0200 Subject: [PATCH] [Web] Ratelimit settings as input group Signed-off-by: Kristian Feldsam --- data/web/edit.php | 12 +-- data/web/templates/edit/aliasdomain.twig | 4 +- data/web/templates/edit/domain-templates.twig | 13 ++-- data/web/templates/edit/domain.twig | 20 +++-- .../web/templates/edit/mailbox-templates.twig | 9 +-- data/web/templates/edit/mailbox.twig | 20 +++-- data/web/templates/modals/mailbox.twig | 73 +++++++++---------- 7 files changed, 80 insertions(+), 71 deletions(-) diff --git a/data/web/edit.php b/data/web/edit.php index 09db796d..55bc050d 100644 --- a/data/web/edit.php +++ b/data/web/edit.php @@ -59,20 +59,22 @@ if (isset($_SESSION['mailcow_cc_role'])) { ]; } } - elseif (isset($_GET["template"])){ - $domain_template = mailbox('get', 'domain_templates', $_GET["template"]); + elseif (isset($_GET['template'])){ + $domain_template = mailbox('get', 'domain_templates', $_GET['template']); if ($domain_template){ $template_data = [ - 'template' => $domain_template + 'template' => $domain_template, + 'rl' => ['frame' => $domain_template['attributes']['rl_frame']], ]; $template = 'edit/domain-templates.twig'; $result = true; } else { - $mailbox_template = mailbox('get', 'mailbox_templates', $_GET["template"]); + $mailbox_template = mailbox('get', 'mailbox_templates', $_GET['template']); if ($mailbox_template){ $template_data = [ - 'template' => $mailbox_template + 'template' => $mailbox_template, + 'rl' => ['frame' => $mailbox_template['attributes']['rl_frame']], ]; $template = 'edit/mailbox-templates.twig'; $result = true; diff --git a/data/web/templates/edit/aliasdomain.twig b/data/web/templates/edit/aliasdomain.twig index e2ecd487..fe262d1b 100644 --- a/data/web/templates/edit/aliasdomain.twig +++ b/data/web/templates/edit/aliasdomain.twig @@ -31,10 +31,12 @@
- +
+ +
{% if dkim %} diff --git a/data/web/templates/edit/domain-templates.twig b/data/web/templates/edit/domain-templates.twig index c58693b2..8b4b428b 100644 --- a/data/web/templates/edit/domain-templates.twig +++ b/data/web/templates/edit/domain-templates.twig @@ -81,13 +81,12 @@
- - +
+ + +
{% endif %} diff --git a/data/web/templates/edit/domain.twig b/data/web/templates/edit/domain.twig index 4ba25cf7..a5c8b6d6 100644 --- a/data/web/templates/edit/domain.twig +++ b/data/web/templates/edit/domain.twig @@ -145,14 +145,20 @@ {% endif %}
-
-
-
- - - + + +
+
+
+
+
diff --git a/data/web/templates/edit/mailbox-templates.twig b/data/web/templates/edit/mailbox-templates.twig index 28f45b56..d4949a3a 100644 --- a/data/web/templates/edit/mailbox-templates.twig +++ b/data/web/templates/edit/mailbox-templates.twig @@ -118,14 +118,13 @@
+
-

{{ lang.edit.mbox_rl_info }}

+
+

{{ lang.edit.mbox_rl_info }}


diff --git a/data/web/templates/edit/mailbox.twig b/data/web/templates/edit/mailbox.twig index c020cb0a..76cc45bb 100644 --- a/data/web/templates/edit/mailbox.twig +++ b/data/web/templates/edit/mailbox.twig @@ -379,18 +379,24 @@
-
-
-
+ +
+

{{ lang.acl.ratelimit }}

- - + + +
+
+
+
+
-

{{ lang.edit.mbox_rl_info }}

+

{{ lang.edit.mbox_rl_info }}

diff --git a/data/web/templates/modals/mailbox.twig b/data/web/templates/modals/mailbox.twig index e59d630a..07c9d10f 100644 --- a/data/web/templates/modals/mailbox.twig +++ b/data/web/templates/modals/mailbox.twig @@ -155,14 +155,13 @@
- - -

{{ lang.edit.mbox_rl_info }}

+
+ + +
+

{{ lang.edit.mbox_rl_info }}

@@ -325,14 +324,13 @@
- - -

{{ lang.edit.mbox_rl_info }}

+
+ + +
+

{{ lang.edit.mbox_rl_info }}


@@ -462,13 +460,13 @@
-
- -
-
- +
+
+ + +

@@ -600,16 +598,13 @@
-
- -
-
- +
+
+ + +
{% endif %} @@ -819,13 +814,13 @@
-
- -
-
- + + +