% layout 'AdminLTE', title => "Sme server 2 - datetime"; % content_for 'module' => begin
% if (config->{debug} == 1) {
            <%= dumper $c->current_route %>
            <%= dumper $dat_data %>
        
% } % if ($c->stash('first')) {
<%= $c->render_to_string(inline =>$c->l($c->stash('first'))) %>
% } elsif ($c->stash('success')) {
<%= $c->l($c->stash('success')); %>
% } elsif ($c->stash('error')) {
<%= $c->l($c->stash('error')); %>
% }

<%= $title %>


<%= $modul %> % if ($dat_data->{ntpstatus} eq 'disabled') {
<%= l 'dat_NTP_ENABLE_DESC' %>
% } else { % my $current_year = $dat_data->{year}; % my $year_options = [ map { [ $_, $_ ] } ($current_year..($current_year+30)) ]; % my $month_options = [ map { [ sprintf('%02d', $_), sprintf('%02d', $_) ] } (1..12) ]; % my $hour_options = [ map { [ sprintf('%02d', $_), sprintf('%02d', $_) ] } (0..23) ]; % my $minute_options = [ map { [ sprintf('%02d', $_), sprintf('%02d', $_) ] } (0..60) ]; % my $second_options = [ map { [ sprintf('%02d', $_), sprintf('%02d', $_) ] } (0..60) ]; % my $mode_options = [ % [ $c->l('dat_ntp_server'), 'dat_ntp_server' ], % [ $c->l('dat_manually_set'), 'dat_manually_set' ] % ];

<%= $c->l('Time Configuration') %>


<%= label_for time_mode => $c->l('Time Setting Mode:') %>
% param 'time_mode' => $dat_data->{time_mode} unless param 'time_mode'; <%= select_field time_mode => ($mode_options, id => 'time_mode_select'), class => "form-select" %>

<%= $c->l('dat_NTP_CONFIGURE_DESC') %>

% my $server_check = '^([a-zA-Z0-9][a-zA-Z0-9\.\-]{0,253}[a-zA-Z0-9]|(\d{1,3}\.){3}\d{1,3})$'; % param 'ntpserver' => $dat_data->{ntpserver} unless param 'ntpserver';

<%= $c->l('dat_NTP_DISABLE_DESC') %>

<%= $c->l('dat_set_manually') %>


<%= $c->l('Date') %>
<%= $c->l('Year:') %>
% param 'year' => ($dat_data->{year}) unless param 'year'; <%= select_field year => ($year_options, id => 'year'), required => 'required', class=> "form-select" %>
<%= $c->l('Month:') %>
% param 'month' => ($dat_data->{month}) unless param 'month'; <%= select_field month => ($month_options, id => 'month'), required => 'required', class=> "form-select" %>
% param 'day' => ($dat_data->{day}) unless param 'day';

<%= $c->l('Time') %>
<%= $c->l('Hour:') %>
% param 'hour' => ($dat_data->{hour}) unless param 'hour'; %= select_field hour => ($hour_options, id => 'hour'), required => 'required', class=> "form-select"
%= label_for minute => $c->l('Minute:')
% param 'minute' => ($dat_data->{minute}) unless param 'minute'; %= select_field minute => ($minute_options, id => 'minute'), required => 'required', class=> "form-select", inputmode => 'numeric' %#= text_field minute => id => 'minute', size => 2, maxlength => 2, placeholder => 'MM', pattern => '^[0-5][0-9]$', title => 'Minute (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off'
%= label_for second => $c->l('Second:')
% param 'second' => ($dat_data->{second}) unless param 'second'; %= select_field minute => ($second_options, id => 'minute'), required => 'required', class=> "form-select" , inputmode => 'numeric'

<%= l 'dat_TZ' %>
% param 'Timezone' => $c->getTimezone() unless param 'Timezone'; <%= select_field 'Timezone' => $c->getZone_list(), class => "form-select" %>

<%= hidden_field 'Old_ntpstatus' => $dat_data->{ntpstatus}; %> <%= hidden_field 'trt' => $dat_data->{trt}; %> <% my $btn = l('SAVE'); %>
% }
% end 1;