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

% content_for 'module' => begin

<div class="card-body">

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

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

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

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

    <h2>
    %=l 'bac_WORKSTN_RESTORE'
    </h2>

    <br><br>
    % if ($bac_datas->{status} ne 'enabled') {
    %= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE'))
    % } else {
    %= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_WORKSTN_DESC') . ' ' . $c->get_shared_folder_to_verify())
    %}

    <br><br><span class="">
    %=l 'bac_SELECT_BACKUP_FILE'
    </span>
    <span class="">
    %= select_field 'Backupset' => $c->get_Backupset_options(), class => ""
    </span><br><br>

    %= hidden_field 'Function' => $bac_datas->{'function'}
    %= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => ""
    % end
</div>
% end