% layout 'AdminLTE', title => "Sme server 2 - clamav";

% content_for 'module' => begin

<div class="card-body">

    % if (config->{debug} == 1) {
    <pre>
        Route: <%= dumper $c->current_route %><br>
        FsS stat: <%= dumper $clm_datas->{FilesystemScan}%> <br>
        Quar stat: <%= dumper $clm_datas->{Quarantine} %>
    </pre>
    % }

    <h1><%= $title %></h1>
    <!-- reetp This $module should be split ijto two lines -->
    <%= $modul %> 
    
    <br><br>
    
    <form action="/smanager/clamav" method="POST">
        
        <div class="row g-3 align-items-center">
            <div class="col-md-2">
                <%= l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD' %>:
            </div>
            <div class="col-md-2">
                % param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan';
                <%= select_field 'FilesystemScan' =>  [[ (l 'clm_DAILY') => 'daily'], [ (l 'clm_NEVER') => 'disabled'], [ (l 'clm_WEEKLY') => 'weekly']], class => "form-select" %>
            </div>
        </div>
        
        <br>
        
        <div class="row g-3 align-items-center">
            <div class="col-md-2">
                <%= l 'clm_LABEL_QUARANTINE' %>:
            </div>
            <div class="col-md-2">
                % param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine';
                <%= select_field 'Quarantine' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => "form-select" %>
            </div>
        </div>
        
        <br>
        
        <div>
            <div>
                <h6><%= l 'clm_LABEL_CLAM_VERSIONS' %>:</h6>
            </div>
            <div>
                <%= $clm_datas->{clam_versions} %>
            </div>
        </div>
        
        <br>

        <%  my $btn = l('SAVE'); %>

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

    </form>
</div>
%end
