Fix up action commands for port forwarding and printers
This commit is contained in:
parent
dfda47882d
commit
34e7331845
@ -93,7 +93,15 @@
|
|||||||
%= t td => (class => 'sme-border') => $allow
|
%= t td => (class => 'sme-border') => $allow
|
||||||
%= t td => (class => 'sme-border') => $cmmnt
|
%= t td => (class => 'sme-border') => $cmmnt
|
||||||
<td class='sme-border'>
|
<td class='sme-border'>
|
||||||
<a href="portforwardingd?CsrfDef=TOKEN&trt=DEL&sport=<%= $sport%>&proto=<%= $proto%>"><button class='sme-remove-button' title="<%=l('REMOVE')%>"><%=l('REMOVE') %></button></a>
|
%my $remove_text = l('REMOVE'); # Localized text
|
||||||
|
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||||
|
%my $actionRemove = qq{
|
||||||
|
% <button type='button' class='sme-remove-button' title='$remove_text'
|
||||||
|
% onclick="window.location.href='portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto'">
|
||||||
|
% $remove_text
|
||||||
|
% </button>
|
||||||
|
%};
|
||||||
|
<%= $c->render_to_string(inline => $actionRemove) %>
|
||||||
</td>
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
% }
|
% }
|
||||||
@ -105,4 +113,3 @@
|
|||||||
%= hidden_field 'trt' => $pf_datas->{trt}
|
%= hidden_field 'trt' => $pf_datas->{trt}
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
@ -57,7 +57,18 @@
|
|||||||
%= t td => (class => 'sme-border') => $printer->prop('Location')
|
%= t td => (class => 'sme-border') => $printer->prop('Location')
|
||||||
%= t td => (class => 'sme-border') => $address
|
%= t td => (class => 'sme-border') => $address
|
||||||
%= t td => (class => 'sme-border') => $remoteName
|
%= t td => (class => 'sme-border') => $remoteName
|
||||||
<td class='sme-border'><a href="printers2?CsrfDef=TOKEN&trt=DEL&printer=<%= $printer->key%>"><button class='sme-remove-button' title="<%=l('REMOVE')%>"><%=l('REMOVE') %></button></a></td>
|
<td class='sme-border'>
|
||||||
|
%my $remove_text = l('REMOVE'); # Localized text
|
||||||
|
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||||
|
%my $printer_name = $printer->key;
|
||||||
|
%my $actionRemove = qq{
|
||||||
|
% <button type='button' class='sme-remove-button' title='$remove_text'
|
||||||
|
% onclick="window.location.href='printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name'">
|
||||||
|
% $remove_text
|
||||||
|
% </button>
|
||||||
|
%};
|
||||||
|
<%= $c->render_to_string(inline => $actionRemove) %>
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
% }
|
% }
|
||||||
</tbody>
|
</tbody>
|
||||||
|
Loading…
Reference in New Issue
Block a user