<div>

    % my $btn = l('hos_ADD_HOSTNAME');

    %= form_for '/hostentries' => (method => 'POST') => begin

    <p>
    %= submit_button "$btn", class => ""
    <br></p>

        %= hidden_field 'trt' => $hos_datas->{trt}

    % end

    %   my %dom_hos = %{$dom_hosts};
    %  foreach my $domain ( sort ( keys %dom_hos ) ) {

    <p><br><b>
    %= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain);
    </b><br></p>
    
    <table class="table table-bordered">
    <thead>
    <tr>
            <th class="">
            %=l 'hos_HOSTNAME'
            </th>
            <th class="">
            %=l 'hos_HOSTTYPE'
            </th>
            <th class="">
            %=l 'IP_ADDRESS_OR_FQDN'
            </th>
            <th class="">
            %=l 'hos_ETHERNET_ADDRESS'
            </th>
            <th class="">
            %=l 'COMMENT'
            </th>
            <th class="">
            %=l 'ACTION'
            </th>
        </tr>
       </thead>
       <tbody>

    %   foreach (@{$dom_hos{$domain}{'HOSTS'}}) {  
        <tr>
            %= t td => (class => "") => $_->{'HostName'};
            %= t td => (class => "") => $_->{'HostType'};
            %= t td => (class => "") => $_->{'IP'};
            %= t td => (class => "") => $_->{'MACAddress'};
            %= t td => (class => "") => $_->{'Comment'};
            <td class="" style="min-width:15em">
                %my ($actionModify, $actionRemove) = '&nbsp;';
                %my $static = $_->{'static'} || "no";
                %if ($static ne 'yes') {
                    %my $modify_text = l('MODIFY');  # Localized text
                    %my $csrf_token = "TOKEN";  # CSRF token for security
                    %my $hostentries_name = $_->{'HostName'};  # hostentries name extracted from the data structure
                    %$actionModify = qq{
                                        %       <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
                    %   <button type='button' class="" title='$modify_text' > 
                    %       $modify_text
                    %   </button>
                                        %       </a>
                    %};
                    %my $remove_text = l('REMOVE');  # Localized text
                    %$csrf_token = "TOKEN";  # CSRF token for security
                    %#my $hostentries_name = $_->{'HostName'};  # hostentries name extracted from the data structure
                    %$actionRemove = qq{
                                        %       <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
                    %   <button type='button' class="" title='$remove_text' >
                    %       $remove_text
                    %   </button>
                                        %       </a>
                    %};
                %}
                <%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
            </td>
        </tr>
    %   }
    </tbody>
    </table>
     %  }
</div>
