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

% content_for 'module' => begin

<div class="card-body">

    %if (config->{debug} == 1) {
    <p>
    (DBG)route: <%= $c->current_route %><br>
    (DBG)pdc: <%= $wkg_datas->{ServerRole}%><br>
    (DBG)roam: <%= $wkg_datas->{RoamingProfiles}%><br>
    </p>
    %}
    
    <h1><%= $title %></h1>
    <br>
    <%= $modul %>
    <%  my $btn = l('SAVE');
     %>

    %= form_for 'workgroup' => (method => 'POST') => begin
    <p>
    %=l 'wkg_DESC_WORKGROUP', class => ""
    <br><br>
    <span class="">
    %=l 'wkg_LABEL_WORKGROUP', class => ""
    </span>
    <span class="">
    %= text_field 'Workgroup' =>  $wkg_datas->{Workgroup}, class => "" , pattern=>".{1,15}", title=>"Limited to 15 characters by the NETBIOS"
    </span>
    </p>
    <p>
    %=l 'wkg_DESC_SERVERNAME', class => ""
    <br><br>
    <span class="">
    %=l 'wkg_LABEL_SERVERNAME', class => ""
    </span>
    <span class="">
    %= text_field 'ServerName' =>  $wkg_datas->{ServerName}, class => ""
    </span>
    </p>
    <p>
        %= $c->render_to_string(inline => l 'wkg_DESC_PDC')
    <br>
    <span class="">
    %=l 'wkg_LABEL_PDC', class => ""
    </span>
    <span class="">
    % param 'ServerRole' => $wkg_datas->{ServerRole} unless param 'ServerRole';
    %= select_field 'ServerRole' =>  [[ (l 'YES') => 'PDC'], [ (l 'NO') => 'WS']], class => ""
    </span>
    </p>
    <p>
        %= $c->render_to_string(inline => l 'wkg_DESC_ROAM')
    <br>
    <span class="">
    %=l 'wkg_LABEL_ROAM', class => ""
    </span>
    <span class="">
    % param 'RoamingProfiles' => $wkg_datas->{RoamingProfiles} unless param 'RoamingProfiles';
    %= select_field 'RoamingProfiles' =>  [[ (l 'YES') => 'yes'], [ (l 'NO') => 'no']], class => ""
    </span>
    </p>
    <p>
    <br>
    %= submit_button "$btn", class => ""
    </p>
    % end    

</div>
%end