Edit template for controller - Refine params copy and bring DB opens up to spec with UTF8
This commit is contained in:
122
output/Portforwarding/AdminLTE/_pf_add.html.new.ep
Normal file
122
output/Portforwarding/AdminLTE/_pf_add.html.new.ep
Normal file
@@ -0,0 +1,122 @@
|
||||
<div>
|
||||
|
||||
% my $retref = $c->stash("ret");
|
||||
% my %ret = $retref ? %$retref : (ret => "");
|
||||
% my @vars = split(/,/, $ret{vars} // "");
|
||||
% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars;
|
||||
|
||||
<br>
|
||||
|
||||
% if (config->{debug} == 1) {
|
||||
<pre>
|
||||
<%= dumper $c->current_route %>
|
||||
<%= dumper $c->stash("ret") %>
|
||||
</pre>
|
||||
% }
|
||||
|
||||
% if ($ret{"ret"} eq "") {
|
||||
<div>
|
||||
<%= $c->render_to_string(inline => l("pf_FIRST_PAGE_DESCRIPTION")); %>
|
||||
</div>
|
||||
% } elsif (index($ret{ret},"SUCCESS") != -1) {
|
||||
<div>
|
||||
<!--<h2> Operation Status Report</h2>-->
|
||||
<%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) %>
|
||||
</div>
|
||||
% } else {
|
||||
<div class="text-danger">
|
||||
<!--<h2> Operation Status Report - Error</h2>-->
|
||||
<%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) %>
|
||||
</div>
|
||||
% }
|
||||
|
||||
<br>
|
||||
|
||||
<h2><%= l "pf_CREATE_RULE" %></h2>
|
||||
|
||||
<form action="/smanager/portforwardingb" method="POST">
|
||||
|
||||
<br>
|
||||
<div>
|
||||
<%= l "pf_SUMMARY_ADD_DESC" %>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<%= l "Protocol" %>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<%=select_field "proto"=>["TCP","UDP"], class => "form-select" %>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<label for="inputSourcePort" class="col-form-label"><%= l "pf_LABEL_SOURCE_PORT" %></label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" name="sport" id="inputSourcePort" class="form-control" aria-describedby="Source Port">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<label for="inputDestinationPort" class="col-form-label"><%= l "pf_LABEL_DESTINATION_PORT" %></label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" name="port" id="inputDestinationPort" class="form-control" aria-describedby="Destination Port">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<label for="inputDestinationHost" class="col-form-label"><%= l "pf_LABEL_DESTINATION_HOST" %></label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" name="dhost" id="inputDestinationHost" class="form-control" aria-describedby="Destination Host">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<label for="inputAllowHosts" class="col-form-label"><%= l "pf_ALLOW_HOSTS" %></label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" name="allow" id="inputAllowHosts" class="form-control" aria-describedby="Allow Hosts">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<label for="inputRuleComment" class="col-form-label"><%= l "pf_RULE_COMMENT" %></label>
|
||||
</div>
|
||||
<div class="col-auto">
|
||||
<input type="text" name="cmmnt" id="inputRuleComment" class="form-control" aria-describedby="Comment">
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<br>
|
||||
|
||||
% my $btn = l("ADD");
|
||||
|
||||
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-1">
|
||||
<button type="submit" class="btn btn-primary btn-sm"><%= $btn %></button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
</div>
|
Reference in New Issue
Block a user