From afbc16cec0f9d25e945668a54364c4b6a732c423 Mon Sep 17 00:00:00 2001 From: "Jannis M. Hoffmann" Date: Wed, 27 Sep 2023 23:12:21 +0200 Subject: add remove button for frontend --- templates/displayheaders/_bot_nav.html.ep | 55 ++++++++++++++++------------ templates/displayheaders/_main_table.html.ep | 2 +- 2 files changed, 33 insertions(+), 24 deletions(-) (limited to 'templates/displayheaders') diff --git a/templates/displayheaders/_bot_nav.html.ep b/templates/displayheaders/_bot_nav.html.ep index a6d089c..5da5026 100644 --- a/templates/displayheaders/_bot_nav.html.ep +++ b/templates/displayheaders/_bot_nav.html.ep @@ -1,35 +1,44 @@
-
- %= include 'displayheaders/_pagination1' -
+
+ %= include 'displayheaders/_pagination1' +
-
- % if (grep {$_ ne $folder} @$mail_folders) { - %= form_for move => (id => 'move-mail') => begin +
+ % if (grep {$_ ne $folder} @$mail_folders) { + %= form_for move => (id => 'move-mail') => begin -
-
- %= label_for 'select-folder' => l('move to') => (class => 'label') -
-
-
-
-
- %= select_field folder => [map { $_ ? $_ : l 'Home' } grep {$_ ne $folder} @$mail_folders] -
-
- %= csrf_field -
- %= submit_button l('move') => (class => 'button') +
+
+ %= label_for 'select-folder' => l('move to') => (class => 'label') +
+
+
+
+
+ %= select_field folder => [map { $_ ? $_ : l 'Home' } grep {$_ ne $folder} @$mail_folders]
+ %= csrf_field +
+ %= submit_button l('move') => (class => 'button') +
+
+ + % end + % } +
- % end - % } -
+
+ %= form_for 'remove/'.$folder => (id => 'remove-mail') => (method => 'POST') => begin + %= csrf_field +
+ %= submit_button l('remove') => (class => 'button') +
+ % end +
diff --git a/templates/displayheaders/_main_table.html.ep b/templates/displayheaders/_main_table.html.ep index c88e125..6ba33fa 100644 --- a/templates/displayheaders/_main_table.html.ep +++ b/templates/displayheaders/_main_table.html.ep @@ -42,7 +42,7 @@
- %= check_box mail => $msg->{message_handle} => (form => 'move-mail') => (class => 'jwm-mail-checkbox') + %= check_box mail => $msg->{message_handle} => (form => 'move-mail') => (form => 'remove-mail') => (class => 'jwm-mail-checkbox')
% end -- cgit v1.2.3