% layout 'default', title => "Sme server 2 - DHCP Manager", share_dir => './'; % content_for 'module' => begin
% if ($config->{debug} == 1) {

%= dumper $c->current_route

% }

<%=$title%>

%= $modul %if ($dhcp_data->{first}) {

%=$c->render_to_string(inline =>$c->l($dhcp_data->{first}))

%} elsif ($dhcp_data->{success}) {

Operation Status Report - success

%= $c->l($dhcp_data->{success});

%} elsif ($dhcp_data->{error}) {

Operation Status Report - error

%= $c->l($dhcp_data->{error});

%} elsif ($dhcp_data->{error}) {

Operation Status Report - warning

%= $c->l($dhcp_data->{error});

%} % if ($dhcp_data->{trt} eq 'LEASES') { %= include 'partials/_dhcpd_leases' %} elsif ($dhcp_data->{trt} eq 'SCAN') { %= include 'partials/_dhcpd_scan' %} else { #PARAMS % my $ip_regex = '^((\d{1,2}|1\d\d|2[0-4]\d|25[0-5])\.){3}(\d{1,2}|1\d\d|2[0-4]\d|25[0-5])$';
%= button_to $c->l('dhcpd_CONNECTED_IP') => '/dhcpd1', onclick=>"showSpinnerLeases()", id=>"scanLeases" %= button_to $c->l('dhcpd_SCAN_YOUR_NETWORK') => '/dhcpd3', onclick=>"showSpinnerNetwork()", id=>"scanNetwork"

%= $c->l("dhcpd_DHCPD_SETTINGS_TITLE")

% my $btn = l('dhcpd_SAVE/RESTART'); %= form_for '/dhcpd5' => (method => 'POST') => begin %=l 'dhcpd_CHECK_CLIENT_STATUS' % param dhcp_check=>$dhcp_data->{"params"}->{"check"}; %=select_field dhcp_check=>$dhcp_data->{"check"}

%=l 'dhcpd_STATUS_DHCP_SERVER' % param dhcp_enable=>$dhcp_data->{"params"}->{"status"}; %=select_field dhcp_enable=>$dhcp_data->{"status"}
%=l 'dhcpd_DHCP_START' % param dhcp_start=>$dhcp_data->{"params"}->{"start"}; %=text_field 'dhcp_start',minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"
%=l 'dhcpd_DHCP_END' % param dhcp_end=>$dhcp_data->{"params"}->{"end"}; %=text_field 'dhcp_end',minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"

%= $c->l("dhcpd_CUSTOM_WINSERVER_TITLE");
%=l 'dhcpd_CUSTOM_WINSERVER_STATUS' % param dhcp_winscustom=>$dhcp_data->{"params"}->{"winscustom"}; %=select_field dhcp_winscustom=>$dhcp_data->{"status"}
%=l 'dhcpd_CUSTOM_WINSERVER_ADDRESS' % param dhcp_winsserver=>$dhcp_data->{"smbparams"}->{"WINSServer"}; %=text_field 'dhcp_winsserver' ,minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"

%= $c->l("dhcpd_CUSTOM_DNS_TITLE");
%=l 'dhcpd_CUSTOM_DNS_STATUS' % param dhcp_dnscustom=>$dhcp_data->{"params"}->{"dnscustom"}; %=select_field dhcp_dnscustom=>$dhcp_data->{"status"}
%=l 'dhcpd_PRIMARY_DNS_ADDRESS' % param dhcp_dns1server=>$dhcp_data->{"params"}->{"dns1server"}; %=text_field 'dhcp_dns1server' ,minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"
%=l 'dhcpd_SECONDARY_DNS_ADDRESS' % param dhcp_dns2server=>$dhcp_data->{"params"}->{"dns2server"}; %=text_field 'dhcp_dns2server' ,minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"
%=l 'dhcpd_TERTIARY_DNS_ADDRESS' % param dhcp_dns3server=>$dhcp_data->{"params"}->{"dns3server"}; %=text_field 'dhcp_dns3server' ,minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"
%= $c->l("dhcpd_CUSTOM_GATEWAY_TITLE");
%=l 'dhcpd_CUSTOM_GATEWAY_STATUS' % param dhcp_gatewaycustom=>$dhcp_data->{"params"}->{"gatewaycustom"}; %=select_field dhcp_gatewaycustom=>$dhcp_data->{"status"}
%=l 'dhcpd_CUSTOM_GATEWAY_ADDRESS' % param dhcp_gateway=>$dhcp_data->{"params"}->{"gateway"}; %=text_field 'dhcp_gateway' ,minlength=>'7',maxlength=>"15",size=>"15",placeholder=>"nnn.nnn.nnn.nnn", pattern=>"$ip_regex"

%= $c->l("dhcpd_CUSTOM_LEASETIME_TITLE");
%=l 'dhcpd_CUSTOM_LEASETIME' % param dhcp_leasetime=>$dhcp_data->{"params"}->{"leasetime"}; %=number_field 'dhcp_leasetime'

%= submit_button "$btn", class => 'action' % end %}
%= javascript begin if (document.getElementById("load")){document.getElementById("load").style.display="none";} if (document.getElementById("loadingNetwork")){document.getElementById("loadingNetwork").style.display="none";} function showSpinnerLeases(){ document.getElementById("scanLeases").style.display="none"; document.getElementById("load").style.display="inline"; } function showSpinnerNetwork(){ document.getElementById("scanNetwork").style.display="none"; document.getElementById("loadingNetwork").style.display="inline"; } %end %= stylesheet begin .spinnerButtonOverlay, .spinnerButtonOverlay:hover, .spinnerButtonOverlay:any-link , .spinnerButtonOverlay:focus , .spinnerButtonOverlay:active { appearance: auto; user-select: none; align-items: flex-start; cursor: default; box-sizing: border-box; background-color: #efefef; color: black; padding: 1px 6px; border-width: 2px; border-style: outset; border-color: darkgrey; border-image: initial; } %end %end 1;