diff options
author | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2022-05-01 22:06:03 +0200 |
---|---|---|
committer | Jannis M. Hoffmann <jannis.hoffmann@rwth-aachen.de> | 2022-05-01 22:06:03 +0200 |
commit | 72ae9b3f63ddbe296f3e4e8f8db2d29303163d68 (patch) | |
tree | f0db960b784719df0c7318720880c73b5330b937 /templates/headers/_display_bot_nav.html.ep | |
parent | 7c8bd21ccbca8a3166289ab0e5511cc82d2822aa (diff) |
use more tag helpers in templates
Diffstat (limited to 'templates/headers/_display_bot_nav.html.ep')
-rw-r--r-- | templates/headers/_display_bot_nav.html.ep | 32 |
1 files changed, 14 insertions, 18 deletions
diff --git a/templates/headers/_display_bot_nav.html.ep b/templates/headers/_display_bot_nav.html.ep index 107ac67..ea1ce3c 100644 --- a/templates/headers/_display_bot_nav.html.ep +++ b/templates/headers/_display_bot_nav.html.ep @@ -12,34 +12,30 @@ </td> <td> - <label for=allbox><%= l 'check_all' %>: </label> - <input name=allbox type=checkbox onclick="check_all(this);"> + <label for=allbox><%= l 'check_all' %></label>: + <input name=allbox type=checkbox onclick="check_all(this)"> </td> <td> - <form id=move-mail action="<%= url_for('move') %>" method=post> - <label for=select-folder> <%= l('move') . ' ' . l('to') %> </label> - <select name=folder id=select-folder> - %== "<option value='$_'>$_</option>" for grep {$_ ne $folder} @$mail_folders; - </select> - + %= form_for move => (id => 'move-mail') => begin + %= label_for 'select-folder' => l('move') . ' ' . l('to') + %= select_field folder => [grep {$_ ne $folder} @$mail_folders] => (id => 'select-folder') %= csrf_field - - <input type="submit" value="<%= l 'move' %>"> - </form> + %= submit_button l 'move' + % end </td> </tr> </table> -<script> +<script type="text/javascript"> function check_all(box) { - const setTo = box.checked; - const mails = document.getElementById('mail-headers').tBodies[0].rows; + const setTo = box.checked; + const mails = document.getElementById('mail-headers').tBodies[0].rows; - for (const m of mails) { - m.lastElementChild.children[0].checked = setTo; - } + for (const m of mails) { + m.lastElementChild.children[0].checked = setTo; + } } -</script>
\ No newline at end of file +</script> |