<div>

    % my $retref= $c->stash("ret");
    % my %ret;
    % unless (length($retref)) {%ret = (ret=>"");}
    % else {%ret = %$retref;}

    % my @vars = split(",",$ret{vars});
    % my $var1 = @vars[0];
    % my $var2 = @vars[1];
    % my $var3 = @vars[2];
    % my $var4 = @vars[3];
    % my $var5 = @vars[4];
    % my $var6 = @vars[5];

    %if ($ret{'ret'} eq "") {

    %} elsif (index($ret{ret},"SUCCESS") != -1) {
       <div class="">
           <h2> Operation Status Report</h2>
            <%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6); %>
        </div>
       %} else {
       <div class="">
           <h2> Operation Status Report - Error</h2>
            <%= $c->l($ret{ret},$var1,$var2,$var3,$var4,$var5,$var6); %>
        </div>
    %}
    <br />
    % my $btn = l('ADD');
    % my $network_db = esmith::NetworksDB->open();

   % if (config->{debug} == 1) {
    <div>
        <%= dumper $c->current_route %>
        <%= dumper $c->stash("ret") %>
    </div>
    % }


    <form action="/smanager/localnetworksb" method="POST">
        <div>
            <h2><%=l "ln_ADD_TITLE" %></h2>
        </div>
        <br>
        <div>
            <%= $c->render_to_string(inline => l('ln_ADD_DESC')); %>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
              <label for="inputNetwork" class="col-form-label"><%= l "NETWORK" %></label>
            </div>
            <div class="col-auto">
              <input type="text" name="networkAddress" id="inputNetwork" class="form-control" aria-describedby="inputNetwork" >
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
              <label for="inputNetworkMask" class="col-form-label"><%= l "ln_SUBNET_MASK" %></label>
            </div>
            <div class="col-auto">
              <input type="text" name="networkMask" id="inputNetworkMask" class="form-control" aria-describedby="inputNetworkMask" >
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
              <label for="inputNetworkRouter" class="col-form-label"><%= l "ROUTER" %></label>
            </div>
            <div class="col-auto">
              <input type="text" name="networkRouter" id="inputNetworkRouter" class="form-control" aria-describedby="inputNetworkRouter" >
            </div>
        </div>

        <br><br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <button type="submit" class="btn btn-primary"><%= $btn %></button>
            </div>
        </div>
    </form>

</div>

