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

% content_for 'module' => begin

<div class="card-body">

    %if (config->{debug} == 1) {
    <p>
    (DBG)route: <%= $c->current_route %><br>
    </p>
    %}
    <h1><%= $title %></h1>
    <br>
    <%= $notif %>
    <%  my $btn = l('NEXT'); %>

    %= form_for 'viewlogfiles' => (method => 'POST') => begin
    <p>
    %=l 'log_FIRSTPAGE_DESC'
    <br>
    <span class="">
    %=l 'log_LOG_FILE_SELECT_DESC'
    </span>
    <span class="">
    % param 'Filename' => 'messages';
    <!-- select_field 'Filename' => [['toto'], ['tata']], class => "" -->
    %= select_field 'Filename' => $c->findlogFiles(), class => ""
    </span>
    </p>

    <p>
    %=l 'log_FILTER_PATTERN_DESC'
    <br>
    <span class="">
    %=l 'log_FILTER_PATTERN_LABEL'
    </span>
    <span class="">
    %= text_field 'Matchpattern', class => ""
    </span>
    </p>

    <p>
    %=l 'log_MATCH_PATTERN_DESC'
    <br>
    <span class="">
    %=l 'log_MATCH_PATTERN_LABEL'
    </span>
    <span class="">
    %= text_field 'Highlightpattern', class => ""
    </span>
    </p>

    <p>
    %=l 'log_OP_DESC'
    <br>
    <span class="">
    %=l 'log_OP_LABEL'
    </span>
    <span class="">
    %if ($log_datas->{'default_op'} eq 'download') {
        % param 'Operation' => 'download';
    %}
    %= select_field 'Operation' => [[(l 'log_VIEW') => 'view'],[(l 'DOWNLOAD') => 'download']], class => ""
    </span>
    </p>

    <p>
    %=l 'log_END_DESC'
    </p>

    %= submit_button "$btn", class => ""
    % end
</div>
%end
