From 34e7331845948c4835e350aa8ffd7a04b2ffcae7 Mon Sep 17 00:00:00 2001 From: Brian Read Date: Mon, 16 Dec 2024 13:55:52 +0000 Subject: [PATCH] Fix up action commands for port forwarding and printers --- .../default/templates/partials/_pf_list.html.ep | 13 ++++++++++--- .../default/templates/partials/_prt_list.html.ep | 15 +++++++++++++-- 2 files changed, 23 insertions(+), 5 deletions(-) diff --git a/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep index 17936a3..1f1bcd3 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_pf_list.html.ep @@ -93,7 +93,15 @@ %= t td => (class => 'sme-border') => $allow %= t td => (class => 'sme-border') => $cmmnt - + %my $remove_text = l('REMOVE'); # Localized text + %my $csrf_token = "TOKEN"; # CSRF token for security + %my $actionRemove = qq{ + % + %}; + <%= $c->render_to_string(inline => $actionRemove) %> % } @@ -104,5 +112,4 @@ %= hidden_field 'trt' => $pf_datas->{trt} - - + \ No newline at end of file diff --git a/root/usr/share/smanager/themes/default/templates/partials/_prt_list.html.ep b/root/usr/share/smanager/themes/default/templates/partials/_prt_list.html.ep index 2e5efe1..5fc1767 100644 --- a/root/usr/share/smanager/themes/default/templates/partials/_prt_list.html.ep +++ b/root/usr/share/smanager/themes/default/templates/partials/_prt_list.html.ep @@ -57,7 +57,18 @@ %= t td => (class => 'sme-border') => $printer->prop('Location') %= t td => (class => 'sme-border') => $address %= t td => (class => 'sme-border') => $remoteName - + + %my $remove_text = l('REMOVE'); # Localized text + %my $csrf_token = "TOKEN"; # CSRF token for security + %my $printer_name = $printer->key; + %my $actionRemove = qq{ + % + %}; + <%= $c->render_to_string(inline => $actionRemove) %> + % } @@ -66,4 +77,4 @@

- + \ No newline at end of file