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

% content_for 'module' => begin

<div class="card-body">

    % if (config->{debug} == 1) {
        <pre>
            <%= dumper $c->current_route %>
            <%= dumper $mai_datas %>
        </pre>
    % }

    % if ( stash 'error' ) {
        <br>
        <div class="text-danger">
            <%= $c->render_to_string(inline => stash 'error') %>
        </div>
    % }

    <h1><%= $title%></h1>

    <br>

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

        <div>
            <%= l 'mai_DESC_VIRUS_SCAN' %>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                    <%= l 'mai_LABEL_VIRUS_SCAN' %>
            </div>
            <div class="col-auto">
                % param 'VirusStatus' => $mai_datas->{virusstatus} unless param 'VirusStatus';
                <%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %>
            </div>
        </div>

        <br>

        <div>
            <%= l 'mai_DESC_SPAM_SCAN' %>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_SPAM_SCAN' %>
            </div>
            <div class="col-auto">
                % param 'Spamstatus' => $mai_datas->{spamstatus} unless param 'Spamstatus';
                <%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %>
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_SPAM_SENSITIVITY' %>
            </div>
            <div class="col-auto">
                % param 'SpamSensitivity' => $mai_datas->{spamsensitivity} unless param 'SpamSensitivity';
                <%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => "form-select" %>
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_SPAM_TAGLEVEL' %>
            </div>
            <div class="col-auto">
                % param 'SpamTagLevel' => $mai_datas->{spamtaglevel} unless param 'SpamTagLevel';
                <%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => "form-select" %>
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_SPAM_REJECTLEVEL' %>
            </div>
            <div class="col-auto">
                % param 'SpamRejectLevel' => $mai_datas->{spamrejectlevel} unless param 'SpamRejectLevel';
                <%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => "form-select" %>
            </div>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_SORTSPAM' %>
            </div>
            <div class="col-auto">
                % param 'SpamSortSpam' => $mai_datas->{spamsortspam} unless param 'SpamSortSpam';
                 <%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %>
            </div>
        </div>

        <br>

        <div>
            <%= l 'mai_DESC_SPAM_SUBJECT' %>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_SPAM_SUBJECTTAG' %>
            </div>
            <div class="col-auto">
                % param 'SpamSubjectTag' => $mai_datas->{spamsubjecttag} unless param 'SpamSubjectTag';
                <%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => "form-select" %>
            </div>
        </div>

        <br>

        % param 'SpamSubject' => $mai_datas->{spamsubject} unless param 'SpamSubject';

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <label for="inputSpamSubjectTag" class="col-form-label"><%= l 'mai_LABEL_SPAM_SUBJECT' %></label>
            </div>
            <div class="col-auto">
                <!-- text_field 'Soft' -->
                <input type="text" name="SpamSubject" id="inputSpamSubjectTag" class="form-control" aria-describedby="SpamSubjectTag" value="<%= $mai_datas->{spamsubject} %>">
            </div>
        </div>



        <br>

        <div>
            <%= l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT' %>
        </div>

        <br>

        <div class="row g-3 align-items-center">
            <div class="col-md-1">
                <%= l 'mai_LABEL_CONTENT_TO_BLOCK' %>
            </div>
            <div class="col-auto">
                % param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent';
                <%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => "form-select", multiple => "1" %>
            </div>
        </div>

        <br>

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

        <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>
%end