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

% content_for 'module' => begin

<div class="card-body">

    % if (config->{debug} == 1) {
    <p>
    %= dumper $c->current_route
    %= dumper $mai_datas
    </p>
    % }
    
    % if ( stash 'error' ) {
        <br><div class="">
        %= $c->render_to_string(inline => stash 'error') 
    </div>
    %}

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

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

    %=l 'mai_DESC_POP_ACCESS_CONTROL'

    <p>
    <span class="">
    %=l 'mai_LABEL_POP_ACCESS_CONTROL'
    </span>
    <span class="">
    % param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess';
    %= select_field 'POPAccess' => $c->get_pop_opt(), class => ""
    </span>
    </p>

    %=l 'mai_DESC_IMAP_ACCESS_CONTROL'

    <p>
    <span class="">
    %=l 'mai_LABEL_IMAP_ACCESS_CONTROL'
    </span>
    <span class="">
    % param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess';
    %= select_field 'IMAPAccess' => $c->get_imap_opt(), class => ""
    </span>
    </p>

    %=l 'mai_DESC_WEBMAIL'

    <p>
    <span class="">
    %=l 'mai_LABEL_WEBMAIL'
    </span>
    <span class="">
    % param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail';
    %= select_field 'WebMail' => $c->get_webmail_opt(), class => ""
    </span>
    </p>

    %   my $btn = l('SAVE');
    %= submit_button "$btn", class => ""

    %= hidden_field 'trt' => 'ACC'
    % end    

</div>
%end
