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

% content_for 'module' => begin

<div class="card-body">

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

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

    % if ( $notif ) {
        <br>
        <div class="text-warn">
            <%= $notif %>
        </div>
    % }

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

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

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

        <div>
            % param 'SelectedPackages' => $c->get_names2('updates','package') unless param 'SelectedPackages';
            <%= select_field 'SelectedPackages' => $c->get_options2('updates', 'package'), class => "form-select", multiple => "1"  %>
        </div>

            <!-- $c->print_skip_header() -->

        <%=  hidden_field 'trt' => 'UPDT' %>

        <br>

        % my $btn = $c->l('yum_INSTALL_UPDATES');

        <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
