From e7ccc7bf76778b3e721b61bb3a5de4fdfe65aa17 Mon Sep 17 00:00:00 2001 From: Michael Kaufmann Date: Tue, 18 Oct 2022 20:39:01 +0200 Subject: [PATCH] more sub-navigation links; rename 'cancel' to 'discard changes' as it is a form-reset button Signed-off-by: Michael Kaufmann --- admin_templates.php | 1 + .../admin/templates/formfield.filetemplate_add.php | 1 + .../admin/templates/formfield.filetemplate_edit.php | 1 + lib/formfields/admin/templates/formfield.template_add.php | 1 + .../admin/templates/formfield.template_edit.php | 1 + lib/formfields/customer/email/formfield.emails_edit.php | 5 +---- templates/Froxlor/form/form.html.twig | 8 ++++---- 7 files changed, 10 insertions(+), 8 deletions(-) diff --git a/admin_templates.php b/admin_templates.php index c381e354..3aacc009 100644 --- a/admin_templates.php +++ b/admin_templates.php @@ -403,6 +403,7 @@ if ($action == '') { 'formdata' => [ 'title' => lng('admin.templates.template_add'), 'image' => 'fa-solid fa-plus', + 'self_overview' => ['section' => 'templates', 'page' => 'email'], 'sections' => [ 'section_a' => [ 'title' => lng('admin.templates.template_add'), diff --git a/lib/formfields/admin/templates/formfield.filetemplate_add.php b/lib/formfields/admin/templates/formfield.filetemplate_add.php index 3a47245b..86145625 100644 --- a/lib/formfields/admin/templates/formfield.filetemplate_add.php +++ b/lib/formfields/admin/templates/formfield.filetemplate_add.php @@ -27,6 +27,7 @@ return [ 'filetemplate_add' => [ 'title' => lng('admin.templates.template_add'), 'image' => 'fa-solid fa-plus', + 'self_overview' => ['section' => 'templates', 'page' => 'email'], 'sections' => [ 'section_a' => [ 'title' => lng('admin.templates.template_add'), diff --git a/lib/formfields/admin/templates/formfield.filetemplate_edit.php b/lib/formfields/admin/templates/formfield.filetemplate_edit.php index f4b96b83..2a731079 100644 --- a/lib/formfields/admin/templates/formfield.filetemplate_edit.php +++ b/lib/formfields/admin/templates/formfield.filetemplate_edit.php @@ -27,6 +27,7 @@ return [ 'filetemplate_edit' => [ 'title' => lng('admin.templates.template_edit'), 'image' => 'fa-solid fa-pen', + 'self_overview' => ['section' => 'templates', 'page' => 'email'], 'sections' => [ 'section_a' => [ 'title' => lng('admin.templates.template_edit'), diff --git a/lib/formfields/admin/templates/formfield.template_add.php b/lib/formfields/admin/templates/formfield.template_add.php index 3476b8c2..58d1e9ce 100644 --- a/lib/formfields/admin/templates/formfield.template_add.php +++ b/lib/formfields/admin/templates/formfield.template_add.php @@ -27,6 +27,7 @@ return [ 'template_add' => [ 'title' => lng('admin.templates.template_add'), 'image' => 'fa-solid fa-plus', + 'self_overview' => ['section' => 'templates', 'page' => 'email', 'action' => 'add'], 'sections' => [ 'section_a' => [ 'title' => lng('admin.templates.template_add'), diff --git a/lib/formfields/admin/templates/formfield.template_edit.php b/lib/formfields/admin/templates/formfield.template_edit.php index 1b92293a..912aaaa0 100644 --- a/lib/formfields/admin/templates/formfield.template_edit.php +++ b/lib/formfields/admin/templates/formfield.template_edit.php @@ -27,6 +27,7 @@ return [ 'template_edit' => [ 'title' => lng('admin.templates.template_edit'), 'image' => 'fa-solid fa-pen', + 'self_overview' => ['section' => 'templates', 'page' => 'email'], 'sections' => [ 'section_a' => [ 'title' => lng('admin.templates.template_edit'), diff --git a/lib/formfields/customer/email/formfield.emails_edit.php b/lib/formfields/customer/email/formfield.emails_edit.php index 56f01019..52af6402 100644 --- a/lib/formfields/customer/email/formfield.emails_edit.php +++ b/lib/formfields/customer/email/formfield.emails_edit.php @@ -34,7 +34,6 @@ return [ 'section_a' => [ 'title' => lng('emails.emails_edit'), 'image' => 'icons/email_edit.png', - 'nobuttons' => true, 'fields' => [ 'email_full' => [ 'label' => lng('emails.emailaddress'), @@ -120,9 +119,7 @@ return [ ] ], 'buttons' => [ - [ - 'label' => lng('panel.backtooverview') - ] + /* none */ ] ] ]; diff --git a/templates/Froxlor/form/form.html.twig b/templates/Froxlor/form/form.html.twig index 2311d393..2a732b81 100644 --- a/templates/Froxlor/form/form.html.twig +++ b/templates/Froxlor/form/form.html.twig @@ -33,14 +33,14 @@ -
+
{% if form_data.buttons is defined and form_data.buttons is iterable %} {% for btn in form_data.buttons %} - + {% endfor %} {% else %} - - + + {% endif %}