<div>

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

    <form action="/smanager/hostentriesd" method="POST">

        % if ( $hos_datas->{trt} eq "ADD" ) {
            <h2><%=l 'hos_CREATE_TITLE' %></h2>
        % } else {
              <h2><%=l 'hos_MODIFY_TITLE' %></h2>
              % $btn = l('MODIFY');
         % }

        <div>
            <%= l 'hos_HOSTNAME_DESCRIPTION' %>
        </div>
        <br>
        <div class="row g-3 align-items-center">
            <div class="col-md-2">
                <%=l 'hos_HOSTNAME' %>
            </div>
            <div class="col-auto">
            % if ( $hos_datas->{trt} eq "ADD" ) {
                % param 'Name' => $hos_datas->{name} unless param 'Name';
                <%= text_field 'Name' %>
           % } else {
               <%= hidden_field 'Name' => $hos_datas->{name} %>
               <%= $hos_datas->{name} %>
           % }
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-2">
                <%= l 'DOMAIN' %>
            </div>

            <div class="col-auto">
             % if ( $hos_datas->{trt} eq "ADD" ) {
                 % param 'Domain' => $hos_datas->{domain} unless param 'Domain';
                 <%= select_field 'Domain', $c->domains_list() %>
             % } else {
                 <%= hidden_field 'Domain' => $hos_datas->{domain} %>
                 <%= $hos_datas->{domain} %>
             % }
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-2">
                <label for="inputHostComment" class="col-form-label"><%= $c->l('COMMENT', ''); %></label>
            </div>
            <div class="col-auto">
                % param 'Comment' => $hos_datas->{comment} unless param 'Comment';
                <input type="text" name="Comment" id="inputHostComment" class="form-control" aria-describedby="inputHostComment" value="<%= $hos_datas->{comment} %>">

            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-2">
             <%=l 'LOCATION' %>
            </div>
            <div class="col-auto">
               % param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
               <%= select_field 'Hosttype', $c->hosttype_list(), class => "form-select"; %>
            </div>
        </div>

        <br>

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

         <%= hidden_field 'trt' => $hos_datas->{trt} %>
         <%= hidden_field 'Hostname' => $hos_datas->{hostname} %>
         <%= hidden_field 'Internalip' => $hos_datas->{internalip} %>
         <%= hidden_field 'Externalip' => $hos_datas->{externalip} %>
         <%= hidden_field 'Macaddress' => $hos_datas->{macaddress} %>

    </form>

</div>
