Compare commits
	
		
			10 Commits
		
	
	
		
			11_0_0-110
			...
			11_0_0-118
		
	
	| Author | SHA1 | Date | |
|---|---|---|---|
| 022b85bd69 | |||
| c6f8378881 | |||
| d720304f1a | |||
| 371a05379f | |||
| 7cb9591eb8 | |||
| a0524a7484 | |||
| 687e763684 | |||
| 74c9beb587 | |||
| 6475521528 | |||
| a3fda90a85 | 
| @@ -3,16 +3,14 @@ | ||||
|  | ||||
|     $haveSSL = (exists ${modSSL}{status} and ${modSSL}{status} eq "enabled") ?  'yes' : 'no'; | ||||
|     $plainTextAccess = ${'httpd-admin'}{PermitPlainTextAccess} || 'no'; | ||||
|     $plainPort = ${'httpd-e-smith'}{TCPPort} || '80'; | ||||
|     $adminPort2 = ${'smanager'}{TCPPort} || '982'; | ||||
|     $adminAccess = ${'smanager'}{access} || 'private'; | ||||
|     $sslPort = ${modSSL}{TCPPort} || '443'; | ||||
|  | ||||
|     $OUT = ''; | ||||
|  | ||||
|     foreach $place ('smanager') | ||||
|     { | ||||
|         if (($port eq $plainPort) && ($haveSSL eq 'yes') && ($plainTextAccess ne 'yes')) | ||||
|         if (($port eq $httpPort) && ($haveSSL eq 'yes') && ($plainTextAccess ne 'yes')) | ||||
|         { | ||||
|             $OUT .= '    RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1$' . "\n"; | ||||
|             $OUT .= "    RewriteRule ^/$place(/.*|\$)    https://%{HTTP_HOST}/$place\$1 [L,R]\n"; | ||||
| @@ -24,14 +22,18 @@ | ||||
|         $OUT .= "    ProxyPreserveHost On\n"; | ||||
|         $OUT .= "    ProxyPass /$place http://127.0.0.1:$adminPort2 keepalive=On\n"; | ||||
|         $OUT .= "    ProxyPassReverse /$place http://127.0.0.1:$adminPort2\n"; | ||||
|         $OUT .= "    RequestHeader set X-Forwarded-Proto 'http'\n"; | ||||
|         if ($port eq $httpsPort) | ||||
|         { | ||||
|             # mod_auth_tkt needs to know the protocol to write  307 redirection | ||||
|             $OUT .= "    RequestHeader set X-Forwarded-Proto \"https\"\n"; | ||||
|         } | ||||
|  | ||||
|         $OUT .= "    <Location '/$place'>\n"; | ||||
|         if ($port eq $plainPort) | ||||
|         if ($port eq $httpPort) | ||||
|         { | ||||
|             $OUT .= '        Require ip 127.0.0.1' . "\n"; | ||||
|         } | ||||
|         elsif (($haveSSL eq 'yes') && ($port eq $sslPort) && ($adminAccess eq 'public')) | ||||
|         elsif (($haveSSL eq 'yes') && ($port eq $httpsPort) && ($adminAccess eq 'public')) | ||||
|         { | ||||
|             $OUT .= "#       public access requested in conf db\n"; | ||||
|             $OUT .= "        Require all granted\n"; | ||||
| @@ -40,15 +42,25 @@ | ||||
|             $OUT .= "        Require ip $localAccess $externalSSLAccess\n"; | ||||
|         } | ||||
|         # any smanager script or style added in line should be hashed and added here to run in a modern browser | ||||
|         $OUT .= "                   Header set Content-Security-Policy  \"script-src 'self' 'unsafe-eval' 'unsafe-hashes' " | ||||
|         ." 'sha256-X8Qwlk0M9iDTQZqFVpbVcThRjBqQXpwTOZCLX8I+Frk=' 'sha256-inQ04nmqTZI75Z5g/tAzjahedNugPFfrhxHyoFezFkM=' 'sha256-5IsIX+Vbow7wwy2RjR3+5X06R/0CQZPkw3OHj/228cM=' 'sha256-tfVskwioRaNsV75h89itf7FujMgIrodfs1Ea4UAJNpE=' 'sha256-P51OyslUh5bGkoWk9qY+o4Su4HuwNFoQcFCeNxF7Ms8=' ; " | ||||
|         $OUT .= "        Header set Content-Security-Policy  \"script-src 'self' 'unsafe-eval' 'unsafe-hashes' " | ||||
|         # list of hashes for script-src we accept and reference to find them | ||||
|         ." 'sha256-T5nv1LP9Xxdv7I1tsdTYprjvwoZyVEvfe8Y4TLx59pk='" # $(document).ready(function() \{    $('#tognav').click(function()  | ||||
|         ." 'sha256-TxVHbw3t1mXreukND/yBI+H+CscZDpyxPoNoBrRhmSE=' " # (function($) \{    $.fn.swapClass = function(class1, class2)  | ||||
|         ." 'sha256-30Xxu25YbRvjbQ2ngJ8EyneSz0No788PqjM9XbQh+qM=' " # ...const togglePassword... | ||||
|         ." 'sha256-5PrS/6zSCY/wROLKhAm4ymOuYsfvvScrC9Vp8FtOpxU=' " # nutups:316 window.onload = function() \{		SelectInput();  | ||||
|         ." 'sha256-pxCVW6zyLaFSTIpOP2p4ULot8y+QsEmSEjKE54zDTWQ=' " # nutups:317 window.onload = function() \{   SelectInput(); | ||||
|         #." 'sha256-X8Qwlk0M9iDTQZqFVpbVcThRjBqQXpwTOZCLX8I+Frk=' 'sha256-inQ04nmqTZI75Z5g/tAzjahedNugPFfrhxHyoFezFkM=' 'sha256-5IsIX+Vbow7wwy2RjR3+5X06R/0CQZPkw3OHj/228cM=' 'sha256-tfVskwioRaNsV75h89itf7FujMgIrodfs1Ea4UAJNpE=' 'sha256-P51OyslUh5bGkoWk9qY+o4Su4HuwNFoQcFCeNxF7Ms8=' " #need valiation if still needed | ||||
|         ." ; " | ||||
|         ." style-src 'self'  'unsafe-hashes' " | ||||
|         #'sha256-EhT63KK1JBrsUM27H+5RMNifDFpVB+GXcTtavKXwCK8=' #h2l1 | ||||
|         #'sha256-msdEhWmYTu7vqzGaQHDfvy6lzlDsbKkouwvN2R6Co9E=' #busy-indicator | ||||
|         #'sha256-iYwYhiMcsGmXCUzLEpEzZNz5dINrlkqf1sLbLhEcqGM=' _footer.html.ep style="position:relative;" | ||||
|         #'sha256-bOTFT8zacR4Rfja/WIKXgAQQXVaPyG3oBlvAhU4ga8g=' _usr_list style="min-width:35em" | ||||
|         #'sha256-CP93jJ1Y8nMwUoDzFbo1srdgsbADPasAc0Wjig1ahpY=' groups style="min-width:15em" | ||||
|         ." 'sha256-msdEhWmYTu7vqzGaQHDfvy6lzlDsbKkouwvN2R6Co9E=' 'sha256-iYwYhiMcsGmXCUzLEpEzZNz5dINrlkqf1sLbLhEcqGM='  'sha256-bOTFT8zacR4Rfja/WIKXgAQQXVaPyG3oBlvAhU4ga8g=' 'sha256-CP93jJ1Y8nMwUoDzFbo1srdgsbADPasAc0Wjig1ahpY=' 'sha256-EhT63KK1JBrsUM27H+5RMNifDFpVB+GXcTtavKXwCK8=' ;" | ||||
|         # list of hashes for  style-src we accept and reference to find them   | ||||
|         ." 'sha256-EhT63KK1JBrsUM27H+5RMNifDFpVB+GXcTtavKXwCK8=' " #h2l1 | ||||
|         ." 'sha256-msdEhWmYTu7vqzGaQHDfvy6lzlDsbKkouwvN2R6Co9E=' " # busy-indicator | ||||
|         ." 'sha256-iYwYhiMcsGmXCUzLEpEzZNz5dINrlkqf1sLbLhEcqGM=' " # _footer.html.ep style="position:relative;" | ||||
|         ." 'sha256-bOTFT8zacR4Rfja/WIKXgAQQXVaPyG3oBlvAhU4ga8g=' " # _usr_list style="min-width:35em" | ||||
|         ." 'sha256-CP93jJ1Y8nMwUoDzFbo1srdgsbADPasAc0Wjig1ahpY=' " # groups style="min-width:15em" | ||||
|         ." 'sha256-0Mf27W7YqYYDBxV28E9yUhPk/SHgCYEyL73kR5dJkDM=' " # useraccounts:410 useraccounts:506 and useraccounts:602 style = background:pink; | ||||
|         ." 'sha256-65hozXHuXYaN7oOyWz8cFCjqLsPmy6O7++aP2PECi5M=' " # legacypanel:306 style="width:99%;height:1784px; | ||||
|         ." ;" | ||||
| 	." \"\n";  | ||||
| 	$OUT .= "    </Location>\n"; | ||||
|         # prevent caching of manager files in browser | ||||
|   | ||||
| @@ -120,6 +120,20 @@ sub do_display { | ||||
|         } | ||||
|         $c->stash(useraccounts => \@useraccounts); | ||||
|     } ## end if ($trt eq 'LIST') | ||||
|      | ||||
| 	my $cdb = esmith::ConfigDB::UTF8->open_ro || die "Couldn't open configuration db"; | ||||
|     my $rec = $cdb->get('passwordstrength'); | ||||
| 	$usr_datas{passwdlength} = ($rec ? ($rec->prop('length') || 12) : 12); | ||||
| 	if ($trt eq 'PWS'){ | ||||
| 		$usr_datas{passwdstrength} = ($rec ? ($rec->prop('Admin') || 'none') : 'none'); | ||||
| 	} else { | ||||
| 		$usr_datas{passwdstrength} = ($rec ? ($rec->prop('Users') || 'none') : 'none'); | ||||
| 	} | ||||
| 	 | ||||
| 	if ( !(defined $usr_datas{passwdstrength} && $usr_datas{passwdstrength} =~ /^(none|normal|intermediate|strong)$/)) { | ||||
| 		$usr_datas{passwdstrength} = 'strong'; | ||||
| 	} | ||||
|  | ||||
|     $c->stash(title => $title, notif => $notif, usr_datas => \%usr_datas); | ||||
|     $c->render(template => 'useraccounts'); | ||||
| } ## end sub do_display | ||||
|   | ||||
| @@ -50,6 +50,18 @@ sub main { | ||||
|         $pwd_datas{jwt}                = $jwt; | ||||
|         $c->flash(success => $c->l('pwd_OK_FOR_RESET')); | ||||
|     } ## end else [ if ($c->is_logged_in) ] | ||||
|  | ||||
| 	my $cdb = esmith::ConfigDB::UTF8->open_ro || die "Couldn't open configuration db"; | ||||
|     my $rec = $cdb->get('passwordstrength'); | ||||
| 	$pwd_datas{passwdlength} = ($rec ? ($rec->prop('length') || 12) : 12); | ||||
| 	if ($c->is_admin){ | ||||
| 		$pwd_datas{passwdstrength} = ($rec ? ($rec->prop('Admin') || 'none') : 'none'); | ||||
| 	} else { | ||||
| 		$pwd_datas{passwdstrength} = ($rec ? ($rec->prop('Users') || 'none') : 'none'); | ||||
| 	} | ||||
| 	if ( !(defined $pwd_datas{passwdstrength} && $pwd_datas{passwdstrength} =~ /^(none|normal|intermediate|strong)$/)) { | ||||
| 		$pwd_datas{passwdstrength} = 'strong'; | ||||
| 	} | ||||
|     $c->stash(pwd_datas => \%pwd_datas); | ||||
|     $c->render('userpassword'); | ||||
| } ## end sub main | ||||
|   | ||||
| @@ -211,8 +211,8 @@ sub showlogFile { | ||||
|         $_                = timestamp2local($_); | ||||
|         $_                = HTML::Entities::encode_entities($_); | ||||
|         ($log_datas{highlightpattern} && /$log_datas{highlightpattern}/) | ||||
|             ? $out .= sprintf("<b>$_</b>") | ||||
|             : $out .= sprintf("$_"); | ||||
|             ? $out .= "<b>$_</b>" | ||||
|             : $out .= "$_"; | ||||
|     } ## end while (<LOGFILE>) | ||||
|     $out .= sprintf("</PRE>"); | ||||
|  | ||||
| @@ -297,4 +297,4 @@ sub download_logFile { | ||||
|     ); | ||||
|     return undef; | ||||
| } ## end sub download_logFile | ||||
| 1; | ||||
| 1; | ||||
| @@ -60,3 +60,8 @@ | ||||
| 'usr_NEW_SYSTEM_PASSWORD_VERIFY' => 'New system password (verify)', | ||||
| 'usr_LABEL_IPSECRW_DOWNLOAD' => 'Download digital certificate to IPSec client', | ||||
| 'usr_ERR_OCCURRED_DELETING' => 'An error occurred while trying to delete the user.', | ||||
| 'usr_NONE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters.', | ||||
| 'usr_NORMAL_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters.', | ||||
| 'usr_INTERMEDIATE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters and must pass a dictionary check.', | ||||
| 'usr_STRONG_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters, numbers and special characters and must pass a dictionary check.', | ||||
| 'usr_PASSWORD_WIKI' => "If you want to know more about passwords, then please refer to the <a href='https://wiki.koozali.org/SME_Server:Documentation:Administration_Manual:Chapter9#Changing_User_Passwords'>Wiki</a>", | ||||
| @@ -19,5 +19,8 @@ | ||||
| 'pwd_PASSWORD_CHANGE_SUCCESS' => 'Your password has been successfully changed.', | ||||
| 'pwd_DESCRIPTION' => '<P>To change your account password, please fill out the following form. You will need to provide the name of your account, your old password, and your desired new password. (You must type the new password twice.)</P><P>If you cannot change your password because you have forgotten the old one, your local system administrator can reset your password using the <EM>server manager</EM>.</P>', | ||||
| 'pwd_DESCRIPTION_RESET' => '<P>To reset your account password, please fill out the following form. You will need to provide your desired new password. (You must type it twice.)</P><P>In cas of problem, your local system administrator can reset your password using the <EM>server manager</EM>.</P>', | ||||
| 'pwd_PASSWORD_DESCRIPTION' => 'The password must be composed of at least twelve characters with uppercase and lowercase letters, numbers and non-alphanumeric characters.', | ||||
| 'pwd_PASSWORD_WIKI' => "If you want to know more about passwords, then please refer to the <a href='https://wiki.koozali.org/Useful_Commands#Password_strength'>Wiki</a>", | ||||
| 'pwd_NONE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters.', | ||||
| 'pwd_NORMAL_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters.', | ||||
| 'pwd_INTERMEDIATE_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters and must pass a dictionary check.', | ||||
| 'pwd_STRONG_PASSWORD_DESCRIPTION' => 'The password must be composed of at least [_1] characters with uppercase and lowercase letters, numbers and special characters and must pass a dictionary check.', | ||||
| 'pwd_PASSWORD_WIKI' => "If you want to know more about passwords, then please refer to the <a href='https://wiki.koozali.org/SME_Server:Documentation:Administration_Manual:Chapter9#Changing_User_Passwords'>Wiki</a>", | ||||
| @@ -0,0 +1,4 @@ | ||||
| .legacy-embedded { | ||||
|   width: 99%; | ||||
|   height: 600px; /* fallback default, matches your $height default */ | ||||
| } | ||||
| @@ -0,0 +1,6 @@ | ||||
| document.addEventListener('DOMContentLoaded', function() { | ||||
|   var obj = document.getElementById('legacy-embedded'); | ||||
|   if (obj && obj.dataset.legacyHeight) { | ||||
|     obj.style.height = obj.dataset.legacyHeight; | ||||
|   } | ||||
| }); | ||||
| @@ -2,80 +2,80 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_tape_configure-panel'> | ||||
|   <div id='module' class='module back_tape_configure-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     <h2> | ||||
|     %=l 'bac_ENABLE_DISABLE_TAPE' | ||||
|     </h2><br> | ||||
|   <h2> | ||||
|     %= l 'bac_ENABLE_DISABLE_TAPE' | ||||
|   </h2><br> | ||||
|  | ||||
|     %= $c->render_to_string(inline => (l 'bac_TAPE_CONFIG_DESC')) | ||||
|   %= $c->render_to_string( inline => ( l 'bac_TAPE_CONFIG_DESC' ) ) | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_ENABLE_TAPE_BACKUP' | ||||
| 	</span><span class=data> | ||||
|     % if ( $bac_datas->{status} eq 'checked' ) { | ||||
| 	<input type='checkbox' name='Tapebackup' checked > | ||||
|     %} else { | ||||
| 	%= check_box 'Tapebackup' | ||||
|     %} | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'bac_ENABLE_TAPE_BACKUP' | ||||
|       </span><span class=data> | ||||
|         % if ( $bac_datas->{status} eq 'checked' ) { | ||||
|           <input type='checkbox' name='Tapebackup' checked > | ||||
|         % } else { | ||||
|         %= check_box 'Tapebackup' | ||||
|       % } | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_TAPE_BACKUP_TIME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour'; | ||||
| 	%= text_field 'BackupHour', size => '2' | ||||
| 	% param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin'; | ||||
| 	%= text_field 'BackupMin', size => '2' | ||||
| 	</span> | ||||
| 	<!--span class=label--> | ||||
| 	%=l 'AM/PM:' | ||||
| 	<!--/span--><span class=data> | ||||
| 	% param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM'; | ||||
| 	%= select_field 'BackupAMPM' => ['AM', 'PM'], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'bac_TAPE_BACKUP_TIME' | ||||
|     </span><span class=data> | ||||
|       % param 'BackupHour' => $bac_datas->{backupHour} unless param 'BackupHour'; | ||||
|       %= text_field 'BackupHour', size => '2' | ||||
|       % param 'BackupMin' => $bac_datas->{backupMin} unless param 'BackupMin'; | ||||
|       %= text_field 'BackupMin', size => '2' | ||||
|     </span> | ||||
|     <!--span class=label--> | ||||
|     %= l 'AM/PM:' | ||||
|     <!--/span--><span class=data> | ||||
|       % param 'BackupAMPM' => $bac_datas->{backupAMPM} unless param 'BackupAMPM'; | ||||
|       %= select_field 'BackupAMPM' => [ 'AM', 'PM' ], class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_LOAD_TAPE_REMINDER_TIME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour'; | ||||
| 	%= text_field 'ReminderHour', size => '2' | ||||
| 	% param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin'; | ||||
| 	%= text_field 'ReminderMin', size => '2' | ||||
| 	</span> | ||||
| 	<!--span class=label--> | ||||
| 	%=l 'AM/PM:' | ||||
| 	<!--/span--><span class=data> | ||||
| 	% param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM'; | ||||
| 	%= select_field 'ReminderAMPM' => ['AM', 'PM'], class => 'input' | ||||
| 	</span> | ||||
| 	</p><br> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'bac_LOAD_TAPE_REMINDER_TIME' | ||||
|     </span><span class=data> | ||||
|       % param 'ReminderHour' => $bac_datas->{reminderHour} unless param 'ReminderHour'; | ||||
|       %= text_field 'ReminderHour', size => '2' | ||||
|       % param 'ReminderMin' => $bac_datas->{reminderMin} unless param 'ReminderMin'; | ||||
|       %= text_field 'ReminderMin', size => '2' | ||||
|     </span> | ||||
|     <!--span class=label--> | ||||
|     %= l 'AM/PM:' | ||||
|     <!--/span--><span class=data> | ||||
|       % param 'ReminderAMPM' => $bac_datas->{reminderAMPM} unless param 'ReminderAMPM'; | ||||
|       %= select_field 'ReminderAMPM' => [ 'AM', 'PM' ], class => 'input' | ||||
|     </span> | ||||
|   </p><br> | ||||
|  | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
| 	%= submit_button $c->l('bac_UPDATE_CONF'), class => 'action' | ||||
|   %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|   %= submit_button $c->l('bac_UPDATE_CONF'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,36 +2,36 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_tape_restore-panel'> | ||||
|   <div id='module' class='module back_tape_restore-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_RESTORE_CONF_FROM_TAPE' | ||||
| 	</h2> | ||||
|     <h2> | ||||
|       %= l 'bac_RESTORE_CONF_FROM_TAPE' | ||||
|     </h2> | ||||
|  | ||||
| 	%= $c->render_to_string(inline => (l 'bac_RESTORE_CONF_FROM_TAPE_DESC')) | ||||
|     %= $c->render_to_string( inline => ( l 'bac_RESTORE_CONF_FROM_TAPE_DESC' ) ) | ||||
|  | ||||
| 	<br> | ||||
|     <br> | ||||
|  | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|  | ||||
| 	%= submit_button $c->l('bac_RESTORE_FROM_TAPE'), class => 'action' | ||||
|     %= submit_button $c->l('bac_RESTORE_FROM_TAPE'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,52 +2,52 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_configure-panel'> | ||||
|   <div id='module' class='module back_workstn_configure-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     %= form_for '/backup' => (method => 'POST') => begin | ||||
|   %= form_for '/backup' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_CONFIGURE_WORKSTN_BACKUP' | ||||
| 	</h2> | ||||
|     <h2> | ||||
|       %= l 'bac_CONFIGURE_WORKSTN_BACKUP' | ||||
|     </h2> | ||||
|  | ||||
| 	%= $c->render_to_string(inline => (l 'bac_WORKSTN_BACKUP_DESC')) | ||||
|     %= $c->render_to_string( inline => ( l 'bac_WORKSTN_BACKUP_DESC' ) ) | ||||
|  | ||||
| 	%=l 'bac_WORKSTN_BACKUP_ENABLED' | ||||
| 	<span class=data> | ||||
| 	%= $bac_datas->{status} | ||||
| 	</span><br> | ||||
|     %= l 'bac_WORKSTN_BACKUP_ENABLED' | ||||
|     <span class=data> | ||||
|       %= $bac_datas->{status} | ||||
|     </span><br> | ||||
|  | ||||
| 	%= $c->render_to_string(inline => $c->workstnBackupConfig()) | ||||
|     %= $c->render_to_string( inline => $c->workstnBackupConfig() ) | ||||
|  | ||||
| 	<p><h3> | ||||
| 	%= l 'bac_WORKSTATION_BACKUP_SETCONF' | ||||
| 	</h3><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_SELECT_VFS_TYPE' | ||||
| 	</span><span class=data> | ||||
| 	% param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType'; | ||||
| 	%= select_field 'VFSType' => $c->get_VFSType_options(), class => 'input' | ||||
| 	</span></p> | ||||
|     <p><h3> | ||||
|         %= l 'bac_WORKSTATION_BACKUP_SETCONF' | ||||
|       </h3><br> | ||||
|       <span class=label> | ||||
|         %= l 'bac_SELECT_VFS_TYPE' | ||||
|       </span><span class=data> | ||||
|         % param 'VFSType' => $bac_datas->{vfstype} unless param 'VFSType'; | ||||
|         %= select_field 'VFSType' => $c->get_VFSType_options(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} . '1' | ||||
| 	%= submit_button $c->l('NEXT'), class => 'action' | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} . '1' | ||||
|     %= submit_button $c->l('NEXT'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,153 +2,153 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_configure1-panel'> | ||||
|   <div id='module' class='module back_workstn_configure1-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_CONFIGURE_WORKSTN_BACKUP' | ||||
| 	</h2> | ||||
|   <h2> | ||||
|     %= l 'bac_CONFIGURE_WORKSTN_BACKUP' | ||||
|   </h2> | ||||
|  | ||||
| 	%= $c->render_to_string(inline => (l 'bac_CONFIGURE_WORKSTN_BACKUP_DESC')) | ||||
|   %= $c->render_to_string( inline => ( l 'bac_CONFIGURE_WORKSTN_BACKUP_DESC' ) ) | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_ENABLE_WORKSTN_BACKUP' | ||||
| 	</span><span class=data> | ||||
|     % if ( $bac_datas->{status} eq 'checked' ) { | ||||
| 	<input type='checkbox' name='Workstnbackup' checked > | ||||
|     %} else { | ||||
| 	%= check_box 'Workstnbackup' | ||||
|     %} | ||||
| 	</span> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'bac_ENABLE_WORKSTN_BACKUP' | ||||
|       </span><span class=data> | ||||
|         % if ( $bac_datas->{status} eq 'checked' ) { | ||||
|           <input type='checkbox' name='Workstnbackup' checked > | ||||
|         % } else { | ||||
|         %= check_box 'Workstnbackup' | ||||
|       % } | ||||
|     </span> | ||||
|  | ||||
| 	</p> | ||||
| 	<p><h3> | ||||
| 	%= l 'bac_WORKSTATION_BACKUP_DEST' | ||||
| 	</h3><br> | ||||
|   </p> | ||||
|   <p><h3> | ||||
|       %= l 'bac_WORKSTATION_BACKUP_DEST' | ||||
|     </h3><br> | ||||
|  | ||||
|     % if ( $bac_datas->{vfstype} =~ m/cifs|nfs/s ) { | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_WORKSTN_NAME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkStation' => $bac_datas->{station} unless param 'BackupwkStation'; | ||||
| 	%= text_field 'BackupwkStation', size => 20, class => 'input' | ||||
| 	</span><br> | ||||
|     %} | ||||
|     % if (  $bac_datas->{vfstype} eq 'usb' ) { | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_local removable disk' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkFolder' => $bac_datas->{mount} unless param 'BackupwkFolder'; | ||||
| 	%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => 'input' | ||||
| 	</span><br> | ||||
|       <span class=label> | ||||
|         %= l 'bac_WORKSTN_NAME' | ||||
|       </span><span class=data> | ||||
|         % param 'BackupwkStation' => $bac_datas->{station} unless param 'BackupwkStation'; | ||||
|         %= text_field 'BackupwkStation', size => 20, class => 'input' | ||||
|       </span><br> | ||||
|     % } | ||||
|     % if ( $bac_datas->{vfstype} eq 'usb' ) { | ||||
|       <span class=label> | ||||
|         %= l 'bac_local removable disk' | ||||
|       </span><span class=data> | ||||
|         % param 'BackupwkFolder' => $bac_datas->{mount} unless param 'BackupwkFolder'; | ||||
|         %= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype} ), class => 'input'; | ||||
|       </span><br> | ||||
|     % } elsif ( $bac_datas->{vfstype} eq 'mnt') { | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_Mounted disk' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder'; | ||||
| 	%= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype}), class => 'input' | ||||
| 	</span><br> | ||||
|     <span class=label> | ||||
|       %= l 'bac_Mounted disk' | ||||
|     </span><span class=data> | ||||
|       % param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder'; | ||||
|       %= select_field 'BackupwkFolder' => $c->get_BackupwkDest_options( $bac_datas->{vfstype} ), class => 'input'; | ||||
|     </span><br> | ||||
|     % } else { | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_SHARED_FOLDER_NAME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder'; | ||||
| 	%= text_field 'BackupwkFolder', size => 20, class => 'input' | ||||
| 	</span><br> | ||||
|     %} | ||||
|     % if (  $bac_datas->{vfstype} eq 'cifs' ) { | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_WORKSTN_LOGIN' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkLogin' => $bac_datas->{login} unless param 'BackupwkLogin'; | ||||
| 	%= text_field 'BackupwkLogin', size => 12, class => 'input' | ||||
| 	</span><br><span class=label> | ||||
| 	%=l 'bac_PASSWORD' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkPassword' => $bac_datas->{password} unless param 'BackupwkPassword'; | ||||
| 	%= password_field 'BackupwkPassword', size => 12, class => 'input' | ||||
| 	</span> | ||||
|     %} | ||||
| 	</p><br><h3> | ||||
| 	%= l 'bac_WORKSTN_BACKUP_SETTINGS' | ||||
| 	</h3><br> | ||||
|     <span class=label> | ||||
|       %= l 'bac_SHARED_FOLDER_NAME' | ||||
|     </span><span class=data> | ||||
|       % param 'BackupwkFolder' => $bac_datas->{folder} unless param 'BackupwkFolder'; | ||||
|       %= text_field 'BackupwkFolder', size => 20, class => 'input' | ||||
|     </span><br> | ||||
|     % } | ||||
|     % if ( $bac_datas->{vfstype} eq 'cifs' ) { | ||||
|       <span class=label> | ||||
|         %= l 'bac_WORKSTN_LOGIN' | ||||
|       </span><span class=data> | ||||
|         % param 'BackupwkLogin' => $bac_datas->{login} unless param 'BackupwkLogin'; | ||||
|         %= text_field 'BackupwkLogin', size => 12, class => 'input' | ||||
|       </span><br><span class=label> | ||||
|         %= l 'bac_PASSWORD' | ||||
|       </span><span class=data> | ||||
|         % param 'BackupwkPassword' => $bac_datas->{password} unless param 'BackupwkPassword'; | ||||
|         %= password_field 'BackupwkPassword', size => 12, class => 'input' | ||||
|       </span> | ||||
|     % } | ||||
|   </p><br><h3> | ||||
|     %= l 'bac_WORKSTN_BACKUP_SETTINGS' | ||||
|   </h3><br> | ||||
|  | ||||
| 	<p><span class=label> | ||||
| 	%=l 'bac_NUMBER_OF_SETS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'SetsNumber' => $bac_datas->{setsNumber} unless param 'SetsNumber'; | ||||
| 	%= text_field 'SetsNumber', size => '3' | ||||
| 	</span> | ||||
| 	%=l 'bac_NUMBER_OF_FILES_IN_SET' | ||||
| 	<span class=data> | ||||
| 	% param 'Filesinset' => $bac_datas->{filesinset} unless param 'Filesinset'; | ||||
| 	%= text_field 'Filesinset', size => '3' | ||||
| 	</span></p> | ||||
|   <p><span class=label> | ||||
|       %= l 'bac_NUMBER_OF_SETS' | ||||
|     </span><span class=data> | ||||
|       % param 'SetsNumber' => $bac_datas->{setsNumber} unless param 'SetsNumber'; | ||||
|       %= text_field 'SetsNumber', size => '3' | ||||
|     </span> | ||||
|     %= l 'bac_NUMBER_OF_FILES_IN_SET' | ||||
|     <span class=data> | ||||
|       % param 'Filesinset' => $bac_datas->{filesinset} unless param 'Filesinset'; | ||||
|       %= text_field 'Filesinset', size => '3' | ||||
|   </span></p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_WORKSTN_BACKUP_TIME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkHour' => $bac_datas->{hour} unless param 'BackupwkHour'; | ||||
| 	%= text_field 'BackupwkHour', size => '2' | ||||
| 	% param 'BackupwkMin' => $bac_datas->{min} unless param 'BackupwkMin'; | ||||
| 	%= text_field 'BackupwkMin', size => '2' | ||||
| 	</span> | ||||
| 	%=l 'AM/PM:' | ||||
| 	<span class=data> | ||||
| 	% param 'BackupwkAMPM' => $bac_datas->{ampm} unless param 'BackupwkAMPM'; | ||||
| 	%= select_field 'BackupwkAMPM' => ['AM', 'PM'], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'bac_WORKSTN_BACKUP_TIME' | ||||
|     </span><span class=data> | ||||
|       % param 'BackupwkHour' => $bac_datas->{hour} unless param 'BackupwkHour'; | ||||
|       %= text_field 'BackupwkHour', size => '2' | ||||
|       % param 'BackupwkMin' => $bac_datas->{min} unless param 'BackupwkMin'; | ||||
|       %= text_field 'BackupwkMin', size => '2' | ||||
|     </span> | ||||
|     %= l 'AM/PM:' | ||||
|     <span class=data> | ||||
|       % param 'BackupwkAMPM' => $bac_datas->{ampm} unless param 'BackupwkAMPM'; | ||||
|       %= select_field 'BackupwkAMPM' => [ 'AM', 'PM' ], class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><span class=label> | ||||
| 	%=l 'bac_WORKSTN_TIMEOUT' | ||||
| 	</span><span class=data> | ||||
| 	% param 'BackupwkTimeout' => $bac_datas->{timeout} unless param 'BackupwkTimeout'; | ||||
| 	%= text_field 'BackupwkTimeout', size => '2' | ||||
| 	</span> | ||||
| 	%=l 'bac_INC_ONLY_TIMEOUT' | ||||
| 	<span class=data> | ||||
|     % if ( $bac_datas->{incOnlyTimeout} eq 'checked' ) { | ||||
| 	<input type='checkbox' name='IncOnlyTimeout' checked  > | ||||
|     %} else { | ||||
| 	%= check_box 'IncOnlyTimeout' | ||||
|     %} | ||||
| 	</span></p> | ||||
|   <p><span class=label> | ||||
|       %= l 'bac_WORKSTN_TIMEOUT' | ||||
|     </span><span class=data> | ||||
|       % param 'BackupwkTimeout' => $bac_datas->{timeout} unless param 'BackupwkTimeout'; | ||||
|       %= text_field 'BackupwkTimeout', size => '2' | ||||
|     </span> | ||||
|     %= l 'bac_INC_ONLY_TIMEOUT' | ||||
|     <span class=data> | ||||
|       % if ( $bac_datas->{incOnlyTimeout} eq 'checked' ) { | ||||
|         <input type='checkbox' name='IncOnlyTimeout' checked  > | ||||
|       % } else { | ||||
|       %= check_box 'IncOnlyTimeout' | ||||
|       % } | ||||
|   </span></p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'bac_COMPRESSION_LEVEL' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Compression' => $bac_datas->{compression} unless param 'Compression'; | ||||
| 	%= text_field 'Compression', size => '1' | ||||
| 	</span> | ||||
| 	%=l 'bac_FULL_ONLY_ON' | ||||
| 	<span class=data> | ||||
| 	% param 'Dof' => $bac_datas->{dof} unless param 'Dof'; | ||||
| 	%= select_field 'Dof' => $c->get_dow_list(), class => 'input' | ||||
| 	</p><br> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'bac_COMPRESSION_LEVEL' | ||||
|     </span><span class=data> | ||||
|       % param 'Compression' => $bac_datas->{compression} unless param 'Compression'; | ||||
|       %= text_field 'Compression', size => '1' | ||||
|     </span> | ||||
|     %= l 'bac_FULL_ONLY_ON' | ||||
|     <span class=data> | ||||
|       % param 'Dof' => $bac_datas->{dof} unless param 'Dof'; | ||||
|       %= select_field 'Dof' => $c->get_dow_list(), class => 'input' | ||||
|     </p><br> | ||||
|  | ||||
|  | ||||
| 	%= hidden_field 'Function' => $bac_datas->{function} | ||||
| 	%= hidden_field 'VFSType' => $bac_datas->{vfstype} | ||||
| 	%= submit_button $c->l('bac_UPDATE_CONF'), class => 'action' | ||||
|     %= hidden_field 'Function' => $bac_datas->{function} | ||||
|     %= hidden_field 'VFSType' => $bac_datas->{vfstype} | ||||
|     %= submit_button $c->l('bac_UPDATE_CONF'), class => 'action' | ||||
|     % end | ||||
| </div> | ||||
| % end | ||||
|   </div> | ||||
|   % end | ||||
|   | ||||
| @@ -2,43 +2,43 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_restore-panel'> | ||||
|   <div id='module' class='module back_workstn_restore-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_WORKSTN_RESTORE' | ||||
| 	</h2> | ||||
|     <h2> | ||||
|       %= l 'bac_WORKSTN_RESTORE' | ||||
|     </h2> | ||||
|  | ||||
| 	<br><br> | ||||
|     <br><br> | ||||
|     % if ($bac_datas->{status} ne 'enabled') { | ||||
| 	%= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE')) | ||||
|       %= $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()) | ||||
|     %} | ||||
|     %= $c->render_to_string( inline => ( l 'bac_RESTORE_CONF_FROM_WORKSTN_DESC' ) . ' ' . $c->get_shared_folder_to_verify() ); | ||||
|   % } | ||||
|  | ||||
| 	<br><br><span class=label> | ||||
| 	%=l 'bac_SELECT_BACKUP_FILE' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input' | ||||
| 	</span><br><br> | ||||
|   <br><br><span class=label> | ||||
|     %= l 'bac_SELECT_BACKUP_FILE' | ||||
|   </span><span class=data> | ||||
|     %= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input' | ||||
|   </span><br><br> | ||||
|  | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
| 	%= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action' | ||||
|     % end | ||||
|   %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|   %= submit_button $c->l('bac_RESTORE_FROM_WORKSTN'), class => 'action' | ||||
|   % end | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,36 +1,59 @@ | ||||
| % layout 'default', title => "Sme server 2 - restore"; | ||||
|  | ||||
| %= stylesheet '/css/backup.css' | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_restore1-panel'> | ||||
|   <div id='module' class='module back_workstn_restore1-panel'> | ||||
|     %= javascript '/js/backup_workstation_restore.js' | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_WORKSTN_RESTORE' | ||||
| 	</h2> | ||||
| 	<p> | ||||
| 	%= $c->render_to_string(inline => $bac_datas->{restore_log}) | ||||
| 	</p><p> | ||||
| 	%=l 'bac_YOU_MUST_REBOOT' | ||||
| 	</p> | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
| 	%= submit_button $c->l('bac_REBOOT'), class => 'action' | ||||
|     % end | ||||
|     <h2> | ||||
|       %= l 'bac_WORKSTN_RESTORE' | ||||
|     </h2> | ||||
|  | ||||
|     <fieldset> | ||||
|       <div id="status-container"> | ||||
|         <div><strong>Stage:</strong> <span id="stage">-</span></div> | ||||
|         <div id="progress-bar" aria-label="progress bar" role="progressbar" aria-valuemin="0" aria-valuemax="100"> | ||||
|           <div id="progress-bar-inner">0%</div> | ||||
|         </div> | ||||
|  | ||||
|         <div id="message-log-container"> | ||||
|           <h3>Console Output:</h3> | ||||
|           <div id="message-log"></div> | ||||
|         </div> | ||||
|  | ||||
|         <div id="completion-status"></div> | ||||
|       </div> | ||||
|     </fieldset> | ||||
|  | ||||
|     <!-- | ||||
|     <p> | ||||
|       <fieldset> | ||||
|         %= $c->render_to_string( inline => $bac_datas->{restore_log} ) | ||||
|       </fieldset> | ||||
|     </p> | ||||
|     --> | ||||
|  | ||||
|     <p> | ||||
|       %= l 'bac_YOU_MUST_REBOOT' | ||||
|     </p> | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|     %= submit_button $c->l('bac_REBOOT'), class => 'action' | ||||
|   % end | ||||
| </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,47 +2,47 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_sel_restore-panel'> | ||||
|   <div id='module' class='module back_workstn_sel_restore-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
|     <h2><%=l 'bac_WORKSTN_SEL_RESTORE' %></h2> | ||||
|     <h2><%= l 'bac_WORKSTN_SEL_RESTORE' %></h2> | ||||
|  | ||||
|     %= $c->render_to_string(inline => (l 'bac_WORKSTN_SEL_REST_DESC') . ' ' . $c->get_shared_folder_to_verify()) | ||||
|     %= $c->render_to_string( inline => ( l 'bac_WORKSTN_SEL_REST_DESC' ) . ' ' . $c->get_shared_folder_to_verify() ); | ||||
|  | ||||
|     <h3><%=l 'bac_BACKUP_CHOICE' %></h3> | ||||
|     <h3><%= l 'bac_BACKUP_CHOICE' %></h3> | ||||
|  | ||||
| 	<br><span class=label> | ||||
| 	%=l 'bac_SELECT_BACKUP_FILE' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'Backupset' => $c->get_Restoreset_options(), class => 'input' | ||||
| 	</span><br> | ||||
|     <br><span class=label> | ||||
|       %= l 'bac_SELECT_BACKUP_FILE' | ||||
|     </span><span class=data> | ||||
|       %= select_field 'Backupset' => $c->get_Restoreset_options(), class => 'input' | ||||
|     </span><br> | ||||
|  | ||||
| 	<br><span class=label> | ||||
| 	%=l 'bac_FILTER_EXPRESSION' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'Filterexp', size => 32, class => 'input' | ||||
| 	</span><br> | ||||
| 	<br> | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
| 	%= submit_button $c->l('PERFORM'), class => 'action' | ||||
|     <br><span class=label> | ||||
|       %= l 'bac_FILTER_EXPRESSION' | ||||
|     </span><span class=data> | ||||
|       %= text_field 'Filterexp', size => 32, class => 'input' | ||||
|     </span><br> | ||||
|     <br> | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|     %= submit_button $c->l('PERFORM'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,48 +2,48 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_sel_restore1-panel'> | ||||
|   <div id='module' class='module back_workstn_sel_restore1-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|  | ||||
|     <h2><%=l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2><br> | ||||
|   <h2><%= l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2><br> | ||||
|  | ||||
|     %= $c->render_to_string(inline => (l 'bac_READ_COMPLETE')) | ||||
|   %= $c->render_to_string( inline => ( l 'bac_READ_COMPLETE' ) ) | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<br><span class=label> | ||||
| 	%=l 'bac_SELECT_FILES_TO_RESTORE' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'Restorefiles' => $c->get_Restorefiles_options($bac_datas->{'filterexp'},$bac_datas->{'backupset'}), class => 'input', multiple => 1, size => 15 | ||||
| 	</span><br> | ||||
|     <br><span class=label> | ||||
|       %= l 'bac_SELECT_FILES_TO_RESTORE' | ||||
|     </span><span class=data> | ||||
|       %= select_field 'Restorefiles' => $c->get_Restorefiles_options( $bac_datas->{'filterexp'}, $bac_datas->{'backupset'} ), class => 'input', multiple => 1, size => 15; | ||||
|     </span><br> | ||||
|  | ||||
| 	<br><span class=label> | ||||
| 	%=l 'bac_SELECT_DATE_BEFORE' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'Seldatebefore', size => 32, class => 'input' | ||||
| 	</span><br> | ||||
| 	<br> | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
| 	%= hidden_field 'Backupset' => $bac_datas->{'backupset'} | ||||
| 	%= hidden_field 'Filterexp' => $bac_datas->{'filterexp'} | ||||
|     <br><span class=label> | ||||
|       %= l 'bac_SELECT_DATE_BEFORE' | ||||
|     </span><span class=data> | ||||
|       %= text_field 'Seldatebefore', size => 32, class => 'input' | ||||
|     </span><br> | ||||
|     <br> | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|     %= hidden_field 'Backupset' => $bac_datas->{'backupset'} | ||||
|     %= hidden_field 'Filterexp' => $bac_datas->{'filterexp'} | ||||
|  | ||||
| 	%= submit_button $c->l('PERFORM'), class => 'action' | ||||
|     %= submit_button $c->l('PERFORM'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,31 +2,31 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_sel_restore2-panel'> | ||||
|   <div id='module' class='module back_workstn_sel_restore2-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|     <h2><%=l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2> | ||||
|     <br> | ||||
|     %= $c->render_to_string(inline => $bac_datas->{restore_log})  | ||||
|     <br> | ||||
|   <h1><%= $title %></h1> | ||||
|   <h2><%= l 'bac_WORKSTN_SELECTIVE_RESTORE' %></h2> | ||||
|   <br> | ||||
|   %= $c->render_to_string( inline => $bac_datas->{restore_log} ) | ||||
|   <br> | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} | ||||
| 	%= submit_button $c->l('NEXT'), class => 'action' | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|     %= submit_button $c->l('NEXT'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,51 +1,51 @@ | ||||
| % layout 'default', title => "Sme server 2 - backup - verify"; | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_verify-panel'> | ||||
|   <div id='module' class='module back_workstn_verify-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_VERIFY_WORKSTN_BACKUP_FILE' | ||||
| 	</h2> | ||||
|   <h2> | ||||
|     %= l 'bac_VERIFY_WORKSTN_BACKUP_FILE' | ||||
|   </h2> | ||||
|  | ||||
|     %= form_for '/backup' => (method => 'POST') => begin | ||||
|   %= form_for '/backup' => ( method => 'POST' ) => begin | ||||
|  | ||||
|     % if ($bac_datas->{status} ne 'enabled') { | ||||
| 	%= $c->render_to_string(inline => (l 'bac_CONFIGURATION_TO_BE_DONE')) | ||||
|       %= $c->render_to_string( inline => ( l 'bac_CONFIGURATION_TO_BE_DONE' ) ) | ||||
|     % } else { | ||||
| 	%= $c->render_to_string(inline => (l 'bac_VERIFY_WORKSTN_BACKUP_DESC') . ' ' . $c->get_shared_folder_to_verify()) | ||||
|     %} | ||||
| 	<br><br><span class=label> | ||||
| 	%=l 'bac_SELECT_BACKUP_FILE' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input' | ||||
| 	</span><br> | ||||
|     %= $c->render_to_string( inline => ( l 'bac_VERIFY_WORKSTN_BACKUP_DESC' ) . ' ' . $c->get_shared_folder_to_verify() ); | ||||
|   % } | ||||
|   <br><br><span class=label> | ||||
|     %= l 'bac_SELECT_BACKUP_FILE' | ||||
|   </span><span class=data> | ||||
|     %= select_field 'Backupset' => $c->get_Backupset_options(), class => 'input' | ||||
|   </span><br> | ||||
|  | ||||
| 	<p><span class=label> | ||||
| 	%=l 'bac_CHECK_TO_VERIFY_FULL_RESTORE' | ||||
| 	</span><span class=data> | ||||
| 	%= check_box 'Verifyall' | ||||
| 	</span></p><br> | ||||
|   <p><span class=label> | ||||
|       %= l 'bac_CHECK_TO_VERIFY_FULL_RESTORE' | ||||
|     </span><span class=data> | ||||
|       %= check_box 'Verifyall' | ||||
|   </span></p><br> | ||||
|  | ||||
| 	%=l 'bac_CHECK_INTEGRITY_WARNING' | ||||
|   %= l 'bac_CHECK_INTEGRITY_WARNING' | ||||
|  | ||||
| 	<br><br> | ||||
| 	%= hidden_field 'Function' => $bac_datas->{'function'} . '1' | ||||
| 	%= submit_button $c->l('bac_VERIFY'), class => 'action' | ||||
|   <br><br> | ||||
|   %= hidden_field 'Function' => $bac_datas->{'function'} . '1' | ||||
|   %= submit_button $c->l('bac_VERIFY'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,35 +1,35 @@ | ||||
| % layout 'default', title => "Sme server 2 - backup - verify"; | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module back_workstn_verify1-panel'> | ||||
|   <div id='module' class='module back_workstn_verify1-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas->{function} | ||||
| 	<!--  dumper $bac_datas->{'files_list'} --> | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas->{function} | ||||
|         <!--  dumper $bac_datas->{'files_list'} --> | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     <h2><%= l 'bac_VERIFY_WORKSTN_BACKUP_FILE' %></h2> | ||||
|   <h2><%= l 'bac_VERIFY_WORKSTN_BACKUP_FILE' %></h2> | ||||
|  | ||||
|     <br> | ||||
|     %= $c->render_to_string(inline => $c->workstnVerify()) | ||||
|     <br> | ||||
|   <br> | ||||
|   %= $c->render_to_string( inline => $c->workstnVerify() ) | ||||
|   <br> | ||||
|  | ||||
|     %= form_for '/backupd' => (method => 'POST') => begin | ||||
|   %= form_for '/backupd' => ( method => 'POST' ) => begin | ||||
|  | ||||
|     %= hidden_field 'Function' => $bac_datas->{'function'} | ||||
|  | ||||
|     %= submit_button $c->l('NEXT'), class => 'action' | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
| </div> | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,67 +1,71 @@ | ||||
| <% | ||||
|  | ||||
|     my $backups = esmith::BackupHistoryDB->open; # no UTF8 | ||||
|     my $now = time(); | ||||
|     my $backup_rec = $backups->new_record($now, { | ||||
| 	type => 'backup_record', BackupType => 'desktop', | ||||
| 	StartEpochTime => $now, | ||||
| 	}); | ||||
|  | ||||
|     # Dump the current mysql tables so that they are part of the image. | ||||
|     # The events handle cases where mysqld is not enabled, and/or is not running. | ||||
|     my $status = system("/sbin/e-smith/signal-event", "pre-backup", "desktop"); | ||||
|     if ($status) { | ||||
| 		$c->desktopBackupRecordStatus($backup_rec, 'pre-backup', $status); | ||||
| 		return ($c->l('bac_OPERATION_STATUS_REPORT').$c->l('bac_ERR_PRE_BACKUP')); | ||||
|   my $backups    = esmith::BackupHistoryDB->open;    # no UTF8 | ||||
|   my $now        = time(); | ||||
|   my $backup_rec = $backups->new_record( | ||||
|     $now, | ||||
|     { | ||||
|       type           => 'backup_record', | ||||
|       BackupType     => 'desktop', | ||||
|       StartEpochTime => $now, | ||||
|     } | ||||
|   ); | ||||
|  | ||||
|     my $clvl = $c->stash('compressionlevel'); | ||||
|     my $cmd = "/bin/tar --create --file=- --directory / @{$c->stash('exclude')}  " | ||||
|         . "@{$c->stash('directories')} | /usr/bin/gzip $clvl "; | ||||
|   # Dump the current mysql tables so that they are part of the image. | ||||
|   # The events handle cases where mysqld is not enabled, and/or is not running. | ||||
|   my $status = system( "/sbin/e-smith/signal-event", "pre-backup", "desktop" ); | ||||
|   if ($status) { | ||||
|     $c->desktopBackupRecordStatus( $backup_rec, 'pre-backup', $status ); | ||||
|     return ( $c->l('bac_OPERATION_STATUS_REPORT') . $c->l('bac_ERR_PRE_BACKUP') ); | ||||
|   } | ||||
|  | ||||
|     my $success = open my $fh, '-|', $cmd; | ||||
|     #unless ($success) { return "Error download command."; }; | ||||
|     if ($success) { | ||||
| 		# Try with download plugin - seems to fail to complete download and also  | ||||
| 		# name of file deposited is not as required. | ||||
| 		#my $output = do { local $/; <$fh> }; | ||||
| 		#close $fh; | ||||
| 		#$c->render_file( | ||||
| 			#data => $output, | ||||
| 			#filename => 'output.txt', | ||||
| 			#content_type => 'text/plain' | ||||
| 		#); | ||||
| 		# So organise it ourselves. | ||||
| 		$c->res->headers->content_type('application/x-tar'); | ||||
| 		$c->res->headers->content_disposition(qq/attachment; filename="smeserver.tgz"/); | ||||
| 		my $cb; | ||||
| 		$cb = sub { | ||||
| 		my $c = shift; | ||||
| 		my $size = 500 * 1024; | ||||
| 		my $length = sysread($fh, my $buffer, $size); | ||||
| 		unless ($length) { | ||||
| 		  close $fh; | ||||
| 		  undef $cb; | ||||
| 		  $c->finish; | ||||
| 		  return; | ||||
| 		} | ||||
| 		$c->write_chunk($buffer, $cb); | ||||
| 		}; | ||||
| 		$c->$cb; | ||||
| 	} else { | ||||
| 		$c->render(text => "Failed to execute command: $!", status => 500); | ||||
| 	} | ||||
|   my $clvl = $c->stash('compressionlevel'); | ||||
|   my $cmd  = "/bin/tar --create --file=- --directory / @{$c->stash('exclude')}  " | ||||
|     . "@{$c->stash('directories')} | /usr/bin/gzip $clvl "; | ||||
|  | ||||
|     # Remove the dumped tables. | ||||
|     $status = system("/sbin/e-smith/signal-event", "post-backup", "desktop"); | ||||
|     if ($status) { | ||||
| 		$c->desktopBackupRecordStatus($backup_rec, 'post-backup', $status); | ||||
| 		die ($c->l('bac_ERR_POST_BACKUP'),"\n"); | ||||
|     } | ||||
|   my $success = open my $fh, '-|', $cmd; | ||||
|   #unless ($success) { return "Error download command."; }; | ||||
|   if ($success) { | ||||
|     # Try with download plugin - seems to fail to complete download and also | ||||
|     # name of file deposited is not as required. | ||||
|     #my $output = do { local $/; <$fh> }; | ||||
|     #close $fh; | ||||
|     #$c->render_file( | ||||
|     #data => $output, | ||||
|     #filename => 'output.txt', | ||||
|     #content_type => 'text/plain' | ||||
|     #); | ||||
|     # So organise it ourselves. | ||||
|     $c->res->headers->content_type('application/x-tar'); | ||||
|     $c->res->headers->content_disposition(qq/attachment; filename="smeserver.tgz"/); | ||||
|     my $cb; | ||||
|     $cb = sub { | ||||
|       my $c      = shift; | ||||
|       my $size   = 500 * 1024; | ||||
|       my $length = sysread( $fh, my $buffer, $size ); | ||||
|       unless ($length) { | ||||
|         close $fh; | ||||
|         undef $cb; | ||||
|         $c->finish; | ||||
|         return; | ||||
|       } | ||||
|       $c->write_chunk( $buffer, $cb ); | ||||
|     }; | ||||
|     $c->$cb; | ||||
|   } | ||||
|   else { | ||||
|     $c->render( text => "Failed to execute command: $!", status => 500 ); | ||||
|   } | ||||
|  | ||||
|     $now = time(); | ||||
|     $backup_rec->set_prop('EndEpochTime', "$now"); | ||||
|     $backup_rec->set_prop('Result', "0"); | ||||
|   # Remove the dumped tables. | ||||
|   $status = system( "/sbin/e-smith/signal-event", "post-backup", "desktop" ); | ||||
|   if ($status) { | ||||
|     $c->desktopBackupRecordStatus( $backup_rec, 'post-backup', $status ); | ||||
|     die( $c->l('bac_ERR_POST_BACKUP'), "\n" ); | ||||
|   } | ||||
|  | ||||
|   $now = time(); | ||||
|   $backup_rec->set_prop( 'EndEpochTime', "$now" ); | ||||
|   $backup_rec->set_prop( 'Result',       "0" ); | ||||
|    | ||||
| %> | ||||
| 1; | ||||
|   | ||||
| @@ -1,79 +1,78 @@ | ||||
| % layout 'default', title => "Sme server 2 - backup"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module backup-panel'> | ||||
|   <div id='module' class='module backup-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $bac_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $bac_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'warning' ) { | ||||
|     	<br><div class=sme-warning> | ||||
|     	%= $c->render_to_string(inline => stash 'warning')  | ||||
| 	</div> | ||||
|     %} | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'warning' ) { | ||||
|     <br><div class=sme-warning> | ||||
|       %= $c->render_to_string( inline => stash 'warning' ) | ||||
|     </div> | ||||
|   % } | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|     <!--br>Still incomplete click here for previous version | ||||
| 	<a href="/server-manager/cgi-bin/backup" target='_blank'><b>(Previous Backup version)</b></a> | ||||
|     <br--> | ||||
|   <h1><%= $title %></h1> | ||||
|   <!--br>Still incomplete click here for previous version | ||||
|   <a href="/server-manager/cgi-bin/backup" target='_blank'><b>(Previous Backup version)</b></a> | ||||
|   <br--> | ||||
|  | ||||
| 	<%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module},  | ||||
| 		$bac_datas->{dumpsize}, $bac_datas->{tarsize})) %> | ||||
|     <%= $c->render_to_string(inline => (l 'bac_BACKUP_DESC_DAR', $bac_datas->{module}, | ||||
|     $bac_datas->{dumpsize}, $bac_datas->{tarsize})) %> | ||||
|  | ||||
|     %= form_for '/backup' => (method => 'POST') => begin | ||||
|     %= form_for '/backup' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<h2> | ||||
| 	%=l 'bac_BACKUP_CONFIG_STATUS' | ||||
| 	</h2> | ||||
|       <h2> | ||||
|         %= l 'bac_BACKUP_CONFIG_STATUS' | ||||
|       </h2> | ||||
|  | ||||
| 	<p><span class=label> | ||||
| 	%=l 'bac_TAPE_BACKUPS', | ||||
| 	</span><span class=data2> | ||||
| 	%= $c->l(uc($bac_datas->{'backupStatus'})).'.' | ||||
| 	</span> | ||||
|     % if ( $bac_datas->{'backupStatus'} eq 'enabled' ) { | ||||
| 	%= $c->l('bac_BACKUPS_RUN_AT') | ||||
| 	<span class=data> | ||||
| 	%=  $bac_datas->{'backupTime'} | ||||
| 	</span> | ||||
| 	%= $c->l('bac_REMINDER_MESSAGE_AT') | ||||
| 	<span class=data> | ||||
| 	%= $bac_datas->{'reminderTime'} | ||||
| 	</span>     | ||||
|     %} | ||||
| 	<p><span class=label> | ||||
| 	%=l 'bac_WORKSTN_BACKUPS', | ||||
| 	</span><span class=data2> | ||||
| 	%= $c->l(uc($bac_datas->{'backupwkStatus'})).'.' | ||||
| 	</span> | ||||
|     % if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) { | ||||
| 	%= $c->l('bac_WKBACKUPS_RUN_AT') | ||||
| 	<b> | ||||
| 	%= $bac_datas->{'backupwkTime'} | ||||
| 	</b> | ||||
|     %} | ||||
|       <p><span class=label> | ||||
|           %= l 'bac_TAPE_BACKUPS', | ||||
|         </span><span class=data2> | ||||
|           %= $c->l( uc( $bac_datas->{'backupStatus'} ) ) . '.' | ||||
|         </span> | ||||
|         % if ( $bac_datas->{'backupStatus'} eq 'enabled' ) { | ||||
|           %= $c->l('bac_BACKUPS_RUN_AT') | ||||
|           <span class=data> | ||||
|             %= $bac_datas->{'backupTime'} | ||||
|           </span> | ||||
|           %= $c->l('bac_REMINDER_MESSAGE_AT') | ||||
|           <span class=data> | ||||
|             %= $bac_datas->{'reminderTime'} | ||||
|           </span> | ||||
|         % } | ||||
|       <p><span class=label> | ||||
|           %= l 'bac_WORKSTN_BACKUPS', | ||||
|         </span><span class=data2> | ||||
|           %= $c->l( uc( $bac_datas->{'backupwkStatus'} ) ) . '.' | ||||
|         </span> | ||||
|         % if ( $bac_datas->{'backupwkStatus'} eq 'enabled' ) { | ||||
|           %= $c->l('bac_WKBACKUPS_RUN_AT') | ||||
|           <b> | ||||
|             %= $bac_datas->{'backupwkTime'} | ||||
|           </b> | ||||
|         % } | ||||
|  | ||||
| 	<p><span class=label> | ||||
| 	%=l 'bac_SELECT_AN_ACTION' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Function' => $bac_datas->{function} unless param 'Function'; | ||||
| 	%= select_field 'Function' => $c->get_function_options(), class => 'input' | ||||
| 	</span></p> | ||||
|         <p><span class=label> | ||||
|             %= l 'bac_SELECT_AN_ACTION' | ||||
|           </span><span class=data> | ||||
|             % param 'Function' => $bac_datas->{function} unless param 'Function'; | ||||
|             %= select_field 'Function' => $c->get_function_options(), class => 'input' | ||||
|         </span></p> | ||||
|  | ||||
| 	<br> | ||||
|  	%= submit_button $c->l('PERFORM'), class => 'action' | ||||
|   | ||||
|     % end | ||||
|         <br> | ||||
|         %= submit_button $c->l('PERFORM'), class => 'action' | ||||
|  | ||||
| </div> | ||||
|         % end | ||||
|  | ||||
| % end | ||||
|       </div> | ||||
|  | ||||
|       % end | ||||
|   | ||||
| @@ -2,81 +2,81 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module bugreport-panel'> | ||||
|   <div id='module' class='module bugreport-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	(DBG)route: <%= $c->current_route %><br> | ||||
| 	(DBG)trt: <%= $bugr_datas->{trt} %><br> | ||||
| 	</p> | ||||
|       <p> | ||||
|         (DBG)route: <%= $c->current_route %><br> | ||||
|         (DBG)trt: <%= $bugr_datas->{trt} %><br> | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     <h1><%= $title %></h1> | ||||
|     <!--br><%= $modul %><br--> | ||||
|  | ||||
|   <h1><%= $title %></h1> | ||||
|   <!--br><%= $modul %><br--> | ||||
|  | ||||
|     <b> | ||||
|     %=l ('bugr_DO_NOT_PANIC') | ||||
|       %= l('bugr_DO_NOT_PANIC') | ||||
|     </b> | ||||
|     <p> | ||||
|     %=l ('bugr_SME_EXPERIENCE') | ||||
|       %= l('bugr_SME_EXPERIENCE') | ||||
|     </p><p> | ||||
|     %=l ('bugr_USE_TEMPLATE') | ||||
| : <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs" | ||||
|  target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>. | ||||
|     </p><p> | ||||
|     %=l ('bugr_PLEASE_REPORT_HERE') | ||||
| : <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>. | ||||
|     </p><p>  | ||||
|    %=l ('bugr_FOLLOWING_REPORT_MIGHT_HELP') | ||||
|     </p><p> | ||||
|     %=l ('bugr_REPORT_CONTENT') | ||||
|       %= l('bugr_USE_TEMPLATE') | ||||
|       : <a href="https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs" | ||||
|       target="_blank">https://wiki.koozali.org/Bugzilla_Help#Reporting_Bugs</a>. | ||||
|   </p><p> | ||||
|     %= l('bugr_PLEASE_REPORT_HERE') | ||||
|     : <a href="https://bugs.koozali.org" target="_blank">https://bugs.koozali.org</a>. | ||||
|   </p><p> | ||||
|     %= l('bugr_FOLLOWING_REPORT_MIGHT_HELP') | ||||
|   </p><p> | ||||
|     %= l('bugr_REPORT_CONTENT') | ||||
|     <br><ul><li> | ||||
|     %=l ('bugr_SME_VERSION') | ||||
|     </li><li> | ||||
|     %=l ('bugr_SERVER_MODE') | ||||
|     </li><li> | ||||
|     %=l ('bugr_PREVIOUS_SERVER_MODE') | ||||
|     </li><li> | ||||
|     %=l ('bugr_KERNEL_AND_ARCH') | ||||
|     </li><li> | ||||
|     %=l ('bugr_INSTALLED_RPMS') | ||||
|     </li><li> | ||||
|     %=l ('bugr_ALTERED_TEMPLATES') | ||||
|     </li><li> | ||||
|     %=l ('bugr_ALTERED_EVENTS') | ||||
|     </li><li> | ||||
|     %=l ('bugr_YUM_REPOS') | ||||
|     </li><br></ul> | ||||
|     %=l ('bugr_PRIVACY') | ||||
|     </p> | ||||
|         %= l('bugr_SME_VERSION') | ||||
|       </li><li> | ||||
|         %= l('bugr_SERVER_MODE') | ||||
|       </li><li> | ||||
|         %= l('bugr_PREVIOUS_SERVER_MODE') | ||||
|       </li><li> | ||||
|         %= l('bugr_KERNEL_AND_ARCH') | ||||
|       </li><li> | ||||
|         %= l('bugr_INSTALLED_RPMS') | ||||
|       </li><li> | ||||
|         %= l('bugr_ALTERED_TEMPLATES') | ||||
|       </li><li> | ||||
|         %= l('bugr_ALTERED_EVENTS') | ||||
|       </li><li> | ||||
|         %= l('bugr_YUM_REPOS') | ||||
|       </li><br></ul> | ||||
|     %= l('bugr_PRIVACY') | ||||
|   </p> | ||||
|  | ||||
|     <% my $btn = l('bugr_CREATE_REPORT'); %> | ||||
|   <% my $btn = l('bugr_CREATE_REPORT'); %> | ||||
|  | ||||
|     %= form_for 'bugreport' => (method => 'POST') => begin | ||||
|         %= submit_button "$btn", class => 'action' | ||||
|     % end     | ||||
|   %= form_for 'bugreport' => ( method => 'POST' ) => begin | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   % end | ||||
|  | ||||
|     <p><b> | ||||
|     %=l ('bugr_DONATING') | ||||
|   <p><b> | ||||
|       %= l('bugr_DONATING') | ||||
|     </b><br><br> | ||||
|     %=l ('bugr_AWARE_SME') | ||||
|     %= l('bugr_AWARE_SME') | ||||
|     <br><br><b> | ||||
|     %=l ('bugr_YOUR_HELP') | ||||
|       %= l('bugr_YOUR_HELP') | ||||
|     </b><br><br> | ||||
|     %=l ('bugr_CONSIDER_DONATING') | ||||
|     %= l('bugr_CONSIDER_DONATING') | ||||
|     <br><br> | ||||
|     </p> | ||||
|   </p> | ||||
|  | ||||
|     %= link_to 'https://wiki.koozali.org/Donate' => begin | ||||
| 	%= image '/images/btn_donateCC_LG.gif' | ||||
|   %= link_to 'https://wiki.koozali.org/Donate' => begin | ||||
|     %= image '/images/btn_donateCC_LG.gif' | ||||
|  | ||||
|     %= hidden_field 'trt' => $bugr_datas->{trt} | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
|  | ||||
|     <br> | ||||
|     %=l ('bugr_THANK_YOU') | ||||
|   <br> | ||||
|   %= l('bugr_THANK_YOU') | ||||
|  | ||||
| </div> | ||||
|  | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -2,33 +2,33 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module bugreport2-panel'> | ||||
|   <div id='module' class='module bugreport2-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	(DBG)route: <%= $c->current_route %><br> | ||||
| 	(DBG)trt: <%= $bugr_datas->{trt} %><br> | ||||
| 	</p> | ||||
|       <p> | ||||
|         (DBG)route: <%= $c->current_route %><br> | ||||
|         (DBG)trt: <%= $bugr_datas->{trt} %><br> | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     <h1><%= $title %></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     <br><%= $modul %><br> | ||||
|   <br><%= $modul %><br> | ||||
|  | ||||
|     <% my $btn = l('bugr_Download this report'); %> | ||||
|   <% my $btn = l('bugr_Download this report'); %> | ||||
|  | ||||
|     %= form_for 'bugreportD' => (method => 'POST') => begin | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		%= hidden_field 'trt' => $bugr_datas->{trt} | ||||
|     % end    | ||||
|      | ||||
|     % my $out = "================== <br />"; | ||||
|     % $out .= "Boot anaysis image (right click and save image to download)<br />"; | ||||
|     % $out .= "================== <br />"; | ||||
|     % $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >"; | ||||
|      | ||||
|    <br><%= $c->render_to_string(inline=>$out) %><br> | ||||
|   %= form_for 'bugreportD' => ( method => 'POST' ) => begin | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|     %= hidden_field 'trt' => $bugr_datas->{trt} | ||||
|   % end | ||||
|  | ||||
|   % my $out = "================== <br />"; | ||||
|   % $out .= "Boot anaysis image (right click and save image to download)<br />"; | ||||
|   % $out .= "================== <br />"; | ||||
|   % $out .= "<img src='images/boot.svg' alt='boot timing image' width=95% >"; | ||||
|  | ||||
|   <br><%= $c->render_to_string( inline => $out ) %><br> | ||||
|  | ||||
| </div> | ||||
|  | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,45 +1,45 @@ | ||||
| % layout 'default', title => "Sme server 2 - clamav"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module clamav-panel'> | ||||
|     %if (config->{debug} == 1) { | ||||
| 	<p>(DBG)route: <%= $c->current_route %><br> | ||||
| 	(DBG)FsS stat: <%= $clm_datas->{FilesystemScan}%> <br> | ||||
| 	(DBG)Quar stat: <%=$clm_datas->{Quarantine} %> | ||||
| 	</p> | ||||
|     %} | ||||
|     <h1><%= $title %></h1> | ||||
|     <br> | ||||
|     <%= $modul %> | ||||
|     <% 	my $btn = l('SAVE'); %> | ||||
|   <div id='module' class='module clamav-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
|       <p>(DBG)route: <%= $c->current_route %><br> | ||||
|         (DBG)FsS stat: <%= $clm_datas->{FilesystemScan} %> <br> | ||||
|         (DBG)Quar stat: <%= $clm_datas->{Quarantine} %> | ||||
|       </p> | ||||
|     % } | ||||
|   <h1><%= $title %></h1> | ||||
|   <br> | ||||
|   <%= $modul %> | ||||
|   <% my $btn = l('SAVE'); %> | ||||
|  | ||||
|     %= form_for 'clamav' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD' | ||||
| 	</span><span class=data> | ||||
| 	% param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan'; | ||||
| 	%= select_field 'FilesystemScan' =>  [[ (l 'clm_DAILY') => 'daily'], [ (l 'clm_NEVER') => 'disabled'], [ (l 'clm_WEEKLY') => 'weekly']], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'clm_LABEL_QUARANTINE' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine'; | ||||
| 	%= select_field 'Quarantine' => [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input' | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'clm_LABEL_CLAM_VERSIONS' | ||||
| 	</span><span class=data> | ||||
| 	%= $clm_datas->{clam_versions} | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
|     % end | ||||
|   %= form_for 'clamav' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'clm_LABEL_FILESYSTEM_SCAN_PERIOD' | ||||
|       </span><span class=data> | ||||
|         % param 'FilesystemScan' => $clm_datas->{FilesystemScan} unless param 'FilesystemScan'; | ||||
|         %= select_field 'FilesystemScan' => [ [ ( l 'clm_DAILY' ) => 'daily' ], [ ( l 'clm_NEVER' ) => 'disabled' ], [ ( l 'clm_WEEKLY' ) => 'weekly' ] ], class => 'input'; | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'clm_LABEL_QUARANTINE' | ||||
|       </span><span class=data> | ||||
|         % param 'Quarantine' => $clm_datas->{Quarantine} unless param 'Quarantine'; | ||||
|         %= select_field 'Quarantine' => [ [ ( l 'ENABLED' ) => 'enabled' ], [ ( l 'DISABLED' ) => 'disabled' ] ], class => 'input'; | ||||
|         <br> | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'clm_LABEL_CLAM_VERSIONS' | ||||
|       </span><span class=data> | ||||
|         %= $clm_datas->{clam_versions} | ||||
|         <br> | ||||
|       </span> | ||||
|     </p> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   % end | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| % layout 'default', title => "Sme server 2 - err 400"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module csrf_400-panel'> | ||||
|   <div id='module' class='module csrf_400-panel'> | ||||
|     <div class=sme-error> | ||||
|     %= l 'CSRF_VALIDATION_FAILURE' | ||||
|       %= l 'CSRF_VALIDATION_FAILURE' | ||||
|     </div> | ||||
|  | ||||
| </div> | ||||
|   </div> | ||||
| % end | ||||
|   | ||||
| @@ -1,147 +1,147 @@ | ||||
| % layout 'default', title => 'Sme server 2 - datetime'; | ||||
| % content_for 'module' => begin | ||||
| 	<div id='module' class='module datetime-panel'> | ||||
| 		% if (config->{debug} == 1) { | ||||
| 		<p> | ||||
| 		%= dumper $c->current_route | ||||
| 		%= dumper $dat_data | ||||
| 		</p> | ||||
| 		% } | ||||
|   <div id='module' class='module datetime-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $dat_data | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
| 		%if ($c->stash('first')) { | ||||
| 			<br><p> | ||||
| 			%=$c->render_to_string(inline =>$c->l($c->stash('first'))) | ||||
| 			</p> | ||||
| 		%} elsif ($c->stash('success')) { | ||||
| 			<div class='success '> | ||||
| 				%= $c->l($c->stash('success')); | ||||
| 			</div> | ||||
| 		%} elsif ($c->stash('error')) {  | ||||
| 			<div class='sme-error'> | ||||
| 				%= $c->l($c->stash('error')); | ||||
| 			</div> | ||||
| 		%} | ||||
|   % if ($c->stash('first')) { | ||||
|     <br><p> | ||||
|       %= $c->render_to_string( inline => $c->l( $c->stash('first') ) ) | ||||
|     </p> | ||||
|   % } elsif ($c->stash('success')) { | ||||
|   <div class='success '> | ||||
|     %= $c->l( $c->stash('success') ); | ||||
|   </div> | ||||
|   % } elsif ($c->stash('error')) { | ||||
|   <div class='sme-error'> | ||||
|     %= $c->l( $c->stash('error') ); | ||||
|   </div> | ||||
|   % } | ||||
|  | ||||
| 		<h1><%= $title %></h1><br> | ||||
| 		%= $modul | ||||
| 		<% my $btn = l('SAVE'); %> | ||||
| 		<br /><br /> | ||||
| 		<span> | ||||
| 			%= label_for 'real-time-clock' => $c->l('dat_The_time_is_currently'), class => 'datetime-clock-label' | ||||
| 		</span><span class=data2> | ||||
| <!-- | ||||
| 			<div id="real-time-clock"></div> | ||||
| --> | ||||
| 			%= text_field 'clock', id => 'real-time-clock', readonly => 'readonly', class => 'datetime-clock' , value => $dat_data->{currentdatetime} | ||||
| 		</span> | ||||
| 		% if ($dat_data->{ntpstatus} eq 'disabled') { | ||||
| 			<div class='datetime-set-ntp'> | ||||
| 				%=l 'dat_NTP_ENABLE_DESC' | ||||
| 				<br> | ||||
| 			</div>	 | ||||
| 		% } 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 $mode_options = [ | ||||
| 			%   [ $c->l('dat_ntp_server'),   'dat_ntp_server' ], | ||||
| 			%   [ $c->l('dat_manually_set'), 'dat_manually_set' ] | ||||
| 			% ]; | ||||
| 			<h2><%= $c->l('Time Configuration') %></h2> | ||||
| 			%= form_for "datetimeu" => (method => 'post') => begin | ||||
|   <h1><%= $title %></h1><br> | ||||
|   %= $modul | ||||
|   <% my $btn = l('SAVE'); %> | ||||
|   <br /><br /> | ||||
|   <span> | ||||
|     %= label_for 'real-time-clock' => $c->l('dat_The_time_is_currently'), class => 'datetime-clock-label'; | ||||
|   </span><span class=data2> | ||||
|     <!-- | ||||
|     <div id="real-time-clock"></div> | ||||
|     --> | ||||
|     %= text_field 'clock', id => 'real-time-clock', readonly => 'readonly', class => 'datetime-clock', value => $dat_data->{currentdatetime}; | ||||
|   </span> | ||||
|   % if ($dat_data->{ntpstatus} eq 'disabled') { | ||||
|     <div class='datetime-set-ntp'> | ||||
|       %= l 'dat_NTP_ENABLE_DESC' | ||||
|       <br> | ||||
|     </div> | ||||
|   % } 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 $mode_options = [ | ||||
|   % [ $c->l('dat_ntp_server'), 'dat_ntp_server' ], | ||||
|   % [ $c->l('dat_manually_set'), 'dat_manually_set' ] | ||||
|   % ]; | ||||
|   <h2><%= $c->l('Time Configuration') %></h2> | ||||
|   %= form_for "datetimeu" => ( method => 'post' ) => begin | ||||
|  | ||||
| 				%= hidden_field 'Old_ntpstatus' => $dat_data->{ntpstatus}; | ||||
| 				%= hidden_field 'trt' => $dat_data->{trt}; | ||||
|     %= hidden_field 'Old_ntpstatus' => $dat_data->{ntpstatus}; | ||||
|     %= hidden_field 'trt' => $dat_data->{trt}; | ||||
|  | ||||
| 				<span class=label> | ||||
| 					%= label_for time_mode => $c->l('Time Setting Mode:') | ||||
| 				</span><span class=data2> | ||||
| 					% param 'time_mode' => $dat_data->{time_mode} unless param 'time_mode'; | ||||
| 					%= select_field time_mode => ($mode_options, id => 'time_mode_select') | ||||
| 				</span> | ||||
|     <span class=label> | ||||
|       %= label_for time_mode => $c->l('Time Setting Mode:') | ||||
|     </span><span class=data2> | ||||
|       % param 'time_mode' => $dat_data->{time_mode} unless param 'time_mode'; | ||||
|       %= select_field time_mode => ( $mode_options, id => 'time_mode_select' ) | ||||
|     </span> | ||||
|  | ||||
| 				<div id='ntp_section'> | ||||
| 					<p> | ||||
| 						%= $c->l('dat_NTP_CONFIGURE_DESC') | ||||
| 					</p> | ||||
| 					<div class='datetime-config-row'> | ||||
| 						<div class='datetime-label-col'> | ||||
| 							<span class='datetime-label'> | ||||
| 								%= label_for ntpserver => $c->l('dat_NTP_Server_URL') | ||||
| 							</span> | ||||
| 						</div>	 | ||||
| 						<div class=datetime-fields-col> | ||||
| 							% 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'; | ||||
| 							%= text_field ntpserver => placeholder => 'e.g. smeserver.pool.ntp.org', id => 'ntpserver', pattern => $server_check, title => 'Enter a valid hostname or IPv4 address', required => 'required' | ||||
| 							<button type="button" id="test-ntp-btn" class="btn btn-primary ml-2">Test Server</button> | ||||
| 							<span id="ntp-test-result" class="ntp-test-result ml-2"></span> | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
|     <div id='ntp_section'> | ||||
|       <p> | ||||
|         %= $c->l('dat_NTP_CONFIGURE_DESC') | ||||
|       </p> | ||||
|       <div class='datetime-config-row'> | ||||
|         <div class='datetime-label-col'> | ||||
|           <span class='datetime-label'> | ||||
|             %= label_for ntpserver => $c->l('dat_NTP_Server_URL') | ||||
|           </span> | ||||
|         </div> | ||||
|         <div class=datetime-fields-col> | ||||
|           % 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'; | ||||
|           %= text_field ntpserver => placeholder => 'e.g. smeserver.pool.ntp.org', id => 'ntpserver', pattern => $server_check, title => 'Enter a valid hostname or IPv4 address', required => 'required'; | ||||
|           <button type="button" id="test-ntp-btn" class="btn btn-primary ml-2">Test Server</button> | ||||
|           <span id="ntp-test-result" class="ntp-test-result ml-2"></span> | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|  | ||||
| 				<div id='manual_section'> | ||||
| 					<p> | ||||
| 						%= $c->l('dat_NTP_DISABLE_DESC') | ||||
| 					</p> | ||||
| 					<div class='datetime-config-row'> | ||||
| 						<div class='datetime-label-col'> | ||||
| 							<span class='datetime-label'> | ||||
| 								%= label_for 'datetime_manual' => $c->l('dat_set_manually') | ||||
| 							</span> | ||||
| 						</div> | ||||
| 						<div class='datetime-fields-col' id='datetime_manual'> | ||||
| 							<fieldset> | ||||
| 								<legend><%= $c->l('Date') %></legend> | ||||
| 								%= label_for year => $c->l('Year:') | ||||
| 								% param 'year' => ($dat_data->{year}) unless param 'year'; | ||||
| 								%= select_field year => ($year_options, id => 'year'), required => 'required' | ||||
| 								  | ||||
|     <div id='manual_section'> | ||||
|       <p> | ||||
|         %= $c->l('dat_NTP_DISABLE_DESC') | ||||
|       </p> | ||||
|       <div class='datetime-config-row'> | ||||
|         <div class='datetime-label-col'> | ||||
|           <span class='datetime-label'> | ||||
|             %= label_for 'datetime_manual' => $c->l('dat_set_manually') | ||||
|           </span> | ||||
|         </div> | ||||
|         <div class='datetime-fields-col' id='datetime_manual'> | ||||
|           <fieldset> | ||||
|             <legend><%= $c->l('Date') %></legend> | ||||
|             %= label_for year => $c->l('Year:') | ||||
|             % param 'year' => ( $dat_data->{year} ) unless param 'year'; | ||||
|             %= select_field year => ( $year_options, id => 'year' ), required => 'required' | ||||
|               | ||||
|  | ||||
| 								%= label_for month => $c->l('Month:') | ||||
| 								% param 'month' => ($dat_data->{month}) unless param 'month'; | ||||
| 								%= select_field month => ($month_options, id => 'month'), required => 'required' | ||||
| 								  | ||||
|             %= label_for month => $c->l('Month:') | ||||
|             % param 'month' => ( $dat_data->{month} ) unless param 'month'; | ||||
|             %= select_field month => ( $month_options, id => 'month' ), required => 'required' | ||||
|               | ||||
|  | ||||
| 								%= label_for day => $c->l('Day:') | ||||
| 								% param 'day' => ($dat_data->{day}) unless param 'day'; | ||||
| 								%= text_field day => id => 'day', size => 2, maxlength => 2, placeholder => 'DD', pattern => '^(0[1-9]|[12][0-9]|3[01])$', title => 'Day (01-31)', required => 'required', inputmode => 'numeric', autocomplete => 'off' | ||||
| 							</fieldset> | ||||
| 								 | ||||
| 							<fieldset> | ||||
| 								<legend><%= $c->l('Time') %></legend> | ||||
| 								%= label_for hour => $c->l('Hour:') | ||||
| 								% param 'hour' => ($dat_data->{hour}) unless param 'hour'; | ||||
| 								%= select_field hour => ($hour_options, id => 'hour'), required => 'required' | ||||
| 								  | ||||
|             %= label_for day => $c->l('Day:') | ||||
|             % param 'day' => ( $dat_data->{day} ) unless param 'day'; | ||||
|             %= text_field day => id => 'day', size => 2, maxlength => 2, placeholder => 'DD', pattern => '^(0[1-9]|[12][0-9]|3[01])$', title => 'Day (01-31)', required => 'required', inputmode => 'numeric', autocomplete => 'off'; | ||||
|           </fieldset> | ||||
|  | ||||
| 								%= label_for minute => $c->l('Minute:') | ||||
| 								% param 'minute' => ($dat_data->{minute}) unless param 'minute'; | ||||
| 								%= 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' | ||||
| 								  | ||||
|           <fieldset> | ||||
|             <legend><%= $c->l('Time') %></legend> | ||||
|             %= label_for hour => $c->l('Hour:') | ||||
|             % param 'hour' => ( $dat_data->{hour} ) unless param 'hour'; | ||||
|             %= select_field hour => ( $hour_options, id => 'hour' ), required => 'required' | ||||
|               | ||||
|  | ||||
| 								%= label_for second => $c->l('Second:') | ||||
| 								% param 'second' => ($dat_data->{second}) unless param 'second'; | ||||
| 								%= text_field second => id => 'second', size => 2, maxlength => 2, placeholder => 'SS', pattern => '^[0-5][0-9]$', title => 'Second (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off' | ||||
| 							</fieldset> | ||||
| 						</div> | ||||
| 					</div> | ||||
| 					<div class='datetime-config-row'> | ||||
| 						<div class='datetime-label-col'> | ||||
| 							<span class='datetime-label'> | ||||
| 								%=l 'dat_TZ' | ||||
| 							</span> | ||||
| 						</div> | ||||
| 						<div class='datetime-fields-col' id='datetime_manual'> | ||||
| 									% param 'Timezone' => $c->getTimezone() unless param 'Timezone'; | ||||
| 									%= select_field 'Timezone' =>  $c->getZone_list(), class => 'input' | ||||
| 						</div> | ||||
| 					</div> | ||||
| 				</div> | ||||
| 				%= submit_button $btn, class => 'action' | ||||
| 			% end | ||||
| 		% } | ||||
| 	</div> | ||||
|             %= label_for minute => $c->l('Minute:') | ||||
|             % param 'minute' => ( $dat_data->{minute} ) unless param 'minute'; | ||||
|             %= 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'; | ||||
|             %= text_field second => id => 'second', size => 2, maxlength => 2, placeholder => 'SS', pattern => '^[0-5][0-9]$', title => 'Second (00-59)', required => 'required', inputmode => 'numeric', autocomplete => 'off'; | ||||
|           </fieldset> | ||||
|         </div> | ||||
|       </div> | ||||
|       <div class='datetime-config-row'> | ||||
|         <div class='datetime-label-col'> | ||||
|           <span class='datetime-label'> | ||||
|             %= l 'dat_TZ' | ||||
|           </span> | ||||
|         </div> | ||||
|         <div class='datetime-fields-col' id='datetime_manual'> | ||||
|           % param 'Timezone' => $c->getTimezone() unless param 'Timezone'; | ||||
|           %= select_field 'Timezone' => $c->getZone_list(), class => 'input' | ||||
|         </div> | ||||
|       </div> | ||||
|     </div> | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   % end | ||||
|   % } | ||||
| </div> | ||||
| % end | ||||
| 1; | ||||
| 1; | ||||
|   | ||||
| @@ -2,12 +2,12 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module default-panel'> | ||||
|   <div id='module' class='module default-panel'> | ||||
|     <p><%= $title %></p> | ||||
|     <%= $modul %> | ||||
|     <p> | ||||
|     	%= link_to Initial => '/' | ||||
|       %= link_to Initial => '/' | ||||
|     </p> | ||||
| </div> | ||||
|   </div> | ||||
|  | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,88 +1,87 @@ | ||||
| % layout 'default', title => "Sme server 2 - directory"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module directory-panel'> | ||||
|   <div id='module' class='module directory-panel'> | ||||
|  | ||||
|     %if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	(DBG)route: <%= $c->current_route %><br> | ||||
| 	(DBG)dir. access: <%= $dir_datas->{access}%><br> | ||||
| 	</p> | ||||
|     %} | ||||
|      | ||||
|     <h1><%= $title %></h1> | ||||
|     % if (config->{debug} == 1) { | ||||
|       <p> | ||||
|         (DBG)route: <%= $c->current_route %><br> | ||||
|         (DBG)dir. access: <%= $dir_datas->{access} %><br> | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|   <h1><%= $title %></h1> | ||||
|   <br> | ||||
|   <%= $modul %> | ||||
|   <% 	my $btn = l('SAVE');  %> | ||||
|  | ||||
|  | ||||
|   %= form_for 'directory' => ( method => 'POST' ) => begin | ||||
|     <br> | ||||
|     <%= $modul %> | ||||
|     <% 	my $btn = l('SAVE'); | ||||
|      %> | ||||
|  | ||||
|  | ||||
|     %= form_for 'directory' => (method => 'POST') => begin | ||||
| 	<br> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%= l('dir_LABEL_ROOT'), class => 'label' | ||||
| 	</span>	<span class=data> | ||||
| 	%= $dir_datas->{root}, class => 'data'  | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	%=l 'dir_DESC_DIRECTORY_ACCESS', class => 'desc' | ||||
| 	<br> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_DIRECTORY_ACCESS', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'access' => $dir_datas->{access} unless param 'access'; | ||||
| 	%= select_field 'access' =>  [[ (l 'NETWORKS_ALLOW_LOCAL') => 'private'], [ (l 'NETWORKS_ALLOW_PUBLIC') => 'public']], class => 'input', id => 'access' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	%=l 'dir_DESC_DEPARTMENT', class => 'desc' | ||||
| 	<br><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_DEPARTMENT', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'department' =>  $dir_datas->{department}, class => 'input' | ||||
| 	</span> | ||||
| 	</p><p> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_COMPANY', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'company', $dir_datas->{company}, class => 'input' | ||||
| 	</span> | ||||
| 	</p><p> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_STREET', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'street' =>  $dir_datas->{street}, class => 'input' | ||||
| 	</span> | ||||
| 	</p><p> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_CITY', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'city', $dir_datas->{city}, class => 'input' | ||||
| 	</span> | ||||
| 	</p><p> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_PHONENUMBER', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'phonenumber', $dir_datas->{phonenumber}, class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	%=l 'dir_DESC_EXISTING', class => 'desc' | ||||
| 	<br><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'dir_EXISTING', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'existing'=> [[ (l 'dir_LEAVE') => 'leave'], [ (l 'dir_UPDATE') => 'update' ]], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     % end     | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l('dir_LABEL_ROOT'), class => 'label' | ||||
|       </span>	<span class=data> | ||||
|         %= $dir_datas->{root}, class => 'data' | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       %= l 'dir_DESC_DIRECTORY_ACCESS', class => 'desc' | ||||
|       <br> | ||||
|       <span class=label> | ||||
|         %= l 'dir_DIRECTORY_ACCESS', class => 'label' | ||||
|       </span><span class=data> | ||||
|         % param 'access' => $dir_datas->{access} unless param 'access'; | ||||
|         %= select_field 'access' => [ [ ( l 'NETWORKS_ALLOW_LOCAL' ) => 'private' ], [ ( l 'NETWORKS_ALLOW_PUBLIC' ) => 'public' ] ], class => 'input', id => 'access'; | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       %= l 'dir_DESC_DEPARTMENT', class => 'desc' | ||||
|       <br><br> | ||||
|       <span class=label> | ||||
|         %= l 'dir_DEPARTMENT', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'department' => $dir_datas->{department}, class => 'input' | ||||
|       </span> | ||||
|     </p><p> | ||||
|       <span class=label> | ||||
|         %= l 'dir_COMPANY', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'company', $dir_datas->{company}, class => 'input' | ||||
|       </span> | ||||
|     </p><p> | ||||
|       <span class=label> | ||||
|         %= l 'dir_STREET', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'street' => $dir_datas->{street}, class => 'input' | ||||
|       </span> | ||||
|     </p><p> | ||||
|       <span class=label> | ||||
|         %= l 'dir_CITY', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'city', $dir_datas->{city}, class => 'input' | ||||
|       </span> | ||||
|     </p><p> | ||||
|       <span class=label> | ||||
|         %= l 'dir_PHONENUMBER', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'phonenumber', $dir_datas->{phonenumber}, class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       %= l 'dir_DESC_EXISTING', class => 'desc' | ||||
|       <br><br> | ||||
|       <span class=label> | ||||
|         %= l 'dir_EXISTING', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= select_field 'existing' => [ [ ( l 'dir_LEAVE' ) => 'leave' ], [ ( l 'dir_UPDATE' ) => 'update' ] ], class => 'input'; | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
| @@ -1,32 +1,32 @@ | ||||
| % layout 'default', title => "Sme server 2 - domains"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module domains-panel'> | ||||
|   <div id='module' class='module domains-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $dom_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $dom_datas | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     % if ($dom_datas->{trt} eq 'ADD' or $dom_datas->{trt} eq 'UPD') { | ||||
| 	%= include 'partials/_dom_upd' | ||||
|     %} elsif ($dom_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_dom_del' | ||||
|     %} elsif ($dom_datas->{trt} eq 'UP2') { | ||||
| 	    %= include 'partials/_dom_up2' | ||||
|     %} else { | ||||
|         %= include 'partials/_dom_list' | ||||
|     %} | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|   % if ($dom_datas->{trt} eq 'ADD' or $dom_datas->{trt} eq 'UPD') { | ||||
|     %= include 'partials/_dom_upd' | ||||
|   % } elsif ($dom_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_dom_del' | ||||
|   % } elsif ($dom_datas->{trt} eq 'UP2') { | ||||
|   %= include 'partials/_dom_up2' | ||||
|   % } else { | ||||
|   %= include 'partials/_dom_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,70 +1,70 @@ | ||||
| %# | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20  | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 | ||||
| %# | ||||
| % layout 'default', title => "Sme server 2 - E-Mail", share_dir => './'; | ||||
| %# css specific to this panel: | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| % use constant FALSE => 0; | ||||
| % use constant TRUE  => 1; | ||||
|   % use constant FALSE => 0; | ||||
|   % use constant TRUE => 1; | ||||
|  | ||||
| <div id="module" class="module Emailsettings-panel"> | ||||
|   <div id="module" class="module Emailsettings-panel"> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<pre> | ||||
|       <pre> | ||||
| 		%= dumper $c->current_route | ||||
| 		%= dumper $mai_data->{trt} | ||||
| 	</pre> | ||||
|     % } | ||||
|      | ||||
|     <h1><%=$title%></h1> | ||||
|  | ||||
|     % if ( stash('modul')) { | ||||
| 	%= $c->render_to_string(inline => stash('modul') ); | ||||
|       </pre> | ||||
|     % } | ||||
|  | ||||
|    	%if ($c->stash('first')) { | ||||
| 	    <br><p> | ||||
| 		%=$c->render_to_string(inline =>$c->l($c->stash('first'))) | ||||
| 		</p> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
| 	%} elsif ($c->stash('success')) { | ||||
| 		<div class='success '> | ||||
| 				%= $c->l($c->stash('success')); | ||||
| 		</div> | ||||
| 		<br /> | ||||
|   % if ( stash('modul')) { | ||||
|     %= $c->render_to_string( inline => stash('modul') ); | ||||
|   % } | ||||
|  | ||||
| 	%} elsif ($c->stash('error')) {  | ||||
| 	   <div class='sme-error'> | ||||
| 				%= $c->l($c->stash('error')); | ||||
|     	</div> | ||||
| 		<br /> | ||||
| 	%} | ||||
|   % if ($c->stash('first')) { | ||||
|     <br><p> | ||||
|       %= $c->render_to_string( inline => $c->l( $c->stash('first') ) ) | ||||
|     </p> | ||||
|  | ||||
|   % } elsif ($c->stash('success')) { | ||||
|   <div class='success '> | ||||
|     %= $c->l( $c->stash('success') ); | ||||
|   </div> | ||||
|   <br /> | ||||
|  | ||||
|   % } elsif ($c->stash('error')) { | ||||
|   <div class='sme-error'> | ||||
|     %= $c->l( $c->stash('error') ); | ||||
|   </div> | ||||
|   <br /> | ||||
|   % } | ||||
|  | ||||
|   %# Routing to partials according to trt parameter. | ||||
|   %# This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement' | ||||
|  | ||||
|   % if ($mai_data->{trt} eq "FRONT") { | ||||
|     %= include 'partials/_mai_FRONT' | ||||
|   % } | ||||
|  | ||||
|   % if ($mai_data->{trt} eq "ACC") { | ||||
|     %= include 'partials/_mai_ACC' | ||||
|   % } | ||||
|  | ||||
|   % if ($mai_data->{trt} eq "FIL") { | ||||
|     %= include 'partials/_mai_FIL' | ||||
|   % } | ||||
|  | ||||
|   % if ($mai_data->{trt} eq "REC") { | ||||
|     %= include 'partials/_mai_REC' | ||||
|   % } | ||||
|  | ||||
|   % if ($mai_data->{trt} eq "DEL") { | ||||
|     %= include 'partials/_mai_DEL' | ||||
|   % } | ||||
|  | ||||
| 	%#Routing to partials according to trt parameter. | ||||
| 	%#This ought to be cascading if/then/elsif, but is easier to just stack the if/then's rather like a case statement' | ||||
| 	 | ||||
| 	% if ($mai_data->{trt} eq "FRONT") { | ||||
| 		%= include 'partials/_mai_FRONT' | ||||
| 	%} | ||||
| 	 | ||||
| 	% if ($mai_data->{trt} eq "ACC") { | ||||
| 		%= include 'partials/_mai_ACC' | ||||
| 	%} | ||||
| 	 | ||||
| 	% if ($mai_data->{trt} eq "FIL") { | ||||
| 		%= include 'partials/_mai_FIL' | ||||
| 	%} | ||||
| 	 | ||||
| 	% if ($mai_data->{trt} eq "REC") { | ||||
| 		%= include 'partials/_mai_REC' | ||||
| 	%} | ||||
| 	 | ||||
| 	% if ($mai_data->{trt} eq "DEL") { | ||||
| 		%= include 'partials/_mai_DEL' | ||||
| 	%} | ||||
| 	 | ||||
|  | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,23 +1,31 @@ | ||||
| % layout 'default', title => "Sme server 2 -  embedded"; | ||||
| % layout 'default', title => "Sme server 2 - embedded"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module module-panel'> | ||||
|   <div id='module' class='module module-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
| 		<p> | ||||
| 			%= dumper $c->current_route | ||||
| 		</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|       </p> | ||||
|     % } | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
| 			%= $c->render_to_string(inline => stash 'error')  | ||||
| 		</div> | ||||
|     %} | ||||
|     <h1> Embedded - <%=$title %></h1><br> | ||||
|     <p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>. Or by clicking on the "Legacy SM" button at the top of the window.</p> | ||||
|     % my $height = $c->stash('height') | '600px'; | ||||
|     % if ($height !~ /px$/) { $height = $height.'px';} | ||||
| 	<object id="legacy-embedded" class="legacy-embedded" data="<%=$c->stash('modul') %>" style="width:99%;height:<%= $height %>;" title="<%= $c->stash('title') %>"  type="text/html" ><%= $c->stash('title') %> not found</object> | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|   <h1> Embedded - <%= $title %></h1><br> | ||||
|   <p>If the legacy panel does not appear, then you may not be logged into the original Server manager.<br />You can log in by clicking <a href="/server-manager" target='_blank'>here</a>.</p> | ||||
|   % my $height = $c->stash('height') || '600px'; | ||||
|   % if ( $height !~ /px$/ ) { $height = $height . 'px'; } | ||||
|   % # Add the height as a data attribute | ||||
|   <object id="legacy-embedded"  | ||||
|           class="legacy-embedded"  | ||||
|           data="<%= $c->stash('modul') %>"  | ||||
|           data-legacy-height="<%= $height %>" | ||||
|           title="<%= $c->stash('title') %>"   | ||||
|           type="text/html"> | ||||
|     <%= $c->stash('title') %> not found | ||||
|   </object> | ||||
| </div> | ||||
|  | ||||
| %end | ||||
| % end | ||||
| @@ -2,16 +2,16 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id="central" class="sme-error module"> | ||||
|     <p><br>dev<br> Oups !!!  | ||||
|         The page you were requesting | ||||
|         "<%= $self->req->url->path || '/' %>" | ||||
|         caused en exception !! | ||||
|     <br>dev<br> | ||||
|   <div id="central" class="sme-error module"> | ||||
|     <p><br>dev<br> Oups !!! | ||||
|       The page you were requesting | ||||
|       "<%= $self->req->url->path || '/' %>" | ||||
|       caused en exception !! | ||||
|       <br>dev<br> | ||||
|     </p> | ||||
|     <p> | ||||
|     	%= link_to Back => '/' | ||||
|       %= link_to Back => '/' | ||||
|     </p> | ||||
| </div> | ||||
|   </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,33 +1,33 @@ | ||||
| % layout 'default', title => "Sme server 2 - groups"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module groups-panel'> | ||||
|   <div id='module' class='module groups-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $grp_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $grp_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|      | ||||
|     <h1><%= $title%></h1> | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     % if ($grp_datas->{trt} eq 'ADD') { | ||||
| 	%= include 'partials/_grp_add' | ||||
|     %} elsif ($grp_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_grp_del' | ||||
| 	%} elsif ($grp_datas->{trt} eq 'UPD') { | ||||
| 		%= include 'partials/_grp_upd' | ||||
| 	    %} else { | ||||
| 		%= include 'partials/_grp_list' | ||||
| 	    %} | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|   % if ($grp_datas->{trt} eq 'ADD') { | ||||
|     %= include 'partials/_grp_add' | ||||
|   % } elsif ($grp_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_grp_del' | ||||
|   % } elsif ($grp_datas->{trt} eq 'UPD') { | ||||
|   %= include 'partials/_grp_upd' | ||||
|   % } else { | ||||
|   %= include 'partials/_grp_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|  | ||||
|   | ||||
| @@ -1,35 +1,35 @@ | ||||
| % layout 'default', title => "Sme server 2 - hostentries"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module hostentries-panel'> | ||||
|   <div id='module' class='module hostentries-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $hos_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $hos_datas | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     <h1><%= $title%></h1> | ||||
|  | ||||
|     % if ( $notif ) { | ||||
| 	<br> | ||||
| 	<span class=sme-error> | ||||
| 	<%= $c->render_to_string(inline => $notif) %> | ||||
| 	</span> | ||||
|     %} | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     % if ($hos_datas->{trt} eq 'ADD' or $hos_datas->{trt} eq 'UPD') { | ||||
| 	%= include 'partials/_hos_upd' | ||||
|     %} elsif ($hos_datas->{trt} eq 'DEL') { | ||||
| 	%= include 'partials/_hos_del' | ||||
|     %} elsif ( $hos_datas->{trt} eq 'ALC' or $hos_datas->{trt} eq 'ULC') { | ||||
| 	%= include 'partials/_hos_ulc' | ||||
|     %} elsif ( $hos_datas->{trt} eq 'ARM' or $hos_datas->{trt} eq 'URM') { | ||||
| 	%= include 'partials/_hos_urm' | ||||
|     %} else { | ||||
| 	%= include 'partials/_hos_list' | ||||
|     %} | ||||
|   % if ( $notif ) { | ||||
|     <br> | ||||
|     <span class=sme-error> | ||||
|       <%= $c->render_to_string( inline => $notif ) %> | ||||
|     </span> | ||||
|   % } | ||||
|  | ||||
|   % if ($hos_datas->{trt} eq 'ADD' or $hos_datas->{trt} eq 'UPD') { | ||||
|     %= include 'partials/_hos_upd' | ||||
|   % } elsif ($hos_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_hos_del' | ||||
|   % } elsif ( $hos_datas->{trt} eq 'ALC' or $hos_datas->{trt} eq 'ULC') { | ||||
|   %= include 'partials/_hos_ulc' | ||||
|   % } elsif ( $hos_datas->{trt} eq 'ARM' or $hos_datas->{trt} eq 'URM') { | ||||
|   %= include 'partials/_hos_urm' | ||||
|   % } else { | ||||
|   %= include 'partials/_hos_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,39 +1,39 @@ | ||||
| % layout 'default', title => "Sme server 2 - ibays"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module ibays-panel'> | ||||
|   <div id='module' class='module ibays-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $iba_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $iba_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     % if ( stash 'modul' ) { | ||||
| 	%= $c->render_to_string(inline => stash 'modul' ); | ||||
|     % } | ||||
|   % if ( stash 'modul' ) { | ||||
|     %= $c->render_to_string( inline => stash 'modul' ); | ||||
|   % } | ||||
|  | ||||
|     % if ($iba_datas->{trt} eq 'ADD') { | ||||
| 	%= include 'partials/_iba_upd' | ||||
|     %} elsif ($iba_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_iba_del' | ||||
| 	%} elsif ($iba_datas->{trt} eq 'UPD') { | ||||
| 		%= include 'partials/_iba_upd' | ||||
| 		%} elsif ($iba_datas->{trt} eq 'PWD') { | ||||
| 		    %= include 'partials/_iba_pwd' | ||||
| 		%} else { | ||||
| 		    %= include 'partials/_iba_list' | ||||
| 		%} | ||||
|   % if ($iba_datas->{trt} eq 'ADD') { | ||||
|     %= include 'partials/_iba_upd' | ||||
|   % } elsif ($iba_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_iba_del' | ||||
|   % } elsif ($iba_datas->{trt} eq 'UPD') { | ||||
|   %= include 'partials/_iba_upd' | ||||
|   % } elsif ($iba_datas->{trt} eq 'PWD') { | ||||
|   %= include 'partials/_iba_pwd' | ||||
|   % } else { | ||||
|   %= include 'partials/_iba_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|  | ||||
|   | ||||
| @@ -2,27 +2,27 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	</p> | ||||
|     % } | ||||
|   % if (config->{debug} == 1) { | ||||
|     <p> | ||||
|       %= dumper $c->current_route | ||||
|     </p> | ||||
|   % } | ||||
|  | ||||
| <div id='central' class='central initial-panel module'> | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h3> | ||||
|   <h3> | ||||
|     %= $title | ||||
|     </h3>  | ||||
|     <br> | ||||
|     <p> | ||||
|   </h3> | ||||
|   <br> | ||||
|   <p> | ||||
|     %= $modul | ||||
|     </p> | ||||
|   </p> | ||||
| </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,32 +1,32 @@ | ||||
| % layout 'default', title => "Sme server 2 - localnetworks"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module localnetworks-panel'> | ||||
|   <div id='module' class='module localnetworks-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $c->stash("ret") | ||||
|     %= dumper $c->param("localnetwork"); | ||||
|     %= dumper $c->stash("ln_datas"); | ||||
|     %= dumper $c->param("deletehost"); | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $c->stash("ret") | ||||
|         %= dumper $c->param("localnetwork"); | ||||
|         %= dumper $c->stash("ln_datas"); | ||||
|         %= dumper $c->param("deletehost"); | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     <h1><%= $title%></h1> | ||||
|      %= $modul | ||||
|  | ||||
|     % if ($ln_datas->{trt} eq 'ADD') { | ||||
| 		%= include 'partials/_ln_add' | ||||
|     %} elsif ($ln_datas->{trt} eq 'ADD1') { | ||||
| 	    %= include 'partials/_ln_add' | ||||
|     %} elsif ($ln_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_ln_del' | ||||
| 	%} elsif ($ln_datas->{trt} eq 'DEL1'){ | ||||
| 		%= include 'partials/_ln_list' | ||||
| 	%} else { | ||||
| 		%= include 'partials/_ln_list' | ||||
| 	%} | ||||
|   <h1><%= $title %></h1> | ||||
|   %= $modul | ||||
|  | ||||
|   % if ($ln_datas->{trt} eq 'ADD') { | ||||
|     %= include 'partials/_ln_add' | ||||
|   % } elsif ($ln_datas->{trt} eq 'ADD1') { | ||||
|   %= include 'partials/_ln_add' | ||||
|   % } elsif ($ln_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_ln_del' | ||||
|   % } elsif ($ln_datas->{trt} eq 'DEL1'){ | ||||
|   %= include 'partials/_ln_list' | ||||
|   % } else { | ||||
|   %= include 'partials/_ln_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -2,68 +2,68 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id='module' class='module login-panel'> | ||||
|   <div id='module' class='module login-panel'> | ||||
|  | ||||
|     %if ( config 'debug' ) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%if ( stash 'trt' ) { | ||||
| 	    %= dumper stash 'trt' | ||||
| 	%} | ||||
| 	</p> | ||||
|     %} | ||||
|     % if ( config 'debug' ) { | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         % if ( stash 'trt' ) { | ||||
|           %= dumper stash 'trt' | ||||
|         % } | ||||
|     </p> | ||||
|   % } | ||||
|  | ||||
| % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
| %} | ||||
|  | ||||
| % my $btn = l('use_SIGNIN'); | ||||
| % if ( $trt eq 'RESET' ) { | ||||
|     	<br><div class=sme-error><h2> | ||||
|     	%= $c->render_to_string(inline => l 'use_DESC_RESET')  | ||||
| 	</h2></div> | ||||
| 	% $btn = l('use_RESET'); | ||||
| %} | ||||
|  | ||||
|     <h1> | ||||
|     %=l 'use_TITLE' | ||||
|     </h1> | ||||
|  | ||||
|     %= form_for '/login' => (method => 'POST') => begin | ||||
|  | ||||
|     <p><span class=label> | ||||
|     %=l 'USER_NAME' | ||||
|     </span><span class=input> | ||||
|     %= text_field 'Username' | ||||
|     </span></p> | ||||
|  | ||||
| % if ( $trt ne 'RESET' ) { | ||||
|     <p><span class=label> | ||||
|     %=l 'PASSWORD' | ||||
|     </span><span class=input> | ||||
|     %= password_field 'Password', id => 'id_password', autocomplete => 'current-password', class=>'sme-password' | ||||
|     % if (config 'hasJquery') { | ||||
| 	%#<a href='#' id='togglePassword' class='toggle-password tg-icon'> <img src="images/visible.png" height="16" alt="Visible"></a> | ||||
|     % } | ||||
|     </span></p> | ||||
| %} | ||||
|  | ||||
|     %= hidden_field 'From' => $c->tx->req->url | ||||
|     %= hidden_field 'Trt' => $trt | ||||
|  | ||||
|     <br> | ||||
|     <div class='center'> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|     %if ( config 'pwdreset' ) { | ||||
| 	<div class='center'><a href='login2'> | ||||
|         %=l 'use_FORGOT' | ||||
|         </a></div> | ||||
|     %} | ||||
|   % } | ||||
|  | ||||
|   % my $btn = l('use_SIGNIN'); | ||||
|   % if ( $trt eq 'RESET' ) { | ||||
|     <br><div class=sme-error><h2> | ||||
|         %= $c->render_to_string( inline => l 'use_DESC_RESET' ) | ||||
|     </h2></div> | ||||
|     % $btn = l('use_RESET'); | ||||
|   % } | ||||
|  | ||||
|   <h1> | ||||
|     %= l 'use_TITLE' | ||||
|   </h1> | ||||
|  | ||||
|   %= form_for '/login' => ( method => 'POST' ) => begin | ||||
|  | ||||
|     <p><span class=label> | ||||
|         %= l 'USER_NAME' | ||||
|       </span><span class=input> | ||||
|         %= text_field 'Username' | ||||
|     </span></p> | ||||
|  | ||||
|     % if ( $trt ne 'RESET' ) { | ||||
|       <p><span class=label> | ||||
|           %= l 'PASSWORD' | ||||
|         </span><span class=input> | ||||
|           %= password_field 'Password', id => 'id_password', autocomplete => 'current-password', class => 'sme-password'; | ||||
|           % if (config 'hasJquery') { | ||||
|             %# <a href='#' id='togglePassword' class='toggle-password tg-icon'> <img src="images/visible.png" height="16" alt="Visible"></a> | ||||
|           % } | ||||
|     </span></p> | ||||
|   % } | ||||
|  | ||||
|   %= hidden_field 'From' => $c->tx->req->url | ||||
|   %= hidden_field 'Trt' => $trt | ||||
|  | ||||
|   <br> | ||||
|   <div class='center'> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </div> | ||||
|   % if ( config 'pwdreset' ) { | ||||
|     <div class='center'><a href='login2'> | ||||
|         %= l 'use_FORGOT' | ||||
|     </a></div> | ||||
|   % } | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,9 +1,9 @@ | ||||
| % layout 'default', title => 'Sme server 2 - Manual'; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module manual-panel'> | ||||
|   <div id='module' class='module manual-panel'> | ||||
|     <p><h1><%= $title %></h1></p> | ||||
|     %= $c->render_to_string( inline => stash 'modul' ) | ||||
| </div> | ||||
|   </div> | ||||
|  | ||||
| % end | ||||
|   | ||||
| @@ -1,27 +1,27 @@ | ||||
| % layout 'default', title => "Sme server 2 - module"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| %= stylesheet '/css/module.css' | ||||
| <div id='module' class='module module-panel'> | ||||
|   %= stylesheet '/css/module.css' | ||||
|   <div id='module' class='module module-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
|         <p> | ||||
|             <strong>Debug Info:</strong> | ||||
|             <pre><%= dumper $c->current_route %></pre> | ||||
|         </p> | ||||
|       <p> | ||||
|         <strong>Debug Info:</strong> | ||||
|         <pre><%= dumper $c->current_route %></pre> | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     % if (stash 'error') { | ||||
|         <div class="sme-error"> | ||||
|             <strong>Error:</strong><br> | ||||
|             <%= $c->render_to_string(inline => stash 'error') %> | ||||
|         </div> | ||||
|     % } | ||||
|      | ||||
|     <h1><%= $title %></h1> | ||||
|      | ||||
|     <div class="module-content"> | ||||
|         <%= $c->render_to_string(inline => stash 'modul') %> | ||||
|  | ||||
|   % if (stash 'error') { | ||||
|     <div class="sme-error"> | ||||
|       <strong>Error:</strong><br> | ||||
|       <%= $c->render_to_string( inline => stash 'error' ) %> | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|   <div class="module-content"> | ||||
|     <%= $c->render_to_string( inline => stash 'modul' ) %> | ||||
|   </div> | ||||
| </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -2,14 +2,14 @@ | ||||
|  | ||||
| % content_for 'module' => begin | ||||
|  | ||||
| <div id="central" class="sme-error module"> | ||||
|     <p><br>dev<br> Oups !!!  | ||||
|         The page you were requesting | ||||
|         "<%= $self->req->url->path || '/' %>" | ||||
|         could not be found. | ||||
|     <br>dev<br> | ||||
|     	%= link_to Initial => '/Initial' | ||||
|   <div id="central" class="sme-error module"> | ||||
|     <p><br>dev<br> Oups !!! | ||||
|       The page you were requesting | ||||
|       "<%= $self->req->url->path || '/' %>" | ||||
|       could not be found. | ||||
|       <br>dev<br> | ||||
|       %= link_to Initial => '/Initial' | ||||
|     </p> | ||||
| </div> | ||||
|   </div> | ||||
|  | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,10 +1,10 @@ | ||||
| % layout 'defaultlight', title => 'Sme server 2 - Error P'; | ||||
| <div id='central' class='central not_found-panel module'> | ||||
|     <p><br><br> | ||||
|         The page you were requesting | ||||
|         "<%= $self->req->url->path || '/' %>" | ||||
|         could not be found. | ||||
|   <p><br><br> | ||||
|     The page you were requesting | ||||
|     "<%= $self->req->url->path || '/' %>" | ||||
|     could not be found. | ||||
|     <br><br> | ||||
|     	%= link_to Welcome => '/' | ||||
|     </p> | ||||
| </div> | ||||
|     %= link_to Welcome => '/' | ||||
|   </p> | ||||
| </div> | ||||
|   | ||||
| @@ -1,29 +1,29 @@ | ||||
| <div id='dom_del'> | ||||
|  | ||||
|     %	my $btn = l('REMOVE'); | ||||
|     %= form_for '/domains2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'dom_REMOVE_TITLE' | ||||
| 	</h2> | ||||
| 	</p> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   %= form_for '/domains2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'dom_REMOVE_TITLE' | ||||
|       </h2> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%= $c->l('dom_REMOVE_DESCRIPTION', $dom_datas->{domain}, $dom_datas->{description}); | ||||
| 	</p> | ||||
| 	 | ||||
| 	<p><b> | ||||
| 	%= l('dom_ABOUT_TO_REMOVE') | ||||
| 	<b></p> | ||||
|     <p> | ||||
|       %= $c->l( 'dom_REMOVE_DESCRIPTION', $dom_datas->{domain}, $dom_datas->{description} ); | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p><b> | ||||
|         %= l('dom_ABOUT_TO_REMOVE') | ||||
|         <b></p> | ||||
|  | ||||
|         <p> | ||||
|           <br> | ||||
|           %= submit_button "$btn", class => 'action' | ||||
|         </p> | ||||
|  | ||||
|         %= hidden_field 'trt' => $dom_datas->{trt} | ||||
|         %= hidden_field 'Domain' => $dom_datas->{domain} | ||||
|  | ||||
|     % end     | ||||
|       % end | ||||
|  | ||||
| </div> | ||||
|     </div> | ||||
|   | ||||
| @@ -1,122 +1,126 @@ | ||||
| <div id='dom_list'> | ||||
|  | ||||
|     % my $btn = l('dom_ADD_DOMAIN'); | ||||
|   % my $btn = l('dom_ADD_DOMAIN'); | ||||
|  | ||||
|  | ||||
|     %= form_for '/domains' => (method => 'POST') => begin | ||||
|   %= form_for '/domains' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 		%= l('dom_FORM_DESCRIPTION'); | ||||
| 		 | ||||
| 		<p> | ||||
| 		<br> | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		</p> | ||||
|     %= l('dom_FORM_DESCRIPTION'); | ||||
|  | ||||
| 		%= hidden_field 'trt' => 'ADD' | ||||
| 	 | ||||
|     % end | ||||
|  | ||||
| 	<h2> | ||||
| 		%=l 'dom_CURRENT_DOMAINS' | ||||
| 	</h2> | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
| 		<th class='sme-border'> | ||||
| 			%=l 'DOMAIN_NAME' | ||||
| 		</th> | ||||
| 		<th class='sme-border'> | ||||
| 			%=l 'DESCRIPTION_BRIEF' | ||||
| 		</th> | ||||
| 		<th class='sme-border'> | ||||
| 			%=l 'dom_CONTENT' | ||||
| 		</th> | ||||
| 		<th class='sme-border'> | ||||
| 			%=l 'dom_LABEL_NAMESERVERS' | ||||
| 		</th> | ||||
| 		<th class='sme-border'> | ||||
| 			%=l 'ACTION' | ||||
| 		</th> | ||||
| 	</tr> | ||||
| 	</thead><tbody> | ||||
|  | ||||
|     % foreach my $domain ( @$domains ) { | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $domain->{Domain} | ||||
|             %= t td => (class => 'sme-border') => $domain->{'Description'} | ||||
|             %= t td => (class => 'sme-border') => $domain->{'Content'} | ||||
|             %= t td => (class => 'sme-border') => l('dom_' . $domain->{'Nameservers'}) | ||||
|  | ||||
| 		%# 	my $actionModify = "<a href='domains2?CsrfDef=TOKEN&trt=UPD&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-modify-button' title=".l('MODIFY').">".l('MODIFY')."</button>" . "</a>";  | ||||
| 			%my $modify_text = l('MODIFY');  # Localized text | ||||
| 			%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 			%my $domain_name = $domain->{Domain};  # Domain name extracted from the data structure | ||||
| 			%my $actionModify = qq{ | ||||
|                         %       <a href="domains2?CsrfDef=$csrf_token&trt=UPD&Domain=$domain_name"> | ||||
| 			%	<button type='button' class='sme-modify-button' title='$modify_text' > | ||||
| 			%		$modify_text | ||||
| 			%	</button> | ||||
|                         %       </a> | ||||
| 			%}; | ||||
| 			%my $removable = ($domain->{Removable} || 'yes'); | ||||
| 			%my $actionRemove = ' '; | ||||
| 			%if ($removable eq 'yes')  {  | ||||
| 					%my $remove_text = l('REMOVE');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $domain_name = $domain->{Domain};  # Domain name extracted from the data structure | ||||
| 					%$actionRemove = qq{ | ||||
|                                                 %       <a href="domains2?CsrfDef=$csrf_token&trt=DEL&Domain=$domain_name"> | ||||
| 						%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 						%		$remove_text | ||||
| 						%	</button> | ||||
|                                                 %       </a> | ||||
| 					%}; | ||||
| 				%#		$actionRemove = "<a href='domains2?CsrfDef=TOKEN&trt=DEL&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>";  | ||||
| 			%}; | ||||
| 			<td class='sme-border' style="min-width:15em"> | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %> | ||||
| 			</td> | ||||
| 		</tr> | ||||
| 	%	} | ||||
|  | ||||
| 	</tbody> | ||||
|    	</table> | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => 'ADD' | ||||
|  | ||||
|     %= form_for '/domains' => (method => 'POST') => begin | ||||
|   % end | ||||
|  | ||||
| 		<!-- <HR class="sectionbar">--> | ||||
| 		<br> | ||||
|   <h2> | ||||
|     %= l 'dom_CURRENT_DOMAINS' | ||||
|   </h2> | ||||
|   <table class="sme-border TableSort"><thead> | ||||
|       <tr> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'DOMAIN_NAME' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'DESCRIPTION_BRIEF' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'dom_CONTENT' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'dom_LABEL_NAMESERVERS' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ACTION' | ||||
|         </th> | ||||
|       </tr> | ||||
|     </thead><tbody> | ||||
|  | ||||
| 		% my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS'); | ||||
|       % foreach my $domain ( @$domains ) { | ||||
|         <tr> | ||||
|           %= t td => ( class => 'sme-border' ) => $domain->{Domain} | ||||
|           %= t td => ( class => 'sme-border' ) => $domain->{'Description'} | ||||
|           %= t td => ( class => 'sme-border' ) => $domain->{'Content'} | ||||
|           %= t td => ( class => 'sme-border' ) => l( 'dom_' . $domain->{'Nameservers'} ) | ||||
|  | ||||
| 		<h3> | ||||
| 			%= l 'dom_DESC_CORPORATE_DNS_CURRENT' | ||||
| 			</h3> | ||||
|           %# my $actionModify = "<a href='domains2?CsrfDef=TOKEN&trt=UPD&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-modify-button' title=".l('MODIFY').">".l('MODIFY')."</button>" . "</a>"; | ||||
|           % my $modify_text = l('MODIFY'); # Localized text | ||||
|           % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|           % my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure | ||||
|           % my $actionModify = qq{ | ||||
|             % <a href="domains2?CsrfDef=$csrf_token&trt=UPD&Domain=$domain_name" | ||||
|             % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|             % title="$modify_text" aria-label="$modify_text" | ||||
|             % style="background:white;"> | ||||
|             % <span class="ui-icon ui-icon-pencil"></span> | ||||
|             % <span class="ui-button-text">$modify_text</span> | ||||
|             % </a> | ||||
|         % }; | ||||
|       % my $removable = ( $domain->{Removable} || 'yes' ); | ||||
|       % my $actionRemove = ' '; | ||||
|       % if ($removable eq 'yes') { | ||||
|         % my $remove_text = l('REMOVE'); # Localized text | ||||
|         % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|         % my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure | ||||
|         % $actionRemove = qq{ | ||||
|           % <a href="domains2?CsrfDef=$csrf_token&trt=DEL&Domain=$domain_name" | ||||
|           % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|           % title="$remove_text" aria-label="$remove_text" | ||||
|           % style="background:white;"> | ||||
|           % <span class="ui-icon ui-icon-delete"></span> | ||||
|           % <span class="ui-button-text">$remove_text</span> | ||||
|           % </a> | ||||
|       % }; | ||||
|     %# $actionRemove = "<a href='domains2?CsrfDef=TOKEN&trt=DEL&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>"; | ||||
|     % }; | ||||
|     <td class='sme-border' style="min-width:15em"> | ||||
|       <%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|     </td> | ||||
|   </tr> | ||||
|   % } | ||||
|  | ||||
| 		<p> | ||||
| 		<span class=label> | ||||
| 		%=l 'dom_LABEL_CORPORATE_DNS_PRIMARY' | ||||
| 		</span><span class=data> | ||||
| 		%= $dom_datas->{forwarder} | ||||
| 		</span> | ||||
| 		</p> | ||||
| </tbody> | ||||
| </table> | ||||
|  | ||||
| 		% if ($dom_datas->{forwarder2}) { | ||||
| 		<p> | ||||
| 		<span class=label> | ||||
| 		%=l 'dom_LABEL_CORPORATE_DNS_SECONDARY' | ||||
| 		</span><span class=data> | ||||
| 		%= $dom_datas->{forwarder2} | ||||
| 		</span> | ||||
| 		</p> | ||||
| 		% } | ||||
| %= hidden_field 'trt' => 'ADD' | ||||
|  | ||||
| 		<p> | ||||
| 		%= submit_button "$btn2", class => 'action' | ||||
| 		</p> | ||||
| 		%= hidden_field 'trt' => 'UP2' | ||||
|     % end | ||||
| %= form_for '/domains' => ( method => 'POST' ) => begin | ||||
|  | ||||
|   <!-- <HR class="sectionbar">--> | ||||
|   <br> | ||||
|  | ||||
|   % my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS'); | ||||
|  | ||||
|   <h3> | ||||
|     %= l 'dom_DESC_CORPORATE_DNS_CURRENT' | ||||
|   </h3> | ||||
|  | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'dom_LABEL_CORPORATE_DNS_PRIMARY' | ||||
|     </span><span class=data> | ||||
|       %= $dom_datas->{forwarder} | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
|   % if ($dom_datas->{forwarder2}) { | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'dom_LABEL_CORPORATE_DNS_SECONDARY' | ||||
|       </span><span class=data> | ||||
|         %= $dom_datas->{forwarder2} | ||||
|       </span> | ||||
|     </p> | ||||
|   % } | ||||
|  | ||||
| <p> | ||||
|   %= submit_button "$btn2", class => 'action' | ||||
| </p> | ||||
| %= hidden_field 'trt' => 'UP2' | ||||
| % end | ||||
|  | ||||
|  | ||||
|  | ||||
|   | ||||
| @@ -1,37 +1,37 @@ | ||||
| <div id='dom_up2'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/domains2' => (method => 'POST') => begin | ||||
|   %= form_for '/domains2' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p><br> | ||||
| 	%=l 'dom_DESC_CORPORATE_DNS' | ||||
| 	</p> | ||||
|     <p><br> | ||||
|       %= l 'dom_DESC_CORPORATE_DNS' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'dom_LABEL_CORPORATE_DNS_PRIMARY' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Forwarder' => $dom_datas->{forwarder} unless param 'Forwarder'; | ||||
| 	%= text_field 'Forwarder', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'dom_LABEL_CORPORATE_DNS_PRIMARY' | ||||
|       </span><span class=data> | ||||
|         % param 'Forwarder' => $dom_datas->{forwarder} unless param 'Forwarder'; | ||||
|         %= text_field 'Forwarder', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'dom_LABEL_CORPORATE_DNS_SECONDARY', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Forwarder2' => $dom_datas->{forwarder2} unless param 'Forwarder2'; | ||||
| 	%= text_field 'Forwarder2',  class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'dom_LABEL_CORPORATE_DNS_SECONDARY', class => 'label' | ||||
|       </span><span class=data> | ||||
|         % param 'Forwarder2' => $dom_datas->{forwarder2} unless param 'Forwarder2'; | ||||
|         %= text_field 'Forwarder2', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $dom_datas->{trt} | ||||
| 	 | ||||
|     %end | ||||
|     %= hidden_field 'trt' => $dom_datas->{trt} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,70 +1,70 @@ | ||||
| <div id='dom_upd'> | ||||
|  | ||||
|     % 	my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/domains2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
|     % if ( $dom_datas->{trt} eq "ADD" ) { | ||||
| 	%=l 'dom_CREATE_TITLE' | ||||
|     % } else { | ||||
| 	%=l 'dom_MODIFY_TITLE' | ||||
|     % 	$btn = l('MODIFY'); | ||||
|     % } | ||||
| 	</h2> | ||||
| 	</p> | ||||
|   %= form_for '/domains2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         % if ( $dom_datas->{trt} eq "ADD" ) { | ||||
|           %= l 'dom_CREATE_TITLE' | ||||
|         % } else { | ||||
|         %= l 'dom_MODIFY_TITLE' | ||||
|         % $btn = l('MODIFY'); | ||||
|       % } | ||||
|     </h2> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'DOMAIN_NAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
|     % if ( $dom_datas->{trt} eq "ADD" ) { | ||||
| 	% param 'Domain' => $dom_datas->{domain} unless param 'Domain'; | ||||
| 	%= text_field 'Domain', class => 'input' | ||||
|     % } else { | ||||
|         %= hidden_field 'Domain' => $dom_datas->{domain} | ||||
| 	%= $dom_datas->{domain}, class => 'data' | ||||
|     % } | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     <span class=label> | ||||
|       %= l 'DOMAIN_NAME', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % if ( $dom_datas->{trt} eq "ADD" ) { | ||||
|         % param 'Domain' => $dom_datas->{domain} unless param 'Domain'; | ||||
|         %= text_field 'Domain', class => 'input' | ||||
|       % } else { | ||||
|       %= hidden_field 'Domain' => $dom_datas->{domain} | ||||
|       %= $dom_datas->{domain}, class => 'data' | ||||
|       % } | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'DESCRIPTION_BRIEF', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Description' => $dom_datas->{description} unless param 'Description'; | ||||
| 	%= text_field 'Description', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     <span class=label> | ||||
|       %= l 'DESCRIPTION_BRIEF', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Description' => $dom_datas->{description} unless param 'Description'; | ||||
|       %= text_field 'Description', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	%=l 'dom_CONTENT_FIELD_DESCRIPTION' | ||||
| 	<br> | ||||
| 	<span class=label> | ||||
| 	%= $c->l('dom_CONTENT', ''); | ||||
| 	</span><span class=data> | ||||
| 	% param 'Content' => $dom_datas->{content} unless param 'Content'; | ||||
| 	%= select_field 'Content', $c->content_options_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     %= l 'dom_CONTENT_FIELD_DESCRIPTION' | ||||
|     <br> | ||||
|     <span class=label> | ||||
|       %= $c->l( 'dom_CONTENT', '' ); | ||||
|     </span><span class=data> | ||||
|       % param 'Content' => $dom_datas->{content} unless param 'Content'; | ||||
|       %= select_field 'Content', $c->content_options_list(), class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	%=l 'dom_DESC_NAMESERVERS' | ||||
| 	<br> | ||||
| 	<span class=label> | ||||
| 	%=l 'dom_LABEL_NAMESERVERS', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Nameservers' => $dom_datas->{nameservers} unless param 'Nameservers'; | ||||
| 	%= select_field 'Nameservers', $c->nameserver_options_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     %= l 'dom_DESC_NAMESERVERS' | ||||
|     <br> | ||||
|     <span class=label> | ||||
|       %= l 'dom_LABEL_NAMESERVERS', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Nameservers' => $dom_datas->{nameservers} unless param 'Nameservers'; | ||||
|       %= select_field 'Nameservers', $c->nameserver_options_list(), class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $dom_datas->{trt} | ||||
| 	 | ||||
|     %end | ||||
|   %= hidden_field 'trt' => $dom_datas->{trt} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,14 +1,14 @@ | ||||
| <div id="footer" class="module"> | ||||
| <!--<HR class="sme-copyrightbar">--> | ||||
| <a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a> | ||||
| <font class="sme-copyright"> | ||||
| %	if ( $c->is_logged_in && $c->is_admin) { | ||||
| 	SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II | ||||
| 	% my $mode; | ||||
| 	% if (config->{mode} eq 'development'){ $mode = '-dev';} else { $mode = '';} | ||||
| 	(Mojo:<%= Mojolicious->VERSION %><%= $mode %>) | ||||
| % } | ||||
| <br>Copyright 1999-2006 Mitel Corporation<br> | ||||
| %= session 'copyRight' | ||||
| <br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br> | ||||
| </font> | ||||
|   <!--<HR class="sme-copyrightbar">--> | ||||
|   <a href="https://mojolicious.org" target="_blank"><img src="images/sme-mojo-logo-white.png" style="position:relative;"></a> | ||||
|   <font class="sme-copyright"> | ||||
|     % if ( $c->is_logged_in && $c->is_admin) { | ||||
|       SME Server <%= session 'releaseVersion' %>-<%= $c->app->VERSION %> Manager II | ||||
|       % my $mode; | ||||
|       % if ( config->{mode} eq 'development' ) { $mode = '-dev'; } else { $mode = ''; } | ||||
|       (Mojo:<%= Mojolicious->VERSION %><%= $mode %>) | ||||
|     % } | ||||
|     <br>Copyright 1999-2006 Mitel Corporation<br> | ||||
|     %= session 'copyRight' | ||||
|     <br>Copyright (c) 2013-2024 Koozali Foundation Inc.<br> | ||||
|   </font> | ||||
|   | ||||
| @@ -1,59 +1,59 @@ | ||||
| <div id='grp_add'> | ||||
|  | ||||
|     % 	my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/groups2' => (method => 'POST') => begin | ||||
| 	<p><h2> | ||||
| 	%=l 'CREATE_GROUP' | ||||
| 	</h2><br><br> | ||||
| 	%=l 'grp_GROUP_NAMING' | ||||
| 	</p> | ||||
|   %= form_for '/groups2' => ( method => 'POST' ) => begin | ||||
|     <p><h2> | ||||
|         %= l 'CREATE_GROUP' | ||||
|       </h2><br><br> | ||||
|       %= l 'grp_GROUP_NAMING' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'GROUP_NAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'groupName', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'GROUP_NAME', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'groupName', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'grp_GROUP_DESC_EXPL' | ||||
| 	<br><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'grp_GROUP_DESC', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'groupDesc', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       %= l 'grp_GROUP_DESC_EXPL' | ||||
|       <br><br> | ||||
|       <span class=label> | ||||
|         %= l 'grp_GROUP_DESC', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'groupDesc', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'GROUP_MEMBERS', class => 'label' | ||||
| 	</span> | ||||
| 	<br> | ||||
| 	<span class=data> | ||||
| 	%= check_box 'groupMembers' => 'admin' | ||||
| 	Administrator (admin) | ||||
| 	<br> | ||||
|     %	 my $users = $c->gen_users_list(); | ||||
|     %    foreach my $key ( sort keys %$users ) | ||||
|     %    { | ||||
| 	    %= check_box 'groupMembers' => $key | ||||
| 	    %=$users->{$key} | ||||
|             %= "(" . $key . ")" | ||||
|             <br> | ||||
|     %    } | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'GROUP_MEMBERS', class => 'label' | ||||
|       </span> | ||||
|       <br> | ||||
|       <span class=data> | ||||
|         %= check_box 'groupMembers' => 'admin' | ||||
|         Administrator (admin) | ||||
|         <br> | ||||
|         % my $users = $c->gen_users_list(); | ||||
|         % foreach my $key ( sort keys %$users ) | ||||
|         % { | ||||
|           %= check_box 'groupMembers' => $key | ||||
|           %= $users->{$key} | ||||
|           %= "(" . $key . ")" | ||||
|           <br> | ||||
|         % } | ||||
|     </span> | ||||
| 	</p> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <br><br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $grp_datas->{trt} | ||||
| 	 | ||||
|     % end     | ||||
|   %= hidden_field 'trt' => $grp_datas->{trt} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,63 +1,63 @@ | ||||
| <div id='grp_del'> | ||||
|  | ||||
|     %	my $btn = l('REMOVE'); | ||||
|     %= form_for '/groups2' => (method => 'POST') => begin | ||||
| 	<p><h2> | ||||
| 	%=l 'REMOVE_USER_GROUP' | ||||
| 	</h2> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   %= form_for '/groups2' => ( method => 'POST' ) => begin | ||||
|     <p><h2> | ||||
|         %= l 'REMOVE_USER_GROUP' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l('grp_DELETE_DESCRIPTION', $grp_datas->{group})  | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= l( 'grp_DELETE_DESCRIPTION', $grp_datas->{group} ) | ||||
|       </p> | ||||
|  | ||||
| 	<p> | ||||
|     %	my $size = keys %$members; | ||||
|     %	if ( ! $size ){ | ||||
|         %=l 'ACCOUNT_GROUP_NONE' | ||||
|     %	} else { | ||||
| 	%=l 'grp_GROUP_HAS_MEMBERS' | ||||
| 	<br> | ||||
| 	<ul> | ||||
|     %    foreach my $key ( keys %$members) | ||||
|     %    { | ||||
|         <li> | ||||
|             %=$key | ||||
|             ( | ||||
|             %=$members->{$key} | ||||
|             ) | ||||
|     	</li> | ||||
|     %    } | ||||
|     	</ul> | ||||
|     %	} | ||||
| 	</p> | ||||
|       <p> | ||||
|         % my $size = keys %$members; | ||||
|         % if ( ! $size ){ | ||||
|           %= l 'ACCOUNT_GROUP_NONE' | ||||
|         % } else { | ||||
|         %= l 'grp_GROUP_HAS_MEMBERS' | ||||
|         <br> | ||||
|         <ul> | ||||
|           % foreach my $key ( keys %$members ) | ||||
|           % { | ||||
|             <li> | ||||
|               %= $key | ||||
|               ( | ||||
|               %= $members->{$key} | ||||
|               ) | ||||
|             </li> | ||||
|           % } | ||||
|       </ul> | ||||
|       % } | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
|     %	$size = keys %$ibays; | ||||
|     %	if ( $size ) { | ||||
|     	    %=l 'grp_IBAYS_WILL_BE_CHANGED' | ||||
| 	    <br> | ||||
| 	    <ul> | ||||
|     %		foreach my $key (sort ( keys %$ibays )) | ||||
|     %    	{ | ||||
|     		    <li> | ||||
|         	    %=$key | ||||
|         	    ( | ||||
|         	    %=$ibays->{$key} | ||||
|         	    ) | ||||
|     		    </li> | ||||
|     %    	} | ||||
|     	    </ul> | ||||
|     % 	} | ||||
| 	</p> | ||||
| 	 | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       % $size = keys %$ibays; | ||||
|       % if ( $size ) { | ||||
|         %= l 'grp_IBAYS_WILL_BE_CHANGED' | ||||
|         <br> | ||||
|         <ul> | ||||
|           % foreach my $key ( sort ( keys %$ibays ) ) | ||||
|           % { | ||||
|             <li> | ||||
|               %= $key | ||||
|               ( | ||||
|               %= $ibays->{$key} | ||||
|               ) | ||||
|             </li> | ||||
|           % } | ||||
|       </ul> | ||||
|       % } | ||||
|     </p> | ||||
|  | ||||
|         %= hidden_field 'trt' => $grp_datas->{trt} | ||||
|         %= hidden_field 'groupName' => $grp_datas->{group} | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     % end     | ||||
|     %= hidden_field 'trt' => $grp_datas->{trt} | ||||
|     %= hidden_field 'groupName' => $grp_datas->{group} | ||||
|  | ||||
| </div> | ||||
|     % end | ||||
|  | ||||
|   </div> | ||||
|   | ||||
| @@ -1,72 +1,76 @@ | ||||
| <div id='grp_list'> | ||||
|  | ||||
|     % my $btn = l('GROUP_ADD'); | ||||
|   % my $btn = l('GROUP_ADD'); | ||||
|  | ||||
|     %= form_for '/groups' => (method => 'POST') => begin | ||||
|   %= form_for '/groups' => ( method => 'POST' ) => begin | ||||
|  | ||||
|         %= hidden_field 'trt' => 'ADD' | ||||
|     %= hidden_field 'trt' => 'ADD' | ||||
|  | ||||
| 	<p>	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     % end     | ||||
|     <p>	<br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|   % end | ||||
|  | ||||
|  | ||||
| 	<p>	<h2> | ||||
| 	%=l 'grp_CURRENT_LIST' | ||||
| 	</h2><br><br> | ||||
|     % 	my $numGroups = @$groups; | ||||
|     %	if ($numGroups == 0){ | ||||
|         %=l 'ACCOUNT_GROUP_NONE' | ||||
|     %	} else { | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'GROUP' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'DESCRIPTION' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
| 				%=l 'ACTION' | ||||
|     	    </th> | ||||
|     	</tr> | ||||
|     	</thead><tbody> | ||||
|  | ||||
|     %    foreach my $group ( @$groups ) | ||||
|     %    { | ||||
|   <p>	<h2> | ||||
|       %= l 'grp_CURRENT_LIST' | ||||
|     </h2><br><br> | ||||
|     % my $numGroups = @$groups; | ||||
|     % if ($numGroups == 0){ | ||||
|       %= l 'ACCOUNT_GROUP_NONE' | ||||
|     % } else { | ||||
|     <table class="sme-border TableSort"><thead> | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $group->key | ||||
|             %= t td => (class => 'sme-border') => $group->prop('Description') | ||||
| 			<td class='sme-border' style="min-width:15em"> | ||||
| 				%my $modify_text = l('MODIFY');  # Localized text | ||||
| 				%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 				%my $group_name = $group->key;  # group name extracted from the data structure | ||||
| 				%my $actionModify = qq{ | ||||
|                                 %       <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name"> | ||||
| 				%	<button type='button' class='sme-modify-button' title='$modify_text' > | ||||
| 				%		$modify_text | ||||
| 				%	</button> | ||||
|                                 %       </a> | ||||
| 				%}; | ||||
| 				%my $remove_text = l('REMOVE');  # Localized text | ||||
| 				%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 				%my $group_name = $group->key;  # group name extracted from the data structure | ||||
| 				%my $actionRemove = qq{ | ||||
|                                 %       <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name"> | ||||
| 				%	<button type='button' class='sme-remove-button' title='$remove_text' >  | ||||
| 				%		$remove_text | ||||
| 				%	</button> | ||||
|                                 %       </a> | ||||
| 				%}; | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %> | ||||
| 			</td> | ||||
|     	</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
| 	<%} %> | ||||
| 	</p> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'GROUP' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'DESCRIPTION' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'ACTION' | ||||
|           </th> | ||||
|         </tr> | ||||
|       </thead><tbody> | ||||
|  | ||||
|         % foreach my $group (@$groups) | ||||
|         % { | ||||
|           <tr> | ||||
|             %= t td => ( class => 'sme-border' ) => $group->key | ||||
|             %= t td => ( class => 'sme-border' ) => $group->prop('Description') | ||||
|             <td class='sme-border' style="min-width:15em"> | ||||
|               % my $modify_text = l('MODIFY'); # Localized text | ||||
|               % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|               % my $group_name = $group->key; # group name extracted from the data structure | ||||
|               % my $actionModify = qq{ | ||||
|                 % <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name" | ||||
|                 % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|                 % title="$modify_text" aria-label="$modify_text" | ||||
|                 % style="background:white;"> | ||||
|                 % <span class="ui-icon ui-icon-pencil"></span> | ||||
|                 % <span class="ui-button-text">$modify_text</span> | ||||
|                 % </a> | ||||
|             % }; | ||||
|           % my $remove_text = l('REMOVE'); # Localized text | ||||
|           % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|           % my $group_name = $group->key; # group name extracted from the data structure | ||||
|           % my $actionRemove = qq{ | ||||
|             % <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name" | ||||
|             % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|             % title="$remove_text" aria-label="$remove_text" | ||||
|             % style="background:white;"> | ||||
|             % <span class="ui-icon ui-icon-delete"></span> | ||||
|             % <span class="ui-button-text">$remove_text</span> | ||||
|             % </a> | ||||
|         % }; | ||||
|         <%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|       </td> | ||||
|     </tr> | ||||
|     % } | ||||
|   </tbody> | ||||
| </table> | ||||
| <% } %> | ||||
| </p> | ||||
|  | ||||
|  | ||||
| </div> | ||||
| </div> | ||||
| @@ -1,69 +1,69 @@ | ||||
| <div id='grp_upd'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/groups2' => (method => 'POST') => begin | ||||
|   %= form_for '/groups2' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p><h2> | ||||
| 	%=l 'MODIFY_USER_GROUP' | ||||
| 	</h2><br></p> | ||||
|     <p><h2> | ||||
|         %= l 'MODIFY_USER_GROUP' | ||||
|       </h2><br></p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'GROUP_NAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= $grp_datas->{group}, class => 'data' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'GROUP_NAME', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= $grp_datas->{group}, class => 'data' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'grp_GROUP_DESC_EXPL' | ||||
| 	<br><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'grp_GROUP_DESC', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc'; | ||||
| 	%= text_field 'groupDesc', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       %= l 'grp_GROUP_DESC_EXPL' | ||||
|       <br><br> | ||||
|       <span class=label> | ||||
|         %= l 'grp_GROUP_DESC', class => 'label' | ||||
|       </span><span class=data> | ||||
|         % param 'groupDesc' => $grp_datas->{description} unless param 'groupDesc'; | ||||
|         %= text_field 'groupDesc', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'GROUP_MEMBERS', class => 'label' | ||||
| 	</span> | ||||
| 	<br> | ||||
|     <span class=data> | ||||
| 	% if ( $members->{'admin'} ) { | ||||
| 	    %= check_box 'groupMembers', value => 'admin', checked => undef | ||||
| 	%} else { | ||||
| 	    %= check_box 'groupMembers' => 'admin' | ||||
| 	%} | ||||
| 	Administrator (admin) | ||||
| 	<br> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'GROUP_MEMBERS', class => 'label' | ||||
|       </span> | ||||
|       <br> | ||||
|       <span class=data> | ||||
|         % if ( $members->{'admin'} ) { | ||||
|           %= check_box 'groupMembers', value => 'admin', checked => undef | ||||
|         % } else { | ||||
|         %= check_box 'groupMembers' => 'admin' | ||||
|       % } | ||||
|       Administrator (admin) | ||||
|       <br> | ||||
|  | ||||
|     %	 my $users = $c->gen_users_list(); | ||||
|     %    foreach my $key ( sort keys %$users ) | ||||
|     %    { | ||||
| 	    % if ( $members->{ $key } ) { | ||||
| 		<!-- % = check_box 'groupMembers', value => $key, checked => 'checked' --> | ||||
| 		<input type='checkbox' name='groupMembers' checked value='<%= $key %>'> | ||||
| 	    %} else { | ||||
| 		%= check_box 'groupMembers' => $key | ||||
| 	    %} | ||||
| 	    %=$users->{$key} . " (" . $key . ")" | ||||
|             <br> | ||||
|     %    } | ||||
|       % my $users = $c->gen_users_list(); | ||||
|       % foreach my $key ( sort keys %$users ) | ||||
|       % { | ||||
|         % if ( $members->{ $key } ) { | ||||
|           <!-- % = check_box 'groupMembers', value => $key, checked => 'checked' --> | ||||
|           <input type='checkbox' name='groupMembers' checked value='<%= $key %>'> | ||||
|         % } else { | ||||
|         %= check_box 'groupMembers' => $key | ||||
|       % } | ||||
|       %= $users->{$key} . " (" . $key . ")" | ||||
|       <br> | ||||
|       % } | ||||
|     </span> | ||||
| 	</p> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <br><br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $grp_datas->{trt} | ||||
|         %= hidden_field 'groupName' => $grp_datas->{group} | ||||
| 	 | ||||
|     % end     | ||||
|   %= hidden_field 'trt' => $grp_datas->{trt} | ||||
|   %= hidden_field 'groupName' => $grp_datas->{group} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,12 +1,13 @@ | ||||
|  | ||||
| <div id="header2" class="hd2 module gradient-panel"> | ||||
| 	<img src="images/KoozaliServerManager.png" alt="Koozali Logo" class="logo" > | ||||
| 	% if ( not defined $c->session->{username} ) { | ||||
| 		<button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="login">Login</a></button> | ||||
| 	% } else { | ||||
| 		<button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="logout">Logout <%= $c->session->{username} %></a></button> | ||||
| 	% } | ||||
| 	<div id="flag-container" class = "flag-style"> | ||||
| 		<!--			 The flag icon will be inserted here --> | ||||
| 	</div> | ||||
|   <img src="images/KoozaliServerManager.png" alt="Koozali Logo" class="logo" > | ||||
|   % if ( not defined $c->session->{username} ) { | ||||
| 		<a class="login-button no-visited-state" target="_parent" href="/smanager/login">Login</a> | ||||
|   % } else { | ||||
|   <!--><button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="/smanager/logout">Logout <%= $c->session->{username} %></a></button>--> | ||||
| 		<a class="login-button no-visited-state" target="_parent" href="/smanager/logout">Logout <%= $c->session->{username} %></a> | ||||
|   % } | ||||
|   <div id="flag-container" class = "flag-style"> | ||||
|     <!--			 The flag icon will be inserted here --> | ||||
|   </div> | ||||
| </div> | ||||
| @@ -1,29 +1,29 @@ | ||||
| <div id='hos_del'> | ||||
|  | ||||
|     %	my $btn = l('REMOVE'); | ||||
|     %= form_for '/hostentriesd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'hos_REMOVE_TITLE' | ||||
| 	</h2> | ||||
| 	</p> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   %= form_for '/hostentriesd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'hos_REMOVE_TITLE' | ||||
|       </h2> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%= $c->l('hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname}); | ||||
| 	</p> | ||||
| 	 | ||||
| 	<p><b> | ||||
| 	%=l 'hos_ABOUT_TO_REMOVE' | ||||
| 	</b></p> | ||||
|     <p> | ||||
|       %= $c->l( 'hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname} ); | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p><b> | ||||
|         %= l 'hos_ABOUT_TO_REMOVE' | ||||
|     </b></p> | ||||
|  | ||||
|         %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|         %= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     % end     | ||||
|     %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|     %= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,84 +1,88 @@ | ||||
| <div id='hos_list'> | ||||
|  | ||||
|     % my $btn = l('hos_ADD_HOSTNAME'); | ||||
|   % my $btn = l('hos_ADD_HOSTNAME'); | ||||
|  | ||||
|     %= form_for '/hostentries' => (method => 'POST') => begin | ||||
|   %= form_for '/hostentries' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	<br></p> | ||||
|     <p> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|       <br></p> | ||||
|  | ||||
|         %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|     %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|  | ||||
|     % end | ||||
|   % end | ||||
|  | ||||
|     %	my %dom_hos = %{$dom_hosts}; | ||||
|     %  foreach my $domain ( sort ( keys %dom_hos ) ) { | ||||
|   % my %dom_hos = %{$dom_hosts}; | ||||
|   % foreach my $domain ( sort ( keys %dom_hos ) ) { | ||||
|  | ||||
| 	<p><br><b> | ||||
| 	%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain); | ||||
| 	</b><br></p> | ||||
| 	 | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'hos_HOSTNAME' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'hos_HOSTTYPE' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'IP_ADDRESS_OR_FQDN' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'hos_ETHERNET_ADDRESS' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'COMMENT' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACTION' | ||||
|     	    </th> | ||||
|     	</tr> | ||||
|        </thead><tbody> | ||||
|     <p><br><b> | ||||
|         %= $c->l( 'hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain ); | ||||
|       </b><br></p> | ||||
|  | ||||
|     %   foreach (@{$dom_hos{$domain}{'HOSTS'}}) {   | ||||
|     <table class="sme-border TableSort"><thead> | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $_->{'HostName'}; | ||||
|             %= t td => (class => 'sme-border') => $_->{'HostType'}; | ||||
|             %= t td => (class => 'sme-border') => $_->{'IP'}; | ||||
|             %= t td => (class => 'sme-border') => $_->{'MACAddress'}; | ||||
|             %= t td => (class => 'sme-border') => $_->{'Comment'}; | ||||
| 			<td class='sme-border' style="min-width:15em"> | ||||
| 				%my ($actionModify, $actionRemove) = ' '; | ||||
| 				%my $static = $_->{'static'} || "no"; | ||||
| 				%if ($static ne 'yes') { | ||||
| 					%my $modify_text = l('MODIFY');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $hostentries_name = $_->{'HostName'};  # hostentries name extracted from the data structure | ||||
| 					%$actionModify = qq{ | ||||
|                                         %       <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name"> | ||||
| 					%	<button type='button' class='sme-modify-button' title='$modify_text' >  | ||||
| 					%		$modify_text | ||||
| 					%	</button> | ||||
|                                         %       </a> | ||||
| 					%}; | ||||
| 					%my $remove_text = l('REMOVE');  # Localized text | ||||
| 					%$csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%#my $hostentries_name = $_->{'HostName'};  # hostentries name extracted from the data structure | ||||
| 					%$actionRemove = qq{ | ||||
|                                         %       <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name"> | ||||
| 					%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 					%		$remove_text | ||||
| 					%	</button> | ||||
|                                         %       </a> | ||||
| 					%}; | ||||
| 				%} | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %> | ||||
|     	    </td> | ||||
|     	</tr> | ||||
|     %	} | ||||
|    	</tbody> | ||||
|    	</table> | ||||
|      %	} | ||||
| </div> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'hos_HOSTNAME' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'hos_HOSTTYPE' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'IP_ADDRESS_OR_FQDN' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'hos_ETHERNET_ADDRESS' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'COMMENT' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'ACTION' | ||||
|           </th> | ||||
|         </tr> | ||||
|       </thead><tbody> | ||||
|  | ||||
|         % foreach (@{$dom_hos{$domain}{'HOSTS'}}) { | ||||
|           <tr> | ||||
|             %= t td => ( class => 'sme-border' ) => $_->{'HostName'}; | ||||
|             %= t td => ( class => 'sme-border' ) => $_->{'HostType'}; | ||||
|             %= t td => ( class => 'sme-border' ) => $_->{'IP'}; | ||||
|             %= t td => ( class => 'sme-border' ) => $_->{'MACAddress'}; | ||||
|             %= t td => ( class => 'sme-border' ) => $_->{'Comment'}; | ||||
|             <td class='sme-border' style="min-width:15em"> | ||||
|               % my ( $actionModify, $actionRemove ) = ' '; | ||||
|               % my $static = $_->{'static'} || "no"; | ||||
|               % if ($static ne 'yes') { | ||||
|                 % my $modify_text = l('MODIFY'); # Localized text | ||||
|                 % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|                 % my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure | ||||
|                 % $actionModify = qq{ | ||||
|                   % <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name" | ||||
|                   % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|                   % title="$modify_text" aria-label="$modify_text" | ||||
|                   % style="background:white;"> | ||||
|                   % <span class="ui-icon ui-icon-pencil"></span> | ||||
|                   % <span class="ui-button-text">$modify_text</span> | ||||
|                   % </a> | ||||
|               % }; | ||||
|             % my $remove_text = l('REMOVE'); # Localized text | ||||
|             % $csrf_token = "TOKEN"; # CSRF token for security | ||||
|             %# my $hostentries_name = $_->{'HostName'};  # hostentries name extracted from the data structure | ||||
|             % $actionRemove = qq{ | ||||
|               % <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name" | ||||
|               % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|               % title="$remove_text" aria-label="$remove_text" | ||||
|               % style="background:white;"> | ||||
|               % <span class="ui-icon ui-icon-delete"></span> | ||||
|               % <span class="ui-button-text">$remove_text</span> | ||||
|               % </a> | ||||
|           % }; | ||||
|       % } | ||||
|       <%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|     </td> | ||||
|   </tr> | ||||
|   % } | ||||
| </tbody> | ||||
| </table> | ||||
| % } | ||||
| </div> | ||||
| @@ -1,60 +1,60 @@ | ||||
| <div id='hos_ulc'> | ||||
| <!--	UPDATE HOST TYPE --> | ||||
|   <!--	UPDATE HOST TYPE --> | ||||
|  | ||||
|     % 	my $btn = l('NEXT'); | ||||
|   % my $btn = l('NEXT'); | ||||
|  | ||||
|     %= form_for '/hostentriesd' => (method => 'POST') => begin | ||||
| 	<p><h2> | ||||
|     % if ( $hos_datas->{trt} eq "ALC" ) { | ||||
| 	%=l 'hos_CREATE_TYPE' | ||||
|     % } else { | ||||
| 	%=l 'hos_MODIFY_TYPE' | ||||
|     % 	$btn = l('MODIFY'); | ||||
|     % } | ||||
| 	</h2></p> | ||||
|   %= form_for '/hostentriesd' => ( method => 'POST' ) => begin | ||||
|     <p><h2> | ||||
|         % if ( $hos_datas->{trt} eq "ALC" ) { | ||||
|           %= l 'hos_CREATE_TYPE' | ||||
|         % } else { | ||||
|         %= l 'hos_MODIFY_TYPE' | ||||
|         % $btn = l('MODIFY'); | ||||
|       % } | ||||
|   </h2></p> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'hos_LOCAL_PAGE_DESCRIPTION' | ||||
| 	</p> | ||||
|   <p> | ||||
|     %= l 'hos_LOCAL_PAGE_DESCRIPTION' | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'hos_LOCAL_IP_DESCRIPTION' | ||||
| 	</p> | ||||
|   <p> | ||||
|     %= l 'hos_LOCAL_IP_DESCRIPTION' | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'hos_LOCAL_IP', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Internalip' => $hos_datas->{internalip} unless param 'Internalip'; | ||||
| 	%= text_field 'Internalip', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'hos_LOCAL_IP', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Internalip' => $hos_datas->{internalip} unless param 'Internalip'; | ||||
|       %= text_field 'Internalip', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'hos_ETHERNET_ADDRESS_DESCRIPTION' | ||||
| 	</p> | ||||
|   <p> | ||||
|     %= l 'hos_ETHERNET_ADDRESS_DESCRIPTION' | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'hos_ETHERNET_ADDRESS', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress'; | ||||
| 	%= text_field 'Macaddress', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'hos_ETHERNET_ADDRESS', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress'; | ||||
|       %= text_field 'Macaddress', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $hos_datas->{trt} | ||||
| 	%= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|         %= hidden_field 'Name' => $hos_datas->{name} | ||||
|         %= hidden_field 'Domain' => $hos_datas->{domain} | ||||
| 	%= hidden_field 'Comment'=> $hos_datas->{comment} | ||||
| 	%= hidden_field 'Hosttype'=> $hos_datas->{hosttype} | ||||
| 	%= hidden_field 'Externalip' => $hos_datas->{externalip} | ||||
| 	 | ||||
|     %end | ||||
|   %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|   %= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|   %= hidden_field 'Name' => $hos_datas->{name} | ||||
|   %= hidden_field 'Domain' => $hos_datas->{domain} | ||||
|   %= hidden_field 'Comment' => $hos_datas->{comment} | ||||
|   %= hidden_field 'Hosttype' => $hos_datas->{hosttype} | ||||
|   %= hidden_field 'Externalip' => $hos_datas->{externalip} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,77 +1,77 @@ | ||||
| <div id='hos_upd'> | ||||
|  | ||||
|     % 	my $btn = l('NEXT'); | ||||
|   % my $btn = l('NEXT'); | ||||
|  | ||||
|     %= form_for '/hostentriesd' => (method => 'POST') => begin | ||||
| 	<p><h2> | ||||
|     % if ( $hos_datas->{trt} eq "ADD" ) { | ||||
| 	%=l 'hos_CREATE_TITLE' | ||||
|     % } else { | ||||
| 	%=l 'hos_MODIFY_TITLE' | ||||
|     % 	$btn = l('MODIFY'); | ||||
|     % } | ||||
| 	</h2></p> | ||||
|   %= form_for '/hostentriesd' => ( method => 'POST' ) => begin | ||||
|     <p><h2> | ||||
|         % if ( $hos_datas->{trt} eq "ADD" ) { | ||||
|           %= l 'hos_CREATE_TITLE' | ||||
|         % } else { | ||||
|         %= l 'hos_MODIFY_TITLE' | ||||
|         % $btn = l('MODIFY'); | ||||
|       % } | ||||
|   </h2></p> | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'hos_HOSTNAME_DESCRIPTION' | ||||
| 	</p> | ||||
|   <p> | ||||
|     %= l 'hos_HOSTNAME_DESCRIPTION' | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'hos_HOSTNAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
|     % if ( $hos_datas->{trt} eq "ADD" ) { | ||||
| 	% param 'Name' => $hos_datas->{name} unless param 'Name'; | ||||
| 	%= text_field 'Name', class => 'input' | ||||
|     % } else { | ||||
|         %= hidden_field 'Name' => $hos_datas->{name} | ||||
| 	%= $hos_datas->{name}, class => 'data' | ||||
|     % } | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'hos_HOSTNAME', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % if ( $hos_datas->{trt} eq "ADD" ) { | ||||
|         % param 'Name' => $hos_datas->{name} unless param 'Name'; | ||||
|         %= text_field 'Name', class => 'input' | ||||
|       % } else { | ||||
|       %= hidden_field 'Name' => $hos_datas->{name} | ||||
|       %= $hos_datas->{name}, class => 'data' | ||||
|       % } | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'DOMAIN', class => 'label' | ||||
| 	</span><span class=data> | ||||
|     % if ( $hos_datas->{trt} eq "ADD" ) { | ||||
| 	% param 'Domain' => $hos_datas->{domain} unless param 'Domain'; | ||||
| 	%= select_field 'Domain', $c->domains_list(), class => 'input' | ||||
|     % } else { | ||||
|         %= hidden_field 'Domain' => $hos_datas->{domain} | ||||
| 	%= $hos_datas->{domain}, class => 'data' | ||||
|     % } | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'DOMAIN', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % if ( $hos_datas->{trt} eq "ADD" ) { | ||||
|         % param 'Domain' => $hos_datas->{domain} unless param 'Domain'; | ||||
|         %= select_field 'Domain', $c->domains_list(), class => 'input' | ||||
|       % } else { | ||||
|       %= hidden_field 'Domain' => $hos_datas->{domain} | ||||
|       %= $hos_datas->{domain}, class => 'data' | ||||
|       % } | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%= $c->l('COMMENT', ''); | ||||
| 	</span><span class=data> | ||||
| 	% param 'Comment' => $hos_datas->{comment} unless param 'Comment'; | ||||
| 	%= text_field 'Comment', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= $c->l( 'COMMENT', '' ); | ||||
|     </span><span class=data> | ||||
|       % param 'Comment' => $hos_datas->{comment} unless param 'Comment'; | ||||
|       %= text_field 'Comment', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'LOCATION', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype'; | ||||
| 	%= select_field 'Hosttype', $c->hosttype_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'LOCATION', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype'; | ||||
|       %= select_field 'Hosttype', $c->hosttype_list(), class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p><br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $hos_datas->{trt} | ||||
| 	%= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
| 	%= hidden_field 'Internalip' => $hos_datas->{internalip} | ||||
| 	%= hidden_field 'Externalip' => $hos_datas->{externalip} | ||||
| 	%= hidden_field 'Macaddress' => $hos_datas->{macaddress} | ||||
|   %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|   %= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|   %= hidden_field 'Internalip' => $hos_datas->{internalip} | ||||
|   %= hidden_field 'Externalip' => $hos_datas->{externalip} | ||||
|   %= hidden_field 'Macaddress' => $hos_datas->{macaddress} | ||||
|  | ||||
|     %end | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,37 +1,37 @@ | ||||
| <div id='hos_urm'> | ||||
| <!--	UPDATE HOST TYPE --> | ||||
|   <!--	UPDATE HOST TYPE --> | ||||
|  | ||||
|     % 	my $btn = l('MODIFY'); | ||||
|   % my $btn = l('MODIFY'); | ||||
|  | ||||
|     %= form_for '/hostentriesd' => (method => 'POST') => begin | ||||
|   %= form_for '/hostentriesd' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'hos_REMOTE_PAGE_DESCRIPTION' | ||||
| 	</p> | ||||
|     <p> | ||||
|       %= l 'hos_REMOTE_PAGE_DESCRIPTION' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'IP_ADDRESS_OR_FQDN', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Externalip' => $hos_datas->{externalip} unless param 'Externalip'; | ||||
| 	%= text_field 'Externalip', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'IP_ADDRESS_OR_FQDN', class => 'label' | ||||
|       </span><span class=data> | ||||
|         % param 'Externalip' => $hos_datas->{externalip} unless param 'Externalip'; | ||||
|         %= text_field 'Externalip', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
|  | ||||
| 	<p><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $hos_datas->{trt} | ||||
| 	%= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|         %= hidden_field 'Name' => $hos_datas->{name} | ||||
|         %= hidden_field 'Domain' => $hos_datas->{domain} | ||||
| 	%= hidden_field 'Comment'=> $hos_datas->{comment} | ||||
| 	%= hidden_field 'Hosttype'=> $hos_datas->{hosttype} | ||||
| 	%= hidden_field 'Internalip' => $hos_datas->{internalip} | ||||
| 	%= hidden_field 'Macaddress' => $hos_datas->{macaddress} | ||||
| 	 | ||||
|     %end | ||||
|     %= hidden_field 'trt' => $hos_datas->{trt} | ||||
|     %= hidden_field 'Hostname' => $hos_datas->{hostname} | ||||
|     %= hidden_field 'Name' => $hos_datas->{name} | ||||
|     %= hidden_field 'Domain' => $hos_datas->{domain} | ||||
|     %= hidden_field 'Comment' => $hos_datas->{comment} | ||||
|     %= hidden_field 'Hosttype' => $hos_datas->{hosttype} | ||||
|     %= hidden_field 'Internalip' => $hos_datas->{internalip} | ||||
|     %= hidden_field 'Macaddress' => $hos_datas->{macaddress} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,22 +1,22 @@ | ||||
| <div id='iba_del'> | ||||
|  | ||||
|     % 	my $btn = l('REMOVE'); | ||||
|     %= form_for '/ibaysd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'iba_REMOVE_TITLE' | ||||
| 	</h2> | ||||
| 	<br> | ||||
| 	%= $c->render_to_string(inline => l('iba_REMOVE_DESC', $iba_datas->{ibay}, $iba_datas->{description})); | ||||
| 	<br> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   %= form_for '/ibaysd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'iba_REMOVE_TITLE' | ||||
|       </h2> | ||||
|       <br> | ||||
|       %= $c->render_to_string( inline => l( 'iba_REMOVE_DESC', $iba_datas->{ibay}, $iba_datas->{description} ) ); | ||||
|       <br> | ||||
|     </p> | ||||
|     <p> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|         %= hidden_field 'trt' => $iba_datas->{trt} | ||||
|         %= hidden_field 'ibay' => $iba_datas->{ibay} | ||||
|     %= hidden_field 'trt' => $iba_datas->{trt} | ||||
|     %= hidden_field 'ibay' => $iba_datas->{ibay} | ||||
|  | ||||
|     % end     | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,111 +1,117 @@ | ||||
| <div id='iba_list'> | ||||
|  | ||||
|  | ||||
|     % my $btn = l('iba_ADD_IBAY'); | ||||
|   % my $btn = l('iba_ADD_IBAY'); | ||||
|  | ||||
|     %= form_for '/ibays' => (method => 'POST') => begin | ||||
|   %= form_for '/ibays' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|     %= hidden_field 'trt' => 'ADD'; | ||||
|  | ||||
|     % end     | ||||
|   % end | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'iba_FIRSTPAGE_DESC' | ||||
| 	<br><br> | ||||
| 	</p> | ||||
| 	 | ||||
|     % 	my $numIbays = @$ibays; | ||||
|     %	if ($numIbays == 0){ | ||||
|         %=l 'iba_NO_IBAYS' | ||||
|     %	} else { | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'NAME' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'DESCRIPTION' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
| 				%=l 'ACTION' | ||||
|     	    </th> | ||||
|     	</tr> | ||||
|     	</thead><tbody> | ||||
|     %    foreach my $ibay (@$ibays) | ||||
|     %    { | ||||
|     %	    my $modifiable = $ibay->prop('Modifiable') || 'yes'; | ||||
|     %	    my $passwordable = $ibay->prop('Passwordable') || 'yes'; | ||||
|     %	    my $removable = $ibay->prop('Removable') || 'yes'; | ||||
|     %	    my $needPassword = grep { $_ eq $ibay->prop('PublicAccess') }  | ||||
|     %                            qw(local-pw global-pw global-pw-remote); | ||||
|   <p> | ||||
|     %= l 'iba_FIRSTPAGE_DESC' | ||||
|     <br><br> | ||||
|   </p> | ||||
|  | ||||
|   % my $numIbays = @$ibays; | ||||
|   % if ($numIbays == 0){ | ||||
|     %= l 'iba_NO_IBAYS' | ||||
|   % } else { | ||||
|   <table class="sme-border TableSort"><thead> | ||||
|       <tr> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'NAME' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'DESCRIPTION' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ACTION' | ||||
|         </th> | ||||
|       </tr> | ||||
|     </thead><tbody> | ||||
|       % foreach my $ibay (@$ibays) | ||||
|       % { | ||||
|         % my $modifiable = $ibay->prop('Modifiable') || 'yes'; | ||||
|         % my $passwordable = $ibay->prop('Passwordable') || 'yes'; | ||||
|         % my $removable = $ibay->prop('Removable') || 'yes'; | ||||
|         % my $needPassword = grep { $_ eq $ibay->prop('PublicAccess') } | ||||
|         % qw(local-pw global-pw global-pw-remote); | ||||
|  | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $ibay->key | ||||
|             %= t td => (class => 'sme-border') => $ibay->prop('Name') | ||||
| 			<td class='sme-border' style="min-width:15em"> | ||||
| 				%my ($actionModify, $actionResetPw, $actionRemove) = ' '; | ||||
| 				%if ($modifiable eq 'yes') {  | ||||
| 					%my $modify_text = l('MODIFY');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $ibays_entry_name = $ibay->key;  # ibays_entry name extracted from the data structure | ||||
| 					%$actionModify = qq{ | ||||
|                                         %       <a href="ibaysd?CsrfDef=$csrf_token&trt=UPD&ibay=$ibays_entry_name"> | ||||
| 					%	<button type='button' class='sme-modify-button' title='$modify_text' >  | ||||
| 					%		$modify_text | ||||
| 					%	</button> | ||||
|                                         %       </a> | ||||
| 					%}; | ||||
| 				%} | ||||
| 				 | ||||
| 				%if ($passwordable eq 'yes')  {  | ||||
| 					%my $password_text = l('PASSWORD_RESET');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $ibays_entry_name = $ibay->key;  # ibays_entry name extracted from the data structure | ||||
| 					%if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) { | ||||
| 						%$actionResetPw = qq{ | ||||
|                                                 %       <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name"> | ||||
| 						%	<button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; > | ||||
| 						%		$password_text | ||||
| 						%	</button> | ||||
|                                                 %       </a> | ||||
| 						%}; | ||||
| 					%} else { | ||||
| 						%$actionResetPw = qq{ | ||||
|                                                 %       <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name"> | ||||
| 						%	<button type='button' class='sme-password-button' title='$password_text' >  | ||||
| 						%		$password_text | ||||
| 						%	</button> | ||||
|                                                 %       </a> | ||||
| 						%}; | ||||
| 					%} | ||||
| 					 | ||||
| 				%} | ||||
|           %= t td => ( class => 'sme-border' ) => $ibay->key | ||||
|           %= t td => ( class => 'sme-border' ) => $ibay->prop('Name') | ||||
|           <td class='sme-border' style="min-width:15em"> | ||||
|             % my ( $actionModify, $actionResetPw, $actionRemove ) = ' '; | ||||
|             % if ($modifiable eq 'yes') { | ||||
|               % my $modify_text = l('MODIFY'); # Localized text | ||||
|               % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|               % my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure | ||||
|               % $actionModify = qq{ | ||||
|                 % <a href="ibaysd?CsrfDef=$csrf_token&trt=UPD&ibay=$ibays_entry_name" | ||||
|                 % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|                 % title="$modify_text" aria-label="$modify_text" | ||||
|                 % style="background:white;"> | ||||
|                 % <span class="ui-icon ui-icon-pencil"></span> | ||||
|                 % <span class="ui-button-text">$modify_text</span> | ||||
|                 % </a> | ||||
|             % }; | ||||
|         % } | ||||
|  | ||||
| 				%if ($removable eq 'yes')  {  | ||||
| 					%my $remove_text = l('REMOVE');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $ibays_entry_name = $ibay->key;  # ibays_entry name extracted from the data structure | ||||
| 					%$actionRemove = qq{ | ||||
|                                         %       <a href="ibaysd?CsrfDef=$csrf_token&trt=DEL&ibay=$ibays_entry_name"> | ||||
| 					%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 					%		$remove_text | ||||
| 					%	</button> | ||||
|                                         %       </a> | ||||
| 					%}; | ||||
| 				%} | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> | ||||
| 				<%= $c->render_to_string(inline => $actionResetPw)%> | ||||
| 				<%= $c->render_to_string(inline => $actionRemove) %> | ||||
|     	    </td> | ||||
|    	</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
| 	<%} %> | ||||
|         % if ($passwordable eq 'yes') { | ||||
|           % my $password_text = l('PASSWORD_RESET'); # Localized text | ||||
|           % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|           % my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure | ||||
|           % if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) { | ||||
|             % $actionResetPw = qq{ | ||||
|               % <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name"> | ||||
|                 % <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; > | ||||
|                   % $password_text | ||||
|                   % </button> | ||||
|                 % </a> | ||||
|             % }; | ||||
|         % } else { | ||||
|         % $actionResetPw = qq{ | ||||
|           % <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name" | ||||
|           % class="sme-password-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|           % title="$password_text" aria-label="$password_text" | ||||
|           % style="background:white;"> | ||||
|           % <span class="ui-icon ui-icon-refresh"></span> | ||||
|           % <span class="ui-button-text">$password_text</span> | ||||
|           % </a> | ||||
|       % }; | ||||
|       % } | ||||
|  | ||||
|       % } | ||||
|  | ||||
|       % if ($removable eq 'yes') { | ||||
|         % my $remove_text = l('REMOVE'); # Localized text | ||||
|         % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|         % my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure | ||||
|         % $actionRemove = qq{ | ||||
|           % <a href="ibaysd?CsrfDef=$csrf_token&trt=DEL&ibay=$ibays_entry_name" | ||||
|           % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|           % title="$remove_text" aria-label="$remove_text" | ||||
|           % style="background:white;"> | ||||
|           % <span class="ui-icon ui-icon-delete"></span> | ||||
|           % <span class="ui-button-text">$remove_text</span> | ||||
|           % </a> | ||||
|       % }; | ||||
|     % } | ||||
|     <%= $c->render_to_string( inline => $actionModify ) %> | ||||
|     <%= $c->render_to_string( inline => $actionResetPw ) %> | ||||
|     <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|   </td> | ||||
| </tr> | ||||
| % } | ||||
| </tbody> | ||||
| </table> | ||||
| <% } %> | ||||
|  | ||||
|  | ||||
| </div> | ||||
| </div> | ||||
| @@ -1,42 +1,42 @@ | ||||
| <div id='iba_net'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/ibaysd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'PASSWORD_RESET' | ||||
| 	</h2> | ||||
| 	 | ||||
| 	<br><br> | ||||
| 	%=l 'iba_PASSWORD_DESC' | ||||
| 	%= $iba_datas->{ibay} | ||||
| 	</p> | ||||
| 	 | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'PASSWORD_NEW', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'newPass', class => 'input' , class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   %= form_for '/ibaysd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'PASSWORD_RESET' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'PASSWORD_VERIFY_NEW', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'newPassVerify', class => 'input', class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|       <br><br> | ||||
|       %= l 'iba_PASSWORD_DESC' | ||||
|       %= $iba_datas->{ibay} | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'PASSWORD_NEW', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'newPass', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $iba_datas->{trt} | ||||
| 	%= hidden_field 'ibay' => $iba_datas->{ibay} | ||||
| 	 | ||||
|     % end     | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'PASSWORD_VERIFY_NEW', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'newPassVerify', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| </div> | ||||
|     <p> | ||||
|       <br><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => $iba_datas->{trt} | ||||
|     %= hidden_field 'ibay' => $iba_datas->{ibay} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,101 +1,101 @@ | ||||
| <div id='iba_upd'> | ||||
|  | ||||
|  | ||||
| 	% my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/ibaysd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'iba_ADD_TITLE' | ||||
| 	</h2> | ||||
| 	<br> | ||||
| 	%=l 'iba_NAME_FIELD_DESC' | ||||
| 	</p> | ||||
|   %= form_for '/ibaysd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'iba_ADD_TITLE' | ||||
|       </h2> | ||||
|       <br> | ||||
|       %= l 'iba_NAME_FIELD_DESC' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'iba_NAME_LABEL', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% if ( $iba_datas->{trt} eq 'ADD' ) { | ||||
| 	    % param 'ibay' => $iba_datas->{ibay} unless param 'ibay'; | ||||
| 	    %= text_field 'ibay', class => 'input' | ||||
| 	% } else { | ||||
| 	    % $btn = l('SAVE'); | ||||
| 	    %= $iba_datas->{ibay}, class => 'data' | ||||
| 	% } | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'iba_NAME_LABEL', class => 'label' | ||||
|       </span><span class=data> | ||||
|         % if ( $iba_datas->{trt} eq 'ADD' ) { | ||||
|           % param 'ibay' => $iba_datas->{ibay} unless param 'ibay'; | ||||
|           %= text_field 'ibay', class => 'input' | ||||
|         % } else { | ||||
|         % $btn = l('SAVE'); | ||||
|         %= $iba_datas->{ibay}, class => 'data' | ||||
|       % } | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'DESCRIPTION', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'ibayDesc' => $iba_datas->{description} unless param 'ibayDesc'; | ||||
| 	%= text_field 'ibayDesc', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'DESCRIPTION', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'ibayDesc' => $iba_datas->{description} unless param 'ibayDesc'; | ||||
|       %= text_field 'ibayDesc', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'GROUP' | ||||
| 	</span><span class=data> | ||||
| 	% param 'group' => $iba_datas->{group} unless param 'group'; | ||||
| 	%= select_field 'group' => $c->group_list_m(), class => 'input' | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'GROUP' | ||||
|     </span><span class=data> | ||||
|       % param 'group' => $iba_datas->{group} unless param 'group'; | ||||
|       %= select_field 'group' => $c->group_list_m(), class => 'input' | ||||
|       <br> | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'iba_USER_ACCESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'userAccess' => $iba_datas->{userAccess} unless param 'userAccess'; | ||||
| 	%= select_field 'userAccess' => $c->userAccess_list_m(), class => 'input' | ||||
| 	 | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'iba_USER_ACCESS' | ||||
|     </span><span class=data> | ||||
|       % param 'userAccess' => $iba_datas->{userAccess} unless param 'userAccess'; | ||||
|       %= select_field 'userAccess' => $c->userAccess_list_m(), class => 'input' | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'iba_PUBLIC_ACCESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'publicAccess' => $iba_datas->{publicAccess} unless param 'publicAccess'; | ||||
| 	%= select_field 'publicAccess' => $c->publicAccess_list_m(), class => 'input' | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
|       <br> | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'iba_ALLOW_DYNAMIC_CONTENT' | ||||
| 	</span><span class=data> | ||||
| 	% param 'CgiBin' => $iba_datas->{CgiBin} unless param 'CgiBin'; | ||||
| 	%= select_field 'CgiBin' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'iba_PUBLIC_ACCESS' | ||||
|     </span><span class=data> | ||||
|       % param 'publicAccess' => $iba_datas->{publicAccess} unless param 'publicAccess'; | ||||
|       %= select_field 'publicAccess' => $c->publicAccess_list_m(), class => 'input' | ||||
|       <br> | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'iba_HTTPS_Only' | ||||
| 	</span><span class=data> | ||||
| 	% param 'SSL' => $iba_datas->{SSL} unless param 'SSL'; | ||||
| 	%= select_field 'SSL' => [[ (l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 	<br> | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'iba_ALLOW_DYNAMIC_CONTENT' | ||||
|     </span><span class=data> | ||||
|       % param 'CgiBin' => $iba_datas->{CgiBin} unless param 'CgiBin'; | ||||
|       %= select_field 'CgiBin' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|       <br> | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button $btn, class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'iba_HTTPS_Only' | ||||
|     </span><span class=data> | ||||
|       % param 'SSL' => $iba_datas->{SSL} unless param 'SSL'; | ||||
|       %= select_field 'SSL' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|       <br> | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $iba_datas->{trt} | ||||
| 	% if ( $iba_datas->{trt} eq 'UPD' ) { | ||||
|     	    %= hidden_field 'ibay' => $iba_datas->{ibay} | ||||
| 	% } | ||||
| 	 | ||||
|     % end | ||||
|   <p> | ||||
|     <br><br> | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   </p> | ||||
|  | ||||
|   %= hidden_field 'trt' => $iba_datas->{trt} | ||||
|   % if ( $iba_datas->{trt} eq 'UPD' ) { | ||||
|     %= hidden_field 'ibay' => $iba_datas->{ibay} | ||||
|   % } | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,25 +1,25 @@ | ||||
| <%     use POSIX qw(strftime); %> | ||||
| <% use POSIX qw(strftime); %> | ||||
| <div id="info"> | ||||
|     <% if (! $c->session->{PwdSet} ) { %> | ||||
| 	<div class="sme-error module"><h5> | ||||
|   <% if (! $c->session->{PwdSet} ) { %> | ||||
|     <div class="sme-error module"><h5> | ||||
|         Warning: you have not yet changed the default system password.</h5></div> | ||||
|     <% } %> | ||||
|     <% if ( $c->is_unsafe ) { %> | ||||
| 	<div class="sme-error module"><h5> | ||||
|   <% } %> | ||||
|   <% if ( $c->is_unsafe && $c->is_logged_in && $c->is_admin) { %> | ||||
|     <div class="sme-error module"><h5> | ||||
|         Warning: a reconfigure and reboot is required before proceeding! Failure to do so now | ||||
|         may leave your system in an unknown state!</h5></div> | ||||
|     <% } %> | ||||
|     <% if ( $c->session->{Access} eq 'public' && ((config->{debug} ne '0') || (config->{mode} ne 'production')) ) { %> | ||||
| 	<div class="sme-error module"><h5> | ||||
|   <% } %> | ||||
|   <% if ( $c->session->{Access} eq 'public' && ((config->{debug} ne '0') || (config->{mode} ne 'production')) ) { %> | ||||
|     <div class="sme-error module"><h5> | ||||
|         Warning: Development or debug mode enabled AND public access is offered ! | ||||
|         </h5></div> | ||||
|     <% } %> | ||||
|     <% my $curdate = strftime '%Y%m%d', localtime; %> | ||||
|     <% if ( "$curdate"  >= "20290531" ) { %> | ||||
| 	<div class="sme-error"><h5> | ||||
|       URGENT NOTICE: As per May 31st 2029, SME Server 11 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version. | ||||
|       Please migrate IMMEDIATELY to Koozali SME Server 12 or higher version. Failure to upgrade may lead to the compromise of this server. | ||||
|     </h5></div> | ||||
|   <% } %> | ||||
|   <% my $curdate = strftime '%Y%m%d', localtime; %> | ||||
|   <% if ( "$curdate" >= "20290531" ) { %> | ||||
|     <div class="sme-error"><h5> | ||||
|         URGENT NOTICE: As per May 31st 2029, SME Server 11 is obsolete, and potentially INSECURE. NO support will be offered for any issue found with this installed version. | ||||
|         Please migrate IMMEDIATELY to Koozali SME Server 12 or higher version. Failure to upgrade may lead to the compromise of this server. | ||||
|       </br>Please, consult <a href="https://wiki.koozali.org/SME_Server:Download" target="_blank">https://wiki.koozali.org/SME_Server:Download</a> to get the latest version | ||||
|      </h5></div> | ||||
|     <% } %> | ||||
|   </h5></div> | ||||
| <% } %> | ||||
| </div> | ||||
| @@ -4,21 +4,21 @@ | ||||
| % content_for 'js_togglePassword' => begin | ||||
|   %= javascript begin | ||||
|  | ||||
|   $(document).ready(function() { | ||||
|     $(document).ready(function() { | ||||
|  | ||||
|     const togglePassword = document.querySelector('#togglePassword'); | ||||
|     const password = document.querySelector('#id_password'); | ||||
|  | ||||
|     if (( togglePassword ) && ( password )) { | ||||
| 	togglePassword.addEventListener('click', function (e) { | ||||
| 	    // toggle the type attribute | ||||
| 	    const type = password.getAttribute('type') === 'password' ? 'text' : 'password'; | ||||
| 	    password.setAttribute('type', type); | ||||
| 	    // toggle the eye slash icon | ||||
| 	    // this.classList.toggle('eye-slash'); | ||||
| 	}) | ||||
|     togglePassword.addEventListener('click', function (e) { | ||||
|     // toggle the type attribute | ||||
|     const type = password.getAttribute('type') === 'password' ? 'text' : 'password'; | ||||
|     password.setAttribute('type', type); | ||||
|     // toggle the eye slash icon | ||||
|     // this.classList.toggle('eye-slash'); | ||||
|     }) | ||||
|     } | ||||
|   }); | ||||
|     }); | ||||
|  | ||||
|   % end | ||||
| % end | ||||
| @@ -30,34 +30,34 @@ | ||||
|   %= javascript begin | ||||
|  | ||||
|     $(document).ready(function() { | ||||
| 		$('#tognav').click(function() { | ||||
| 			//alert('click1:'+window.localStorage.getItem('menunav')); | ||||
| 			window.localStorage.setItem('menunav',!$('#menunav').is(':visible')); | ||||
| 			//alert('click2:'+window.localStorage.getItem('menunav')); | ||||
| 			$('#menunav').toggle({ duration: 300 }); | ||||
| 		}); | ||||
|     $('#tognav').click(function() { | ||||
|     //alert('click1:'+window.localStorage.getItem('menunav')); | ||||
|     window.localStorage.setItem('menunav',!$('#menunav').is(':visible')); | ||||
|     //alert('click2:'+window.localStorage.getItem('menunav')); | ||||
|     $('#menunav').toggle({ duration: 300 }); | ||||
|     }); | ||||
|  | ||||
| 		$('#toguser').click(function() { | ||||
| 			window.localStorage.setItem('menuuser',!$('#menuuser').is(':visible')); | ||||
| 			$('#menuuser').toggle({ duration: 300 }); | ||||
| 		}); | ||||
|     $('#toguser').click(function() { | ||||
|     window.localStorage.setItem('menuuser',!$('#menuuser').is(':visible')); | ||||
|     $('#menuuser').toggle({ duration: 300 }); | ||||
|     }); | ||||
|  | ||||
| 		$('#togadm').click(function() { | ||||
| 			window.localStorage.setItem('menuadm',!$('#menuadm').is(':visible')); | ||||
| 			$('#menuadm').toggle({ duration: 300 }); | ||||
| 		}); | ||||
|     $('#togadm').click(function() { | ||||
|     window.localStorage.setItem('menuadm',!$('#menuadm').is(':visible')); | ||||
|     $('#menuadm').toggle({ duration: 300 }); | ||||
|     }); | ||||
|  | ||||
| 		 | ||||
| 		$('.section-title').click(function() { | ||||
| 			var $section = $(this).parent().next('div'); | ||||
| 			if(!$section.length){ | ||||
| 				return false; | ||||
| 			} | ||||
| 			let localStorageTag = "admSection-"+this.innerHTML; | ||||
| 			var jqObj = $($section); | ||||
| 			window.localStorage.setItem(localStorageTag,!jqObj.is(':visible')); | ||||
| 			$section.toggle({ duration: 600 }); | ||||
| 		}) | ||||
|  | ||||
|     $('.section-title').click(function() { | ||||
|     var $section = $(this).parent().next('div'); | ||||
|     if(!$section.length){ | ||||
|     return false; | ||||
|     } | ||||
|     let localStorageTag = "admSection-"+this.innerHTML; | ||||
|     var jqObj = $($section); | ||||
|     window.localStorage.setItem(localStorageTag,!jqObj.is(':visible')); | ||||
|     $section.toggle({ duration: 600 }); | ||||
|     }) | ||||
|     }); | ||||
|  | ||||
|   % end | ||||
| @@ -67,35 +67,35 @@ | ||||
|  | ||||
| % content_for 'js_swapClass' => begin | ||||
|   %= javascript begin | ||||
| 	(function($) { | ||||
| 	    $.fn.swapClass = function(class1, class2) { | ||||
| 		this.each(function() { | ||||
| 		    var $elem = $(this); | ||||
| 		    if ($elem.hasClass(class1)) { | ||||
| 			$elem.removeClass(class1).addClass(class2); | ||||
| 		    } | ||||
| 		    else if ($elem.hasClass(class2)) { | ||||
| 			$elem.removeClass(class2).addClass(class1); | ||||
| 		    } | ||||
| 		}); | ||||
| 	    }; | ||||
| 	})(jQuery); | ||||
|     (function($) { | ||||
|     $.fn.swapClass = function(class1, class2) { | ||||
|     this.each(function() { | ||||
|     var $elem = $(this); | ||||
|     if ($elem.hasClass(class1)) { | ||||
|     $elem.removeClass(class1).addClass(class2); | ||||
|     } | ||||
|     else if ($elem.hasClass(class2)) { | ||||
|     $elem.removeClass(class2).addClass(class1); | ||||
|     } | ||||
|     }); | ||||
|     }; | ||||
|     })(jQuery); | ||||
|  | ||||
|     $(document).ready(function() { | ||||
| 	$('a.item-current').swapClass('item-current','item'); | ||||
|     $('a.item-current').swapClass('item-current','item'); | ||||
|  | ||||
| 	var pathname = $(location).attr('pathname'); | ||||
|     var pathname = $(location).attr('pathname'); | ||||
|  | ||||
| 	//alert('jQuery loaded. Path searched: ' + pathname); | ||||
|     //alert('jQuery loaded. Path searched: ' + pathname); | ||||
|  | ||||
| 	var menus = $('a.item'); | ||||
| 	$.each(menus, function() { | ||||
| 	    if ( $(this).attr('href') == pathname ) { | ||||
| 		$(this).swapClass('item', 'item-current'); | ||||
| 	//	alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class')); | ||||
| 	    } | ||||
| 	}) | ||||
|     var menus = $('a.item'); | ||||
|     $.each(menus, function() { | ||||
|     if ( $(this).attr('href') == pathname ) { | ||||
|     $(this).swapClass('item', 'item-current'); | ||||
|     //	alert('menu found! ' + $(this).attr('href') + ' ' + $(this).attr('class')); | ||||
|     } | ||||
|     }) | ||||
|  | ||||
| 	}); | ||||
|     }); | ||||
|   % end | ||||
| % end | ||||
| % end | ||||
|   | ||||
| @@ -1,67 +1,67 @@ | ||||
| <div id='ln_add'> | ||||
|  | ||||
| 	% my $retref= $c->stash("ret"); | ||||
| 	% my %ret = $retref ? %$retref : (ret => ""); | ||||
| 	% my @vars = split(/,/, $ret{vars} // ''); | ||||
| 	% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars; | ||||
|   % my $retref = $c->stash("ret"); | ||||
|   % my %ret = $retref ? %$retref : ( ret => "" ); | ||||
|   % my @vars = split( /,/, $ret{vars} // '' ); | ||||
|   % my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars; | ||||
|  | ||||
| 	% if ($c->app->config->{debug}) { | ||||
| 	<p> | ||||
| 		%= dumper { ret_data => \%ret } | ||||
| 	</p>   | ||||
| 	% } | ||||
|   % if ($c->app->config->{debug}) { | ||||
|     <p> | ||||
|       %= dumper { ret_data => \%ret } | ||||
|     </p> | ||||
|   % } | ||||
|  | ||||
| 	% if ($ret{ret} eq "") { | ||||
| 		%=l "ln_FIRSTPAGE_DESC" | ||||
| 	% } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
| 	<br> | ||||
| 	<div class='success'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } else {  | ||||
| 	<br> | ||||
| 	<div class='sme-error'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } | ||||
| 	<br /> | ||||
|     % my $btn = l('ADD'); | ||||
|     % my $network_db = esmith::NetworksDB::UTF8->open() || die "Couldn't open NetworksDB db"; | ||||
|   % if ($ret{ret} eq "") { | ||||
|     %= l "ln_FIRSTPAGE_DESC" | ||||
|   % } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
|   <br> | ||||
|   <div class='success'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } else { | ||||
|   <br> | ||||
|   <div class='sme-error'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } | ||||
|   <br /> | ||||
|   % my $btn = l('ADD'); | ||||
|   % my $network_db = esmith::NetworksDB::UTF8->open() || die "Couldn't open NetworksDB db"; | ||||
|  | ||||
|    % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $c->stash("ret") | ||||
| 	</p> | ||||
|     % } | ||||
|   % if (config->{debug} == 1) { | ||||
|     <p> | ||||
|       %= dumper $c->current_route | ||||
|       %= dumper $c->stash("ret") | ||||
|     </p> | ||||
|   % } | ||||
|  | ||||
|     %= form_for '/localnetworksb' => (method => 'POST') => begin | ||||
| 		<h2> | ||||
| 		%=l "ln_ADD_TITLE" | ||||
| 		</h2> | ||||
| 			<p> | ||||
| 			%= $c->render_to_string(inline => l('ln_ADD_DESC')); | ||||
| 			</p><br> | ||||
| 			<span class=label> | ||||
| 				%=l "NETWORK" | ||||
| 			</span><span class=data> | ||||
| 				%=text_field  'networkAddress' | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "ln_SUBNET_MASK" | ||||
| 			</span><span class=data> | ||||
| 				%=text_field 'networkMask' | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "ROUTER" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=text_field 'networkRouter' | ||||
| 			</span><br><br> | ||||
| 			<p> | ||||
| 			<br> | ||||
| 			%= submit_button "$btn", class => 'action' | ||||
| 			</p> | ||||
| 	%end | ||||
|   %= form_for '/localnetworksb' => ( method => 'POST' ) => begin | ||||
|     <h2> | ||||
|       %= l "ln_ADD_TITLE" | ||||
|     </h2> | ||||
|     <p> | ||||
|       %= $c->render_to_string( inline => l('ln_ADD_DESC') ); | ||||
|     </p><br> | ||||
|     <span class=label> | ||||
|       %= l "NETWORK" | ||||
|     </span><span class=data> | ||||
|       %= text_field 'networkAddress' | ||||
|     </span><br><br> | ||||
|     <span class=label> | ||||
|       %= l "ln_SUBNET_MASK" | ||||
|     </span><span class=data> | ||||
|       %= text_field 'networkMask' | ||||
|     </span><br><br> | ||||
|     <span class=label> | ||||
|       %= l "ROUTER" | ||||
|     </span> | ||||
|     <span class=data> | ||||
|       %= text_field 'networkRouter' | ||||
|     </span><br><br> | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,59 +1,59 @@ | ||||
| <div id='ln_del'> | ||||
|  | ||||
|     % my $btn = l('REMOVE'); | ||||
|     % my $deletehosts = $ln_datas->{deletehosts}; | ||||
|     % my $subnet = $ln_datas->{subnet}; | ||||
|     % my $router = $ln_datas->{router}; | ||||
|      | ||||
|    % if (config->{debug} == 1) { | ||||
| 	<pre> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   % my $deletehosts = $ln_datas->{deletehosts}; | ||||
|   % my $subnet = $ln_datas->{subnet}; | ||||
|   % my $router = $ln_datas->{router}; | ||||
|  | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 		%= dumper $c->current_route | ||||
| 		%= dumper $c->stash("ret") | ||||
| 		%= dumper %$ln_datas | ||||
| 		%= dumper $deletehosts | ||||
| 	</pre> | ||||
|     </pre> | ||||
|   % } | ||||
|  | ||||
|   %= form_for '/localnetworkse' => ( method => 'POST' ) => begin | ||||
|     <h2> | ||||
|       %= l "ln_REMOVE_TITLE" | ||||
|     </h2> | ||||
|     <p> | ||||
|       %= l "ln_REMOVE_DESC" | ||||
|     </p><br> | ||||
|     <span class=label> | ||||
|       %= l "NETWORK" | ||||
|     </span><span class=data> | ||||
|       %= $localnetwork | ||||
|     </span><br><br> | ||||
|     <span class=label> | ||||
|       %= l "ln_SUBNET_MASK" | ||||
|     </span><span class=data> | ||||
|       %= $subnet | ||||
|     </span><br><br> | ||||
|     <span class=label> | ||||
|       %= l "ROUTER" | ||||
|     </span> | ||||
|     <span class=data> | ||||
|       %= $router | ||||
|     </span><br><br> | ||||
|     % if($deletehosts) { | ||||
|       <br> | ||||
|       %= $c->l("ln_REMOVE_HOSTS_DESC") | ||||
|       <br> | ||||
|       <span class=label> | ||||
|         %= $c->l("ln_REMOVE_HOSTS_LABEL") | ||||
|       </span> | ||||
|       <span class= data> | ||||
|         %= check_box deletehost => 1, checked => 1 | ||||
|       </span><br><br> | ||||
|     % } | ||||
|       | ||||
|     %= form_for '/localnetworkse' => (method => 'POST') => begin | ||||
| 		<h2> | ||||
| 		%=l "ln_REMOVE_TITLE" | ||||
| 		</h2> | ||||
| 			<p> | ||||
| 				%=l "ln_REMOVE_DESC" | ||||
| 			</p><br> | ||||
| 			<span class=label> | ||||
| 				%=l "NETWORK" | ||||
| 			</span><span class=data> | ||||
| 				%=$localnetwork | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "ln_SUBNET_MASK" | ||||
| 			</span><span class=data> | ||||
| 				%= $subnet | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "ROUTER" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%= $router | ||||
| 			</span><br><br> | ||||
| 			% if($deletehosts) { | ||||
| 			<br> | ||||
| 			%=$c->l("ln_REMOVE_HOSTS_DESC") | ||||
| 			<br> | ||||
| 			<span class=label> | ||||
| 				%= $c->l("ln_REMOVE_HOSTS_LABEL") | ||||
| 			</span> | ||||
| 			<span class= data> | ||||
| 				%=check_box deletehost=>1, checked=>1 | ||||
| 			</span><br><br> | ||||
| 			%} | ||||
| 			%= hidden_field localnetwork=>$localnetwork | ||||
| 			<p> | ||||
| 			<br> | ||||
| 			%= submit_button "$btn", class => 'action' | ||||
| 			</p> | ||||
|   %= hidden_field localnetwork => $localnetwork | ||||
|   <p> | ||||
|     <br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%end | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,97 +1,99 @@ | ||||
| <div id='ln_list'> | ||||
|     % my $btn = l('ln_LOCALNETWORK_ADD'); | ||||
|     %= form_for '/localnetworksa' => (method => 'POST') => begin | ||||
|   % my $btn = l('ln_LOCALNETWORK_ADD'); | ||||
|   %= form_for '/localnetworksa' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	% my $retref= $c->stash("ret"); | ||||
| 	% my %ret = $retref ? %$retref : (ret => ""); | ||||
| 	% my @vars = split(/,/, $ret{vars} // ''); | ||||
| 	% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars; | ||||
|     % my $retref = $c->stash("ret"); | ||||
|     % my %ret = $retref ? %$retref : ( ret => "" ); | ||||
|     % my @vars = split( /,/, $ret{vars} // '' ); | ||||
|     % my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars; | ||||
|  | ||||
| 	% if ($c->app->config->{debug}) { | ||||
| 	<pre> | ||||
|     % if ($c->app->config->{debug}) { | ||||
|       <pre> | ||||
| 		%= dumper { ret_data => \%ret } | ||||
| 	</pre>   | ||||
| 	% } | ||||
|       </pre> | ||||
|     % } | ||||
|  | ||||
| 	% if ($ret{ret} eq "") { | ||||
| 		%=l "ln_FIRSTPAGE_DESC" | ||||
| 	% } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
| 	<br> | ||||
| 	<div class='success'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } else {  | ||||
| 	<br> | ||||
| 	<div class='sme-error'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } | ||||
|   % if ($ret{ret} eq "") { | ||||
|     %= l "ln_FIRSTPAGE_DESC" | ||||
|   % } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
|   <br> | ||||
|   <div class='success'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } else { | ||||
|   <br> | ||||
|   <div class='sme-error'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } | ||||
|  | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
|     % end     | ||||
|   % end | ||||
|  | ||||
| 	<br> | ||||
|     % my $numlocalnetworks = @$localnetworks; | ||||
|     %	if ($numlocalnetworks == 0){ | ||||
|         %=l 'ln_LOCAL_NETWORK_NONE' | ||||
|     %	} else { | ||||
|         <br> | ||||
| 		<table class="sme-border TableSort"><thead> | ||||
| 		<tr> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'NETWORK' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'ln_SUBNET_MASK' | ||||
| 			</th> | ||||
|   <br> | ||||
|   % my $numlocalnetworks = @$localnetworks; | ||||
|   % if ($numlocalnetworks == 0){ | ||||
|     %= l 'ln_LOCAL_NETWORK_NONE' | ||||
|   % } else { | ||||
|   <br> | ||||
|   <table class="sme-border TableSort"><thead> | ||||
|       <tr> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'NETWORK' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ln_SUBNET_MASK' | ||||
|         </th> | ||||
|  | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'ln_NUMBER_OF_HOSTS' | ||||
| 			</th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ln_NUMBER_OF_HOSTS' | ||||
|         </th> | ||||
|  | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'ROUTER' | ||||
| 			</th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ROUTER' | ||||
|         </th> | ||||
|  | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'ACTION' | ||||
| 			</th> | ||||
| 		</tr> | ||||
| 			</thead><tbody> | ||||
| 		%    foreach my $localnetwork (@$localnetworks ) | ||||
| 		%    { | ||||
| 		%     	my ($num_hosts) = esmith::util::computeHostRange( $localnetwork->key, $localnetwork->prop('Mask') ); | ||||
| 		%     	my $removable = $localnetwork->prop('Removable') || "yes"; | ||||
| 		%    		my $system       = $localnetwork->prop('SystemLocalNetwork') || "no"; | ||||
| 		%   		if ( $system eq "yes" ) { $removable = "no"; } | ||||
| 					<tr> | ||||
| 					%= t td => (class => 'sme-border') => $localnetwork->key | ||||
| 					%= t td => (class => 'sme-border') => $localnetwork->prop('Mask') | ||||
| 					%= t td => (class => 'sme-border') => $num_hosts | ||||
| 					%= t td => (class => 'sme-border') => $localnetwork->prop('Router') | ||||
| 					%my $actionRemove = ' '; | ||||
| 					%if ($removable eq "yes") { | ||||
| 						%my $remove_text = l('REMOVE');  # Localized text | ||||
| 						%my $local_network_entry = $localnetwork->key; | ||||
| 						%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 						%$actionRemove = qq{ | ||||
|                                                 %       <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry"> | ||||
| 						%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 						%		$remove_text | ||||
| 						%	</button> | ||||
|                                                 %       </a> | ||||
| 						%}; | ||||
| 					% } | ||||
| 					<td class='sme-border'><%= $c->render_to_string(inline => $actionRemove) %></td> | ||||
| 					</tr> | ||||
| 		%  }  | ||||
| 		</tbody> | ||||
| 		</table> | ||||
| 			%= hidden_field 'trt' => $ln_datas->{trt} | ||||
| 	%} | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ACTION' | ||||
|         </th> | ||||
|       </tr> | ||||
|     </thead><tbody> | ||||
|       % foreach my $localnetwork (@$localnetworks) | ||||
|       % { | ||||
|         % my ($num_hosts) = esmith::util::computeHostRange( $localnetwork->key, $localnetwork->prop('Mask') ); | ||||
|         % my $removable = $localnetwork->prop('Removable') || "yes"; | ||||
|         % my $system = $localnetwork->prop('SystemLocalNetwork') || "no"; | ||||
|         % if ( $system eq "yes" ) { $removable = "no"; } | ||||
|         <tr> | ||||
|           %= t td => ( class => 'sme-border' ) => $localnetwork->key | ||||
|           %= t td => ( class => 'sme-border' ) => $localnetwork->prop('Mask') | ||||
|           %= t td => ( class => 'sme-border' ) => $num_hosts | ||||
|           %= t td => ( class => 'sme-border' ) => $localnetwork->prop('Router') | ||||
|           % my $actionRemove = ' '; | ||||
|           % if ($removable eq "yes") { | ||||
|             % my $remove_text = l('REMOVE'); # Localized text | ||||
|             % my $local_network_entry = $localnetwork->key; | ||||
|             % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|             % $actionRemove = qq{ | ||||
|               % <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry" | ||||
|               % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|               % title="$remove_text" aria-label="$remove_text" | ||||
|               % style="background:white;"> | ||||
|               % <span class="ui-icon ui-icon-delete"></span> | ||||
|               % <span class="ui-button-text">$remove_text</span> | ||||
|               % </a> | ||||
|           % }; | ||||
|       % } | ||||
|       <td class='sme-border'><%= $c->render_to_string( inline => $actionRemove ) %></td> | ||||
|     </tr> | ||||
|     % } | ||||
|   </tbody> | ||||
| </table> | ||||
| %= hidden_field 'trt' => $ln_datas->{trt} | ||||
| % } | ||||
| </div> | ||||
| @@ -1,54 +1,54 @@ | ||||
| %# | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20  | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 | ||||
| %# | ||||
| <div id="Emailsettings-ACC" class="partial Emailsettings-ACC"> | ||||
| %#	<script> | ||||
| %#		window.onload = function() { | ||||
| %#		SelectInput(); | ||||
| %#	}; | ||||
| %#	</script> | ||||
| 	% if (config->{debug} == 1) { | ||||
| 		<pre> | ||||
|   %# <script> | ||||
|     %# window.onload = function() { | ||||
|       %# SelectInput(); | ||||
|       %# }; | ||||
|     %# </script> | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 			%= dumper $mai_data | ||||
| 		</pre> | ||||
| 	% } | ||||
| 	% my $btn = l('SAVE'); | ||||
| 	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table | ||||
|     </pre> | ||||
|   % } | ||||
|   % my $btn = l('SAVE'); | ||||
|   % $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table | ||||
|  | ||||
| 	<h2><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></h2><br> | ||||
| 	%= form_for "emailsettingsu" => (method => 'POST') => begin | ||||
| 		% param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
| 		%= hidden_field 'trt' => $mai_data->{trt} | ||||
| 		%# Inputs etc in here. | ||||
| 		%=l 'mai_DESC_POP_ACCESS_CONTROL' | ||||
|   <h2><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></h2><br> | ||||
|   %= form_for "emailsettingsu" => ( method => 'POST' ) => begin | ||||
|     % param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
|     %= hidden_field 'trt' => $mai_data->{trt} | ||||
|     %# Inputs etc in here. | ||||
|     %= l 'mai_DESC_POP_ACCESS_CONTROL' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_POP_ACCESS_CONTROL' | ||||
| 		</span><span class=input> | ||||
| 		% param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess'; | ||||
| 		%= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_POP_ACCESS_CONTROL' | ||||
|       </span><span class=input> | ||||
|         % param 'POPAccess' => $c->get_current_pop3_access() unless param 'POPAccess'; | ||||
|         %= select_field 'POPAccess' => $c->get_pop_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%=l 'mai_DESC_IMAP_ACCESS_CONTROL' | ||||
|     %= l 'mai_DESC_IMAP_ACCESS_CONTROL' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_IMAP_ACCESS_CONTROL' | ||||
| 		</span><span class=input> | ||||
| 		% param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess'; | ||||
| 		%= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_IMAP_ACCESS_CONTROL' | ||||
|       </span><span class=input> | ||||
|         % param 'IMAPAccess' => $c->get_current_imap_access() unless param 'IMAPAccess'; | ||||
|         %= select_field 'IMAPAccess' => $c->get_imap_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%=l 'mai_DESC_WEBMAIL' | ||||
|     %= l 'mai_DESC_WEBMAIL' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_WEBMAIL' | ||||
| 		</span><span class=input> | ||||
| 		% param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail'; | ||||
| 		%= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_WEBMAIL' | ||||
|       </span><span class=input> | ||||
|         % param 'WebMail' => $c->get_current_webmail_status() unless param 'WebMail'; | ||||
|         %= select_field 'WebMail' => $c->get_webmail_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%# .... | ||||
| 		%# Probably finally by a submit. | ||||
| 		%= submit_button $btn, class => 'action' | ||||
| 	%end     | ||||
| </div> | ||||
|     %# .... | ||||
|     %# Probably finally by a submit. | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   % end | ||||
| </div> | ||||
|   | ||||
| @@ -1,90 +1,90 @@ | ||||
| %# | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20  | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 | ||||
| %# | ||||
| <div id="Emailsettings-DEL" class="partial Emailsettings-DEL"> | ||||
| %#	<script> | ||||
| %#		window.onload = function() { | ||||
| %#		SelectInput(); | ||||
| %#	}; | ||||
| %#	</script> | ||||
| 	% if (config->{debug} == 1) { | ||||
| 		<pre> | ||||
|   %# <script> | ||||
|     %# window.onload = function() { | ||||
|       %# SelectInput(); | ||||
|       %# }; | ||||
|     %# </script> | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 			%= dumper $mai_data | ||||
| 		</pre> | ||||
| 	% } | ||||
| 	% my $btn = l('SAVE'); | ||||
| 	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table | ||||
|     </pre> | ||||
|   % } | ||||
|   % my $btn = l('SAVE'); | ||||
|   % $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table | ||||
|  | ||||
| 	<h2><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></h2> | ||||
| 	%= form_for "emailsettingsu" => (method => 'POST') => begin | ||||
| 		% param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
| 		%= hidden_field 'trt' => $mai_data->{trt} | ||||
| 		%# Inputs etc in here. | ||||
| 		<h2> | ||||
| 		%=l 'mai_TITLE_UNKNOWN' | ||||
| 		</h2> | ||||
|   <h2><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></h2> | ||||
|   %= form_for "emailsettingsu" => ( method => 'POST' ) => begin | ||||
|     % param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
|     %= hidden_field 'trt' => $mai_data->{trt} | ||||
|     %# Inputs etc in here. | ||||
|     <h2> | ||||
|       %= l 'mai_TITLE_UNKNOWN' | ||||
|     </h2> | ||||
|  | ||||
| 		%=l 'mai_DESC_UNKNOWN' | ||||
|     %= l 'mai_DESC_UNKNOWN' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_UNKNOWN' | ||||
| 		</span><span class=input> | ||||
| 		% param 'EmailUnknownUser' => $mai_data->{emailunknownuser} unless param 'EmailUnknownUser'; | ||||
| 		%= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_UNKNOWN' | ||||
|       </span><span class=input> | ||||
|         % param 'EmailUnknownUser' => $mai_data->{emailunknownuser} unless param 'EmailUnknownUser'; | ||||
|         %= select_field 'EmailUnknownUser' => $c->get_emailunknownuser_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<!--<hr class='menubar' />--> | ||||
| 		<h2> | ||||
| 		%=l 'mai_TITLE_DELEGATE' | ||||
| 		</h2> | ||||
|     <!--<hr class='menubar' />--> | ||||
|     <h2> | ||||
|       %= l 'mai_TITLE_DELEGATE' | ||||
|     </h2> | ||||
|  | ||||
| 		%=l 'mai_DESC_DELEGATE' | ||||
|     %= l 'mai_DESC_DELEGATE' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_DELEGATE' | ||||
| 		</span><span class=input> | ||||
| 		% param 'DelegateMailServer' => $mai_data->{delegatemailserver} unless param 'DelegateMailServer'; | ||||
| 		%= text_field 'DelegateMailServer', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_DELEGATE' | ||||
|       </span><span class=input> | ||||
|         % param 'DelegateMailServer' => $mai_data->{delegatemailserver} unless param 'DelegateMailServer'; | ||||
|         %= text_field 'DelegateMailServer', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<!--<hr class='sectionbar' />--> | ||||
| 		<h2> | ||||
| 		%=l 'mai_TITLE_SMARTHOST' | ||||
| 		</h2> | ||||
|     <!--<hr class='sectionbar' />--> | ||||
|     <h2> | ||||
|       %= l 'mai_TITLE_SMARTHOST' | ||||
|     </h2> | ||||
|  | ||||
| 		%=l 'mai_DESC_SMARTHOST' | ||||
|     %= l 'mai_DESC_SMARTHOST' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SMARTHOST' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SMTPSmartHost' => $mai_data->{smtpsmarthost} unless param 'SMTPSmartHost'; | ||||
| 		%= text_field 'SMTPSmartHost', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SMARTHOST' | ||||
|       </span><span class=input> | ||||
|         % param 'SMTPSmartHost' => $mai_data->{smtpsmarthost} unless param 'SMTPSmartHost'; | ||||
|         %= text_field 'SMTPSmartHost', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SMTPAUTHPROXY_status' => $mai_data->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status'; | ||||
| 		%= select_field 'SMTPAUTHPROXY_status' => [[(l 'DISABLED') => 'disabled'], [(l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SMARTHOST_SMTPAUTH_STATUS' | ||||
|       </span><span class=input> | ||||
|         % param 'SMTPAUTHPROXY_status' => $mai_data->{smtpauthproxystatus} unless param 'SMTPAUTHPROXY_status'; | ||||
|         %= select_field 'SMTPAUTHPROXY_status' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SMTPAUTHPROXY_Userid' => $mai_data->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid'; | ||||
| 		%= text_field 'SMTPAUTHPROXY_Userid', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SMARTHOST_SMTPAUTH_USERID' | ||||
|       </span><span class=input> | ||||
|         % param 'SMTPAUTHPROXY_Userid' => $mai_data->{smtpauthproxyuserid} unless param 'SMTPAUTHPROXY_Userid'; | ||||
|         %= text_field 'SMTPAUTHPROXY_Userid', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SMTPAUTHPROXY_Passwd' => $mai_data->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd'; | ||||
| 		%= password_field 'SMTPAUTHPROXY_Passwd', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SMARTHOST_SMTPAUTH_PASSWD' | ||||
|       </span><span class=input> | ||||
|         % param 'SMTPAUTHPROXY_Passwd' => $mai_data->{smtpauthproxypassword} unless param 'SMTPAUTHPROXY_Passwd'; | ||||
|         %= password_field 'SMTPAUTHPROXY_Passwd', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
|  | ||||
| 		%# .... | ||||
| 		%# Probably finally by a submit. | ||||
| 		%= submit_button $btn, class => 'action' | ||||
| 	%end     | ||||
| </div> | ||||
|     %# .... | ||||
|     %# Probably finally by a submit. | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   % end | ||||
| </div> | ||||
|   | ||||
| @@ -1,98 +1,98 @@ | ||||
| %# | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20  | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 | ||||
| %# | ||||
| <div id="Emailsettings-FIL" class="partial Emailsettings-FIL"> | ||||
| %#	<script> | ||||
| %#		window.onload = function() { | ||||
| %#		SelectInput(); | ||||
| %#	}; | ||||
| %#	</script> | ||||
| 	% if (config->{debug} == 1) { | ||||
| 		<pre> | ||||
|   %# <script> | ||||
|     %# window.onload = function() { | ||||
|       %# SelectInput(); | ||||
|       %# }; | ||||
|     %# </script> | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 			%= dumper $mai_data | ||||
| 		</pre> | ||||
| 	% } | ||||
| 	% my $btn = l('SAVE'); | ||||
| 	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table | ||||
|     </pre> | ||||
|   % } | ||||
|   % my $btn = l('SAVE'); | ||||
|   % $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table | ||||
|  | ||||
| 	<h2><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></h2><br> | ||||
| 	%= form_for "emailsettingsu" => (method => 'POST') => begin | ||||
| 		% param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
| 		%= hidden_field 'trt' => $mai_data->{trt} | ||||
| 		%# Inputs etc in here. | ||||
| 		%=l 'mai_DESC_VIRUS_SCAN' | ||||
|   <h2><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></h2><br> | ||||
|   %= form_for "emailsettingsu" => ( method => 'POST' ) => begin | ||||
|     % param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
|     %= hidden_field 'trt' => $mai_data->{trt} | ||||
|     %# Inputs etc in here. | ||||
|     %= l 'mai_DESC_VIRUS_SCAN' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_VIRUS_SCAN' | ||||
| 		</span><span class=input> | ||||
| 		% param 'VirusStatus' => $mai_data->{virusstatus} unless param 'VirusStatus'; | ||||
| 		%= select_field 'VirusStatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 		</span><br></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_VIRUS_SCAN' | ||||
|       </span><span class=input> | ||||
|         % param 'VirusStatus' => $mai_data->{virusstatus} unless param 'VirusStatus'; | ||||
|         %= select_field 'VirusStatus' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|       </span><br></p> | ||||
|  | ||||
| 		%=l 'mai_DESC_SPAM_SCAN' | ||||
|     %= l 'mai_DESC_SPAM_SCAN' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_SCAN' | ||||
| 		</span><span class=input> | ||||
| 		% param 'Spamstatus' => $mai_data->{spamstatus} unless param 'Spamstatus'; | ||||
| 		%= select_field 'Spamstatus' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SPAM_SCAN' | ||||
|       </span><span class=input> | ||||
|         % param 'Spamstatus' => $mai_data->{spamstatus} unless param 'Spamstatus'; | ||||
|         %= select_field 'Spamstatus' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_SENSITIVITY' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpamSensitivity' => $mai_data->{spamsensitivity} unless param 'SpamSensitivity'; | ||||
| 		%= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SPAM_SENSITIVITY' | ||||
|       </span><span class=input> | ||||
|         % param 'SpamSensitivity' => $mai_data->{spamsensitivity} unless param 'SpamSensitivity'; | ||||
|         %= select_field 'SpamSensitivity' => $c->get_spam_sensitivity_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_TAGLEVEL' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpamTagLevel' => $mai_data->{spamtaglevel} unless param 'SpamTagLevel'; | ||||
| 		%= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SPAM_TAGLEVEL' | ||||
|       </span><span class=input> | ||||
|         % param 'SpamTagLevel' => $mai_data->{spamtaglevel} unless param 'SpamTagLevel'; | ||||
|         %= select_field 'SpamTagLevel' => $c->get_spam_level_options(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_REJECTLEVEL' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpamRejectLevel' => $mai_data->{spamrejectlevel} unless param 'SpamRejectLevel'; | ||||
| 		%= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SPAM_REJECTLEVEL' | ||||
|       </span><span class=input> | ||||
|         % param 'SpamRejectLevel' => $mai_data->{spamrejectlevel} unless param 'SpamRejectLevel'; | ||||
|         %= select_field 'SpamRejectLevel' => $c->get_spam_level_options(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SORTSPAM' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpamSortSpam' => $mai_data->{spamsortspam} unless param 'SpamSortSpam'; | ||||
| 		%= select_field 'SpamSortSpam' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SORTSPAM' | ||||
|       </span><span class=input> | ||||
|         % param 'SpamSortSpam' => $mai_data->{spamsortspam} unless param 'SpamSortSpam'; | ||||
|         %= select_field 'SpamSortSpam' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|     </span></p> | ||||
|  | ||||
| 		%=l 'mai_DESC_SPAM_SUBJECT' | ||||
|     %= l 'mai_DESC_SPAM_SUBJECT' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_SUBJECTTAG' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpamSubjectTag' => $mai_data->{spamsubjecttag} unless param 'SpamSubjectTag'; | ||||
| 		%= select_field 'SpamSubjectTag' => [[(l 'DISABLED') => 'disabled'], [ (l 'ENABLED') => 'enabled']], class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SPAM_SUBJECTTAG' | ||||
|       </span><span class=input> | ||||
|         % param 'SpamSubjectTag' => $mai_data->{spamsubjecttag} unless param 'SpamSubjectTag'; | ||||
|         %= select_field 'SpamSubjectTag' => [ [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'ENABLED' ) => 'enabled' ] ], class => 'input'; | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_SUBJECT' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpamSubject' => $mai_data->{spamsubject} unless param 'SpamSubject'; | ||||
| 		%= text_field 'SpamSubject' => class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SPAM_SUBJECT' | ||||
|       </span><span class=input> | ||||
|         % param 'SpamSubject' => $mai_data->{spamsubject} unless param 'SpamSubject'; | ||||
|         %= text_field 'SpamSubject' => class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%=l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT' | ||||
|     %= l 'mai_DESC_BLOCK_EXECUTABLE_CONTENT' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_CONTENT_TO_BLOCK' | ||||
| 		</span><span class=input> | ||||
| 		% param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent'; | ||||
| 		%= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1" | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_CONTENT_TO_BLOCK' | ||||
|       </span><span class=input> | ||||
|         % param 'BlockExecutableContent' => $c->get_patterns_current_opt() unless param 'BlockExecutableContent'; | ||||
|         %= select_field 'BlockExecutableContent' => $c->get_patterns_opt(), class => 'input', multiple => "1"; | ||||
|     </span></p> | ||||
|  | ||||
| 		%# .... | ||||
| 		%# Probably finally by a submit. | ||||
| 		%= submit_button $btn, class => 'action' | ||||
| 	%end     | ||||
| </div> | ||||
|     %# .... | ||||
|     %# Probably finally by a submit. | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   % end | ||||
| </div> | ||||
|   | ||||
| @@ -1,152 +1,152 @@ | ||||
| %# | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20  | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 | ||||
| %# | ||||
| <div id="Emailsettings-FRONT" class="partial Emailsettings-FRONT"> | ||||
| %#	<script> | ||||
| %#		window.onload = function() { | ||||
| %#		SelectInput(); | ||||
| %#	}; | ||||
| %#	</script> | ||||
| 	% if (config->{debug} == 1) { | ||||
| 		<pre> | ||||
|   %# <script> | ||||
|     %# window.onload = function() { | ||||
|       %# SelectInput(); | ||||
|       %# }; | ||||
|     %# </script> | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 			%= dumper $mai_data | ||||
| 			<br>  | ||||
| 		</pre> | ||||
| 	% } | ||||
| 	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table | ||||
| 	% my $btn = l('Modify'); | ||||
| 	<fieldset> | ||||
| 		<legend><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></legend> | ||||
| 		%= form_for 'emailsettings' => (method => 'POST') => begin | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_POP_ACCESS_CONTROL' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_current_pop3_access( TRUE ) | ||||
| 		</span></p> | ||||
|     </pre> | ||||
|   % } | ||||
|   % $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table | ||||
|   % my $btn = l('Modify'); | ||||
|   <fieldset> | ||||
|     <legend><%= $c->l('mai_DESC_STATE_ACCESS_BUTTON') %></legend> | ||||
|     %= form_for 'emailsettings' => ( method => 'POST' ) => begin | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_POP_ACCESS_CONTROL' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_current_pop3_access(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_IMAP_ACCESS_CONTROL' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_current_imap_access( TRUE ) | ||||
| 		</span></p> | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_IMAP_ACCESS_CONTROL' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_current_imap_access(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_WEBMAIL' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_current_webmail_status( TRUE ) | ||||
| 		</span></p> | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_WEBMAIL' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_current_webmail_status(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<br>  | ||||
| 		<div class='center'> | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		</div> | ||||
|       <br> | ||||
|       <div class='center'> | ||||
|         %= submit_button "$btn", class => 'action' | ||||
|       </div> | ||||
|  | ||||
| 		%= hidden_field 'trt' => 'ACC' | ||||
| 		% end    | ||||
| 		</fieldset> | ||||
| 		<br>  | ||||
|       %= hidden_field 'trt' => 'ACC' | ||||
|     % end | ||||
|   </fieldset> | ||||
|   <br> | ||||
|  | ||||
| 		 | ||||
| 	<fieldset> | ||||
| 		<legend><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></legend> | ||||
| 		%= form_for 'emailsettings' => (method => 'POST') => begin | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_VIRUS_SCAN' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_virus_status(TRUE) | ||||
| 		</span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SPAM_SCAN' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_spam_status(TRUE) | ||||
| 		</span></p> | ||||
|   <fieldset> | ||||
|     <legend><%= $c->l('mai_DESC_STATE_FILTERING_BUTTON') %></legend> | ||||
|     %= form_for 'emailsettings' => ( method => 'POST' ) => begin | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_VIRUS_SCAN' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_virus_status(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_patterns_status(TRUE) | ||||
| 		</span></p> | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_SPAM_SCAN' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_spam_status(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<br>  | ||||
| 		<div class='center'> | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		</div> | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_BLOCK_EXECUTABLE_CONTENT' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_patterns_status(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		%= hidden_field 'trt' => 'FIL' | ||||
| 		% end   | ||||
| 	</fieldset> | ||||
|     <br>   | ||||
|       <br> | ||||
|       <div class='center'> | ||||
|         %= submit_button "$btn", class => 'action' | ||||
|       </div> | ||||
|  | ||||
| 	<fieldset> | ||||
| 		<legend><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></legend> | ||||
| 		%= form_for 'emailsettings' => (method => 'POST') => begin | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_MODE' | ||||
| 		</span><span class=data2> | ||||
| 		%= $mai_data->{fetchmailmethod} | ||||
| 		</span></p> | ||||
| 		 | ||||
| 		% my $smtp_mesg; | ||||
|       %= hidden_field 'trt' => 'FIL' | ||||
|     % end | ||||
|   </fieldset> | ||||
|   <br> | ||||
|  | ||||
| 		% $smtp_mesg=l('mai_SMTP_port_authenticate'); | ||||
| 		<p><span class=label> | ||||
| 			%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));  | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_current_smtp_auth( TRUE ) | ||||
| 		</span></p> | ||||
|   <fieldset> | ||||
|     <legend><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></legend> | ||||
|     %= form_for 'emailsettings' => ( method => 'POST' ) => begin | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_MODE' | ||||
|         </span><span class=data2> | ||||
|           %= $mai_data->{fetchmailmethod} | ||||
|       </span></p> | ||||
|  | ||||
| 		% $smtp_mesg=l('mai_SMTPS_SSL/TLS'); | ||||
| 		<p><span class=label> | ||||
| 			%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));  | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE ) | ||||
| 		</span></p> | ||||
|       % my $smtp_mesg; | ||||
|  | ||||
| 		% $smtp_mesg=l 'mai_Submission_port'; | ||||
| 		<p><span class=label> | ||||
| 			%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));  | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_current_smtp_ssl_auth( TRUE,'u', FALSE ) | ||||
| 		</span></p> | ||||
| 		<br /> | ||||
|       % $smtp_mesg = l('mai_SMTP_port_authenticate'); | ||||
|       <p><span class=label> | ||||
|           %= sprintf( $smtp_mesg, $c->get_db_prop( 'qpsmtpd', 'TCPPort', 25 ) ); | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_current_smtp_auth(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<div class='center'> | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		</div> | ||||
|       % $smtp_mesg = l('mai_SMTPS_SSL/TLS'); | ||||
|       <p><span class=label> | ||||
|           %= sprintf( $smtp_mesg, $c->get_db_prop( 'sqpsmtpd', 'TCPPort', 465 ) ); | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_current_smtp_ssl_auth( TRUE, 's', FALSE ) | ||||
|       </span></p> | ||||
|  | ||||
| 		%= hidden_field 'trt' => 'REC' | ||||
| 		% end     | ||||
| 	</fieldset> | ||||
|     <br> | ||||
|       % $smtp_mesg = l 'mai_Submission_port'; | ||||
|       <p><span class=label> | ||||
|           %= sprintf( $smtp_mesg, $c->get_db_prop( 'uqpsmtpd', 'TCPPort', 587 ) ); | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_current_smtp_ssl_auth( TRUE, 'u', FALSE ) | ||||
|       </span></p> | ||||
|       <br /> | ||||
|  | ||||
| 	<fieldset> | ||||
| 		<legend><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></legend> | ||||
| 		%= form_for 'emailsettings' => (method => 'POST') => begin | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_UNKNOWN' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_emailunknownuser_status( TRUE ) | ||||
| 		</span></p> | ||||
|       <div class='center'> | ||||
|         %= submit_button "$btn", class => 'action' | ||||
|       </div> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_DELEGATE' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_value('DelegateMailServer') | ||||
| 		</span></p> | ||||
|       %= hidden_field 'trt' => 'REC' | ||||
|     % end | ||||
|   </fieldset> | ||||
|   <br> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SMARTHOST' | ||||
| 		</span><span class=data2> | ||||
| 		%= $c->get_value('SMTPSmartHost') | ||||
| 		</span></p> | ||||
|   <fieldset> | ||||
|     <legend><%= $c->l('mai_DESC_STATE_DELIVERY_BUTTON') %></legend> | ||||
|     %= form_for 'emailsettings' => ( method => 'POST' ) => begin | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_UNKNOWN' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_emailunknownuser_status(TRUE) | ||||
|       </span></p> | ||||
|  | ||||
| 		<br>  | ||||
| 		<div class='center'> | ||||
| 		%= submit_button "$btn", class => 'action' | ||||
| 		</div> | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_DELEGATE' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_value('DelegateMailServer') | ||||
|       </span></p> | ||||
|  | ||||
| 		%= hidden_field 'trt' => 'DEL' | ||||
| 		% end     | ||||
| 	</fieldset> | ||||
| </div> | ||||
|       <p><span class=label> | ||||
|           %= l 'mai_LABEL_SMARTHOST' | ||||
|         </span><span class=data2> | ||||
|           %= $c->get_value('SMTPSmartHost') | ||||
|       </span></p> | ||||
|  | ||||
|       <br> | ||||
|       <div class='center'> | ||||
|         %= submit_button "$btn", class => 'action' | ||||
|       </div> | ||||
|  | ||||
|       %= hidden_field 'trt' => 'DEL' | ||||
|     % end | ||||
|   </fieldset> | ||||
| </div> | ||||
|   | ||||
| @@ -1,159 +1,159 @@ | ||||
| %# | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20  | ||||
| %# Generated by SM2Gen version:0.9(20Jan2025) Chameleon version:4.5.4 On Python:3.12.3 at 2025-06-29 08:53:20 | ||||
| %# | ||||
| <div id="Emailsettings-REC" class="partial Emailsettings-REC"> | ||||
| %#	<script> | ||||
| %#		window.onload = function() { | ||||
| %#		SelectInput(); | ||||
| %#	}; | ||||
| %#	</script> | ||||
| 	% if (config->{debug} == 1) { | ||||
| 		<pre> | ||||
|   %# <script> | ||||
|     %# window.onload = function() { | ||||
|       %# SelectInput(); | ||||
|       %# }; | ||||
|     %# </script> | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 			%= dumper $mai_data | ||||
| 		</pre> | ||||
| 	% } | ||||
| 	% my $btn = l('SAVE'); | ||||
| 	% $c->param(Selected => undef); #This may need deleting for a params panel - only needed for a table | ||||
|     </pre> | ||||
|   % } | ||||
|   % my $btn = l('SAVE'); | ||||
|   % $c->param( Selected => undef ); #This may need deleting for a params panel - only needed for a table | ||||
|  | ||||
| 	<h2><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></h2><br> | ||||
| 	%= form_for "emailsettingsu" => (method => 'POST') => begin | ||||
| 		% param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
| 		%= hidden_field 'trt' => $mai_data->{trt} | ||||
| 		%# Inputs etc in here. | ||||
| 		%=l 'mai_DESC_MODE' | ||||
|   <h2><%= $c->l('mai_DESC_STATE_RECEPTION_BUTTON') %></h2><br> | ||||
|   %= form_for "emailsettingsu" => ( method => 'POST' ) => begin | ||||
|     % param 'trt' => $mai_data->{trt} unless param 'trt'; | ||||
|     %= hidden_field 'trt' => $mai_data->{trt} | ||||
|     %# Inputs etc in here. | ||||
|     %= l 'mai_DESC_MODE' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_MODE' | ||||
| 		</span><span class=input> | ||||
| 		% param 'FetchmailMethod' => $mai_data->{fetchmailmethod} unless param 'FetchmailMethod'; | ||||
| 	<!-- | ||||
| 		<pre> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_MODE' | ||||
|       </span><span class=input> | ||||
|         % param 'FetchmailMethod' => $mai_data->{fetchmailmethod} unless param 'FetchmailMethod'; | ||||
|         <!-- | ||||
|         <pre> | ||||
| 			%= dumper $mai_data->{fetchmailmethod} | ||||
| 			%= dumper $c->get_retrieval_opt() | ||||
| 			%= param 'FetchmailMethod' | ||||
| 		</pre> | ||||
| 	--> | ||||
| 		%= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|         </pre> | ||||
|         --> | ||||
|         %= select_field 'FetchmailMethod' => $c->get_retrieval_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%#=l 'mai_DESC_SMTP_AUTH_CONTROL' | ||||
| 		<br /> | ||||
| 		%= l "mai_SMTP_port_(25)" | ||||
| 		<br /> | ||||
| 		%= l "mai_SMTPS_port_(465)" | ||||
| 		<br /> | ||||
| 		%= l "mai_SMTP_Submission" | ||||
| 		<br /> | ||||
|     %# =l 'mai_DESC_SMTP_AUTH_CONTROL' | ||||
|     <br /> | ||||
|     %= l "mai_SMTP_port_(25)" | ||||
|     <br /> | ||||
|     %= l "mai_SMTPS_port_(465)" | ||||
|     <br /> | ||||
|     %= l "mai_SMTP_Submission" | ||||
|     <br /> | ||||
|  | ||||
| 		% my $smtp_mesg=l('mai_SMTP_port_authenticate'); | ||||
| 		<p><span class=label> | ||||
| 			%= sprintf($smtp_mesg,$c->get_db_prop('qpsmtpd','TCPPort',25));  | ||||
| 		</span><span class=input> | ||||
| 			% param 'SMTPAuth' => $c->get_current_smtp_auth( FALSE ) unless param 'SMTPAuth'; | ||||
| 	<!-- | ||||
| 		<pre> | ||||
|     % my $smtp_mesg = l('mai_SMTP_port_authenticate'); | ||||
|     <p><span class=label> | ||||
|         %= sprintf( $smtp_mesg, $c->get_db_prop( 'qpsmtpd', 'TCPPort', 25 ) ); | ||||
|       </span><span class=input> | ||||
|         % param 'SMTPAuth' => $c->get_current_smtp_auth(FALSE) unless param 'SMTPAuth'; | ||||
|         <!-- | ||||
|         <pre> | ||||
| 			%= dumper $c->get_smtp_auth_opt() | ||||
| 			%= dumper $c->get_current_smtp_auth(FALSE) | ||||
| 			%= dumper $c->get_db_prop("qpsmtpd","Authentication") | ||||
| 			%= param 'SMTPAuth' | ||||
| 		</pre> | ||||
| 	--> | ||||
| 			%= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|         </pre> | ||||
|         --> | ||||
|         %= select_field 'SMTPAuth' => $c->get_smtp_auth_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		% my $smtp_mesg=l('SMTPS SSL/TLS auth: port %u status:'); | ||||
| 		<p><span class=label> | ||||
| 			%= sprintf($smtp_mesg,$c->get_db_prop('sqpsmtpd','TCPPort',465));  | ||||
| 		</span><span class=input> | ||||
| 			% param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) unless param 'sSMTPAuth'; | ||||
| 		 | ||||
| 			%= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|     % my $smtp_mesg = l('SMTPS SSL/TLS auth: port %u status:'); | ||||
|     <p><span class=label> | ||||
|         %= sprintf( $smtp_mesg, $c->get_db_prop( 'sqpsmtpd', 'TCPPort', 465 ) ); | ||||
|       </span><span class=input> | ||||
|         % param 'sSMTPAuth' => $c->get_current_smtp_ssl_auth( FALSE, 's', TRUE ) unless param 'sSMTPAuth'; | ||||
|  | ||||
| 		%my $smtp_mesg=l('Submission port %u status:'); | ||||
| 		<p><span class=label> | ||||
| 			%= sprintf($smtp_mesg,$c->get_db_prop('uqpsmtpd','TCPPort',587));  | ||||
| 		</span><span class=input> | ||||
| 			% param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) unless param 'uSMTPAuth'; | ||||
| 	<!-- | ||||
| 		<pre> | ||||
|         %= select_field 'sSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
|     % my $smtp_mesg = l('Submission port %u status:'); | ||||
|     <p><span class=label> | ||||
|         %= sprintf( $smtp_mesg, $c->get_db_prop( 'uqpsmtpd', 'TCPPort', 587 ) ); | ||||
|       </span><span class=input> | ||||
|         % param 'uSMTPAuth' => $c->get_current_smtp_ssl_auth( FALSE, 'u', TRUE ) unless param 'uSMTPAuth'; | ||||
|         <!-- | ||||
|         <pre> | ||||
| 			%= dumper $c->get_smtp_ssl_auth_opt() | ||||
| 			%= dumper $c->get_current_smtp_ssl_auth(FALSE,'s', TRUE) | ||||
| 			%= dumper $c->get_current_smtp_ssl_auth(FALSE,'u', TRUE) | ||||
| 			%= dumper $c->get_db_prop("uqpsmtpd","access") | ||||
| 			%= param 'uSMTPAuth' | ||||
| 		</pre> | ||||
| 	--> | ||||
| 		%= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input' | ||||
| 		</span></p> | ||||
|         </pre> | ||||
|         --> | ||||
|         %= select_field 'uSMTPAuth' => $c->get_smtp_ssl_auth_opt(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<!--<hr class="sectionbar" />--> | ||||
| 		<h2> | ||||
| 		%=l 'mai_TITLE_SECONDARY' | ||||
| 		</h2><br> | ||||
|     <!--<hr class="sectionbar" />--> | ||||
|     <h2> | ||||
|       %= l 'mai_TITLE_SECONDARY' | ||||
|     </h2><br> | ||||
|  | ||||
| 		%=l 'mai_DESC_SECONDARY' | ||||
|     %= l 'mai_DESC_SECONDARY' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SECONDARY' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SecondaryMailServer' => $mai_data->{secondarymailserver} unless param 'SecondaryMailServer'; | ||||
| 		%= text_field 'SecondaryMailServer', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SECONDARY' | ||||
|       </span><span class=input> | ||||
|         % param 'SecondaryMailServer' => $mai_data->{secondarymailserver} unless param 'SecondaryMailServer'; | ||||
|         %= text_field 'SecondaryMailServer', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%=l 'mai_DESC_FETCH_PERIOD' | ||||
|     %= l 'mai_DESC_FETCH_PERIOD' | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_FETCH_PERIOD' | ||||
| 		</span><span class=input> | ||||
| 		% param 'FreqOffice' => $mai_data->{freqoffice} unless param 'FreqOffice'; | ||||
| 		%= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_FETCH_PERIOD' | ||||
|       </span><span class=input> | ||||
|         % param 'FreqOffice' => $mai_data->{freqoffice} unless param 'FreqOffice'; | ||||
|         %= select_field 'FreqOffice' => $c->fetchmail_freq(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_FETCH_PERIOD_NIGHTS' | ||||
| 		</span><span class=input> | ||||
| 		% param 'FreqOutside' => $mai_data->{freqoutside} unless param 'FreqOutside'; | ||||
| 		%= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_FETCH_PERIOD_NIGHTS' | ||||
|       </span><span class=input> | ||||
|         % param 'FreqOutside' => $mai_data->{freqoutside} unless param 'FreqOutside'; | ||||
|         %= select_field 'FreqOutside' => $c->fetchmail_freq(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_FETCH_PERIOD_WEEKENDS' | ||||
| 		</span><span class=input> | ||||
| 		% param 'FreqWeekend' => $mai_data->{freqweekend} unless param 'FreqWeekend'; | ||||
| 		%= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_FETCH_PERIOD_WEEKENDS' | ||||
|       </span><span class=input> | ||||
|         % param 'FreqWeekend' => $mai_data->{freqweekend} unless param 'FreqWeekend'; | ||||
|         %= select_field 'FreqWeekend' => $c->fetchmail_freq(), class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_POP_ACCOUNT' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SecondaryMailAccount' => $mai_data->{secondarymailaccount} unless param 'SecondaryMailAccount'; | ||||
| 		%= text_field 'SecondaryMailAccount', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_POP_ACCOUNT' | ||||
|       </span><span class=input> | ||||
|         % param 'SecondaryMailAccount' => $mai_data->{secondarymailaccount} unless param 'SecondaryMailAccount'; | ||||
|         %= text_field 'SecondaryMailAccount', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_POP_PASS' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SecondaryMailPassword' => $mai_data->{secondarymailpassword} unless param 'SecondaryMailPassword'; | ||||
| 		%= password_field 'SecondaryMailPassword', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_POP_PASS' | ||||
|       </span><span class=input> | ||||
|         % param 'SecondaryMailPassword' => $mai_data->{secondarymailpassword} unless param 'SecondaryMailPassword'; | ||||
|         %= password_field 'SecondaryMailPassword', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SORT_METHOD' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SpecifyHeader' => $mai_data->{specifyheader} unless param 'SpecifyHeader'; | ||||
| 		%= select_field 'SpecifyHeader' => [[(l 'mai_DEFAULT') => 'off'], [(l 'mai_SPECIFY_BELOW') => 'on']], class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SORT_METHOD' | ||||
|       </span><span class=input> | ||||
|         % param 'SpecifyHeader' => $mai_data->{specifyheader} unless param 'SpecifyHeader'; | ||||
|         %= select_field 'SpecifyHeader' => [ [ ( l 'mai_DEFAULT' ) => 'off' ], [ ( l 'mai_SPECIFY_BELOW' ) => 'on' ] ], class => 'input'; | ||||
|     </span></p> | ||||
|  | ||||
| 		<p><span class=label> | ||||
| 		%=l 'mai_LABEL_SORT_HEADER' | ||||
| 		</span><span class=input> | ||||
| 		% param 'SecondaryMailEnvelope' => $mai_data->{secondarymailenvelope} unless param 'SecondaryMailEnvelope'; | ||||
| 		%= text_field 'SecondaryMailEnvelope', class => 'input' | ||||
| 		</span></p> | ||||
|     <p><span class=label> | ||||
|         %= l 'mai_LABEL_SORT_HEADER' | ||||
|       </span><span class=input> | ||||
|         % param 'SecondaryMailEnvelope' => $mai_data->{secondarymailenvelope} unless param 'SecondaryMailEnvelope'; | ||||
|         %= text_field 'SecondaryMailEnvelope', class => 'input' | ||||
|     </span></p> | ||||
|  | ||||
| 		%# .... | ||||
| 		%# Probably finally by a submit. | ||||
| 		%= submit_button $btn, class => 'action' | ||||
| 	%end     | ||||
| </div> | ||||
|     %# .... | ||||
|     %# Probably finally by a submit. | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   % end | ||||
| </div> | ||||
|   | ||||
| @@ -1,42 +1,42 @@ | ||||
| % layout 'default', title => 'Sme server 2 - Support'; | ||||
|  | ||||
| % content_for 'head' => begin | ||||
|     %= include 'partials/_head' | ||||
|   %= include 'partials/_head' | ||||
| % end | ||||
|  | ||||
| % content_for 'header' => begin | ||||
|     %= include 'partials/_header' | ||||
|   %= include 'partials/_header' | ||||
| % end | ||||
|  | ||||
| % content_for 'info' => begin | ||||
|     %= include 'partials/_info' | ||||
|   %= include 'partials/_info' | ||||
| % end | ||||
|  | ||||
| % content_for 'navigation' => begin | ||||
|     < %= $navigation % > | ||||
|     %= include 'partials/_navig' | ||||
|   < %= $navigation % > | ||||
|   %= include 'partials/_navig' | ||||
| % end | ||||
|  | ||||
| % content_for 'footer' => begin | ||||
|     %= include 'partials/_footer' | ||||
|   %= include 'partials/_footer' | ||||
| % end | ||||
|  | ||||
| % content_for 'end' => begin | ||||
|     <div id="end" class="sme-copyrightbar"> | ||||
| 	content_end | ||||
|     </div> | ||||
|   <div id="end" class="sme-copyrightbar"> | ||||
|     content_end | ||||
|   </div> | ||||
| % end | ||||
|  | ||||
| <div id="module"> | ||||
|     <p> < %= $title % ></p><br> | ||||
|     <%= $modul %><br> | ||||
| Et eu humo modo paratus quadrum turpis validus. Abico appellatio augue qui refero valetudo vereor. Augue diam eu genitus ille letalis nobis typicus veniam. | ||||
|   <p> < %= $title % ></p><br> | ||||
|   <%= $modul %><br> | ||||
|   Et eu humo modo paratus quadrum turpis validus. Abico appellatio augue qui refero valetudo vereor. Augue diam eu genitus ille letalis nobis typicus veniam. | ||||
|  | ||||
| Dignissim dolus loquor lucidus probo proprius tation torqueo. Abluo luptatum quidem. Acsi aliquip eu ex iaceo natu populus quae scisco si. | ||||
|   Dignissim dolus loquor lucidus probo proprius tation torqueo. Abluo luptatum quidem. Acsi aliquip eu ex iaceo natu populus quae scisco si. | ||||
|  | ||||
| Aliquam autem blandit decet in jus loquor quidne saluto te. Eu meus voco wisi. Abico defui euismod huic jumentum lobortis mos vulpes. Causa eros feugiat hendrerit illum luctus nimis quidem valetudo. Elit ex obruo tation usitas vero. Abigo dolus hendrerit huic iriure jumentum letalis lobortis melior nulla. Blandit causa immitto iriure metuo nutus pagus ut voco. | ||||
|     <br> | ||||
|     <p> | ||||
|     	%= link_to Welcome => '/' | ||||
|     </p> | ||||
|   Aliquam autem blandit decet in jus loquor quidne saluto te. Eu meus voco wisi. Abico defui euismod huic jumentum lobortis mos vulpes. Causa eros feugiat hendrerit illum luctus nimis quidem valetudo. Elit ex obruo tation usitas vero. Abigo dolus hendrerit huic iriure jumentum letalis lobortis melior nulla. Blandit causa immitto iriure metuo nutus pagus ut voco. | ||||
|   <br> | ||||
|   <p> | ||||
|     %= link_to Welcome => '/' | ||||
|   </p> | ||||
| </div> | ||||
|   | ||||
| @@ -1,36 +1,36 @@ | ||||
| %	use SrvMngr qw( getNavigation ); | ||||
| %	my %nav = %{SrvMngr->getNavigation( $c->languages(), 'N' )}; | ||||
| % use SrvMngr qw( getNavigation ); | ||||
| % my %nav = %{ SrvMngr->getNavigation( $c->languages(), 'N' ) }; | ||||
|  | ||||
| 	<div id='navmenu'> | ||||
| 	<!-- <a href='#' id='tognav' class='menu-title'>NAVIGATION</a> --> | ||||
| 	<div id='menunav'> | ||||
| <div id='navmenu'> | ||||
|   <!-- <a href='#' id='tognav' class='menu-title'>NAVIGATION</a> --> | ||||
|   <div id='menunav'> | ||||
|  | ||||
| %    my $cc = 200; | ||||
| %    foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})  | ||||
| %		<=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) { | ||||
| % | ||||
| 	<!-- div class='section section-title'><%= $h %></div --> | ||||
| 	<div><a href='#' class='section section-title'><%= $h %></a></div> | ||||
| 	<div class='togms'> | ||||
| %	my ($classNew, $target, $href) = ''; | ||||
| %	foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} }  @{$nav{$h}{'DESCRIPTIONS'}}) { | ||||
|     % my $cc = 200; | ||||
|     % foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'}) | ||||
|       % <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) { | ||||
|       % | ||||
|       <!-- div class='section section-title'><%= $h %></div --> | ||||
|     <div><a href='#' class='section section-title'><%= $h %></a></div> | ||||
|     <div class='togms'> | ||||
|       % my ( $classNew, $target, $href ) = ''; | ||||
|       % foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) { | ||||
|  | ||||
| %	    next if ($_->{'MENUCAT'} ne 'N' );	# menu Navigation  | ||||
|         % next if ( $_->{'MENUCAT'} ne 'N' ); # menu Navigation | ||||
|  | ||||
| %	    if ( $_->{'FILENAME'} =~ m/^2\// ) { | ||||
| %		$target = '_self'; | ||||
| %	    	(my $file2 = $_->{'FILENAME'}) =~ s|^2/||; | ||||
| %	    	$href = '/smanager/' . $file2; | ||||
| %	    } else { | ||||
| %		$target = 'main'; | ||||
| %	    	$href = '/server-manager' . $_->{'FILENAME'}; | ||||
| %	    } | ||||
| 	    <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' | ||||
| 	    id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> | ||||
| %           $cc++; | ||||
| %	} | ||||
| 	</div> | ||||
|         % if ( $_->{'FILENAME'} =~ m/^2\// ) { | ||||
|           % $target = '_self'; | ||||
|           % ( my $file2 = $_->{'FILENAME'} ) =~ s|^2/||; | ||||
|           % $href = '/smanager/' . $file2; | ||||
|         % } else { | ||||
|         % $target = 'main'; | ||||
|         % $href = '/server-manager' . $_->{'FILENAME'}; | ||||
|       % } | ||||
|     <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' | ||||
|       id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> | ||||
|   % $cc++; | ||||
|   % } | ||||
| </div> | ||||
|  | ||||
| %    } | ||||
|     </div> | ||||
|     </div> | ||||
| % } | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,38 +1,38 @@ | ||||
| %	use SrvMngr qw( getNavigation ); | ||||
| %	my %nav = %{SrvMngr->getNavigation( $c->languages(), 'A' )}; | ||||
| % use SrvMngr qw( getNavigation ); | ||||
| % my %nav = %{ SrvMngr->getNavigation( $c->languages(), 'A' ) }; | ||||
|  | ||||
| 	<div id='navigat2'> | ||||
| 	 <!-- ><div><a href='#' id='togadm' class='menu-title'>ADMINISTRATION</a></div> --> | ||||
| 	<div id='menuadm'> | ||||
| <div id='navigat2'> | ||||
|   <!-- ><div><a href='#' id='togadm' class='menu-title'>ADMINISTRATION</a></div> --> | ||||
|   <div id='menuadm'> | ||||
|  | ||||
| %    my $cc = 100; | ||||
| %    foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})  | ||||
| %		<=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) { | ||||
| 	<div><a href='#' class='section section-title'><%= $h %></a></div> | ||||
| 	<div class='togms'> | ||||
| %	my ($classNew, $target, $href) = ''; | ||||
| %	foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} }  @{$nav{$h}{'DESCRIPTIONS'}}) { | ||||
|     % my $cc = 100; | ||||
|     % foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'}) | ||||
|       % <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) { | ||||
|       <div><a href='#' class='section section-title'><%= $h %></a></div> | ||||
|       <div class='togms'> | ||||
|         % my ( $classNew, $target, $href ) = ''; | ||||
|         % foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) { | ||||
|  | ||||
| %	    next if ($_->{'MENUCAT'} ne 'A' );	# menu Admin  | ||||
|           % next if ( $_->{'MENUCAT'} ne 'A' ); # menu Admin | ||||
|  | ||||
| %	    if ( $_->{'FILENAME'} =~ m/^2\// ) { | ||||
| %		$target = '_self'; | ||||
| %	    	(my $file2 = $_->{'FILENAME'}) =~ s|^2/||; | ||||
| %	    	$href = '/smanager/' . $file2; | ||||
| %	    } else { | ||||
| %		$target = 'main'; | ||||
| %#	    	$href = '/server-manager' . $_->{'FILENAME'}; | ||||
| %#	    	$href = $c->getlegacyurl($c,'/server-manager' . $_->{'FILENAME'}); | ||||
| % 			my $host = $c->req->url->to_abs->host; | ||||
| %	    	$href = "/smanager/legacypanel?url=https://$host/server-manager" . $_->{'FILENAME'}; | ||||
| %  | ||||
| %	    } | ||||
| 	    <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' | ||||
| 	    id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> | ||||
| %           $cc++; | ||||
| %	} | ||||
| 	</div> | ||||
| %    } | ||||
|           % if ( $_->{'FILENAME'} =~ m/^2\// ) { | ||||
|             % $target = '_self'; | ||||
|             % ( my $file2 = $_->{'FILENAME'} ) =~ s|^2/||; | ||||
|             % $href = '/smanager/' . $file2; | ||||
|           % } else { | ||||
|           % $target = 'main'; | ||||
|           %# $href = '/server-manager' . $_->{'FILENAME'}; | ||||
|           %# $href = $c->getlegacyurl($c,'/server-manager' . $_->{'FILENAME'}); | ||||
|           % my $host = $c->req->url->to_abs->host; | ||||
|           % $href = "/smanager/legacypanel?url=https://$host/server-manager" . $_->{'FILENAME'}; | ||||
|           % | ||||
|         % } | ||||
|       <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' | ||||
|         id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> | ||||
|     % $cc++; | ||||
|     % } | ||||
|   </div> | ||||
|   % } | ||||
|  | ||||
|     </div> | ||||
|     </div> | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,85 +1,85 @@ | ||||
| <div id='pf_add'> | ||||
|  | ||||
| 	% my $retref= $c->stash("ret"); | ||||
| 	% my %ret = $retref ? %$retref : (ret => ""); | ||||
| 	% my @vars = split(/,/, $ret{vars} // ''); | ||||
| 	% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars; | ||||
|   % my $retref = $c->stash("ret"); | ||||
|   % my %ret = $retref ? %$retref : ( ret => "" ); | ||||
|   % my @vars = split( /,/, $ret{vars} // '' ); | ||||
|   % my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars; | ||||
|  | ||||
| 	% if ($c->app->config->{debug}) { | ||||
| 	<pre> | ||||
|   % if ($c->app->config->{debug}) { | ||||
|     <pre> | ||||
| 		%= dumper { ret_data => \%ret } | ||||
| 	</pre>   | ||||
| 	% } | ||||
|     </pre> | ||||
|   % } | ||||
|  | ||||
| 	% if ($ret{ret} eq "") { | ||||
|   % if ($ret{ret} eq "") { | ||||
|  | ||||
| 	% } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
| 	<br> | ||||
| 	<div class='success'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } else {  | ||||
| 	<br> | ||||
| 	<div class='sme-error'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } | ||||
| 	<br /> | ||||
|     % my $btn = l('ADD'); | ||||
|      | ||||
|    % if (config->{debug} == 1) { | ||||
| 	</pre> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $c->stash("ret") | ||||
| 	</pre> | ||||
|     % } | ||||
|       | ||||
|     %= form_for '/portforwardingb' => (method => 'POST') => begin | ||||
| 		<h2> | ||||
| 		%=l "pf_CREATE_RULE" | ||||
| 		</h2> | ||||
| 			<p> | ||||
| 				%=l "pf_SUMMARY_ADD_DESC" | ||||
| 			</p><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_PROTOCOL" | ||||
| 			</span><span class=data> | ||||
| 				%=select_field  'proto'=>["TCP","UDP"] | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_SOURCE_PORT" | ||||
| 			</span><span class=data> | ||||
| 				%=text_field 'sport' | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_DESTINATION_PORT" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=text_field 'dport' | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_DESTINATION_HOST" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=text_field 'dhost' | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_ALLOW_HOSTS" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=text_field 'allow' | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_RULE_COMMENT" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=text_field 'cmmnt' | ||||
| 			</span><br><br> | ||||
| 			<p> | ||||
| 			<br> | ||||
| 			%= submit_button "$btn", class => 'action' | ||||
| 			</p> | ||||
|   % } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
|   <br> | ||||
|   <div class='success'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } else { | ||||
|   <br> | ||||
|   <div class='sme-error'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } | ||||
|   <br /> | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
| 	%end | ||||
|   % if (config->{debug} == 1) { | ||||
|   </pre> | ||||
|   %= dumper $c->current_route | ||||
|   %= dumper $c->stash("ret") | ||||
|   </pre> | ||||
| % } | ||||
|  | ||||
| </div> | ||||
| %= form_for '/portforwardingb' => ( method => 'POST' ) => begin | ||||
|   <h2> | ||||
|     %= l "pf_CREATE_RULE" | ||||
|   </h2> | ||||
|   <p> | ||||
|     %= l "pf_SUMMARY_ADD_DESC" | ||||
|   </p><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_PROTOCOL" | ||||
|   </span><span class=data> | ||||
|     %= select_field 'proto' => [ "TCP", "UDP" ] | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_SOURCE_PORT" | ||||
|   </span><span class=data> | ||||
|     %= text_field 'sport' | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_DESTINATION_PORT" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= text_field 'dport' | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_DESTINATION_HOST" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= text_field 'dhost' | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_ALLOW_HOSTS" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= text_field 'allow' | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_RULE_COMMENT" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= text_field 'cmmnt' | ||||
|   </span><br><br> | ||||
|   <p> | ||||
|     <br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,66 +1,66 @@ | ||||
| <div id='ln_del'> | ||||
|  | ||||
|     % my $btn = l('REMOVE'); | ||||
|     % my $proto = $pf_datas->{proto}; | ||||
|     % my $sport = $pf_datas->{sport}; | ||||
|     % my $dport = $pf_datas->{dport}; | ||||
|     % my $dhost = $pf_datas->{dhost}; | ||||
|     % my $cmmnt = $pf_datas->{cmmnt}; | ||||
|     % my $allow = $pf_datas->{allow}; | ||||
|      | ||||
|    % if (config->{debug} == 1) { | ||||
| 	<pre> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   % my $proto = $pf_datas->{proto}; | ||||
|   % my $sport = $pf_datas->{sport}; | ||||
|   % my $dport = $pf_datas->{dport}; | ||||
|   % my $dhost = $pf_datas->{dhost}; | ||||
|   % my $cmmnt = $pf_datas->{cmmnt}; | ||||
|   % my $allow = $pf_datas->{allow}; | ||||
|  | ||||
|   % if (config->{debug} == 1) { | ||||
|     <pre> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $c->stash("ret") | ||||
|     %= dumper %$pf_datas | ||||
| 	</pre> | ||||
|     % } | ||||
|       | ||||
|     %= form_for '/portforwardinge' => (method => 'POST') => begin | ||||
|         <br> | ||||
| 		%= l "pf_SUMMARY_REMOVE_DESC" | ||||
| 			</p><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_PROTOCOL" | ||||
| 			</span><span class=data> | ||||
| 				%=$proto | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_SOURCE_PORT" | ||||
| 			</span><span class=data> | ||||
| 				%=$sport | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_DESTINATION_HOST" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=$dport | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_LABEL_DESTINATION_PORT" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=$dhost | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_RULE_COMMENT" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=$cmmnt | ||||
| 			</span><br><br> | ||||
| 			<span class=label> | ||||
| 				%=l "pf_ALLOW_HOSTS" | ||||
| 			</span> | ||||
| 			<span class=data> | ||||
| 				%=$allow | ||||
| 			</span><br><br> | ||||
| 		%#} | ||||
| 			%= hidden_field sport=>$sport | ||||
| 			%= hidden_field proto=>$proto | ||||
| 			<br> | ||||
| 			%= submit_button "$btn", class => 'action' | ||||
| 			</p> | ||||
|     </pre> | ||||
|   % } | ||||
|  | ||||
| 	%end | ||||
|   %= form_for '/portforwardinge' => ( method => 'POST' ) => begin | ||||
|     <br> | ||||
|     %= l "pf_SUMMARY_REMOVE_DESC" | ||||
|   </p><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_PROTOCOL" | ||||
|   </span><span class=data> | ||||
|     %= $proto | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_SOURCE_PORT" | ||||
|   </span><span class=data> | ||||
|     %= $sport | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_DESTINATION_HOST" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= $dport | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_LABEL_DESTINATION_PORT" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= $dhost | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_RULE_COMMENT" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= $cmmnt | ||||
|   </span><br><br> | ||||
|   <span class=label> | ||||
|     %= l "pf_ALLOW_HOSTS" | ||||
|   </span> | ||||
|   <span class=data> | ||||
|     %= $allow | ||||
|   </span><br><br> | ||||
|   %# } | ||||
| %= hidden_field sport => $sport | ||||
| %= hidden_field proto => $proto | ||||
| <br> | ||||
| %= submit_button "$btn", class => 'action' | ||||
| </p> | ||||
|  | ||||
| </div> | ||||
| % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,116 +1,118 @@ | ||||
| <div id='pf_list'> | ||||
|     % my $btn = l('pf_CREATE_RULE'); | ||||
|     %= form_for '/portforwardinga' => (method => 'POST') => begin | ||||
|   % my $btn = l('pf_CREATE_RULE'); | ||||
|   %= form_for '/portforwardinga' => ( method => 'POST' ) => begin | ||||
|  | ||||
|     % my $numtcpforwards = @$tcpforwards; | ||||
| 	% my $numudpforwards = @$udpforwards; | ||||
|     % my $numudpforwards = @$udpforwards; | ||||
|  | ||||
| 	% my $retref= $c->stash("ret"); | ||||
| 	% my %ret = $retref ? %$retref : (ret => ""); | ||||
| 	% my @vars = split(/,/, $ret{vars} // ''); | ||||
| 	% my ($var1, $var2, $var3, $var4, $var5, $var6, $var7) = @vars; | ||||
|     % my $retref = $c->stash("ret"); | ||||
|     % my %ret = $retref ? %$retref : ( ret => "" ); | ||||
|     % my @vars = split( /,/, $ret{vars} // '' ); | ||||
|     % my ( $var1, $var2, $var3, $var4, $var5, $var6, $var7 ) = @vars; | ||||
|  | ||||
| 	% if ($c->app->config->{debug}) { | ||||
| 	<pre> | ||||
|     % if ($c->app->config->{debug}) { | ||||
|       <pre> | ||||
| 		%= dumper { ret_data => \%ret } | ||||
| 	</pre>   | ||||
| 	% } | ||||
|       </pre> | ||||
|     % } | ||||
|  | ||||
| 	% if ($ret{ret} eq "") { | ||||
| 		%=l "pf_FIRST_PAGE_DESCRIPTION" | ||||
| 	% } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
| 	<br> | ||||
| 	<div class='success'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } else {  | ||||
| 	<br> | ||||
| 	<div class='sme-error'> | ||||
| 		%= $c->render_to_string(inline => l($ret{ret}, @vars[0..6])) | ||||
| 	</div> | ||||
| 	% } | ||||
| 	<br /> | ||||
|   % if ($ret{ret} eq "") { | ||||
|     %= l "pf_FIRST_PAGE_DESCRIPTION" | ||||
|   % } elsif (index($ret{ret},"SUCCESS") != -1) { | ||||
|   <br> | ||||
|   <div class='success'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } else { | ||||
|   <br> | ||||
|   <div class='sme-error'> | ||||
|     %= $c->render_to_string( inline => l( $ret{ret}, @vars[ 0 .. 6 ] ) ) | ||||
|   </div> | ||||
|   % } | ||||
|   <br /> | ||||
|  | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
|  | ||||
|     % end    | ||||
|     | ||||
|     %	if ($empty){ | ||||
|             <br> | ||||
| 		%=l 'pf_NO_FORWARDS' | ||||
|     %	} else { | ||||
|         <br> | ||||
| 		%=l 'pf_SHOW_FORWARDS' | ||||
| 	<br><br /> | ||||
| 		<table class="sme-border TableSort"><thead> | ||||
| 		<tr> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'pf_LABEL_PROTOCOL' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'pf_LABEL_SOURCE_PORT' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'pf_LABEL_DESTINATION_HOST' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'pf_LABEL_DESTINATION_PORT' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'pf_ALLOW_HOSTS' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'pf_RULE_COMMENT' | ||||
| 			</th> | ||||
| 			<th class='sme-border'> | ||||
| 				%=l 'ACTION' | ||||
| 			</th> | ||||
| 		</tr> | ||||
| 		</thead><tbody> | ||||
| 		% my %forwards = (); | ||||
| 		% $forwards{TCP} = $tcpforwards; | ||||
| 		% $forwards{UDP} = $udpforwards; | ||||
|   % end | ||||
|  | ||||
|         % foreach my $proto (sort keys %forwards) { | ||||
|   % if ($empty){ | ||||
|     <br> | ||||
|     %= l 'pf_NO_FORWARDS' | ||||
|   % } else { | ||||
|   <br> | ||||
|   %= l 'pf_SHOW_FORWARDS' | ||||
|   <br><br /> | ||||
|   <table class="sme-border TableSort"><thead> | ||||
|       <tr> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'pf_LABEL_PROTOCOL' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'pf_LABEL_SOURCE_PORT' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'pf_LABEL_DESTINATION_HOST' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'pf_LABEL_DESTINATION_PORT' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'pf_ALLOW_HOSTS' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'pf_RULE_COMMENT' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ACTION' | ||||
|         </th> | ||||
|       </tr> | ||||
|     </thead><tbody> | ||||
|       % my %forwards = (); | ||||
|       % $forwards{TCP} = $tcpforwards; | ||||
|       % $forwards{UDP} = $udpforwards; | ||||
|  | ||||
|       % foreach my $proto (sort keys %forwards) { | ||||
|  | ||||
|         % if (@{ $forwards{$proto} }) { | ||||
|           % foreach my $entry (@{ $forwards{$proto} }) { | ||||
|             <tr> | ||||
|               % my $sport = $entry->key; | ||||
|               % my $dhost = $entry->prop('DestHost'); | ||||
|               % my $dport = $entry->prop('DestPort') || ''; | ||||
|               % my $cmmnt = $entry->prop('Comment') || ''; | ||||
|               % my $allow = $entry->prop('AllowHosts') || ''; | ||||
|               %= t td => ( class => 'sme-border' ) => $proto | ||||
|               %= t td => ( class => 'sme-border' ) => $sport | ||||
|               %= t td => ( class => 'sme-border' ) => $dhost | ||||
|               %= t td => ( class => 'sme-border' ) => $dport | ||||
|               %= t td => ( class => 'sme-border' ) => $allow | ||||
|               %= t td => ( class => 'sme-border' ) => $cmmnt | ||||
|               <td class='sme-border'> | ||||
|                 % my $remove_text = l('REMOVE'); # Localized text | ||||
|                 % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|                 % my $actionRemove = qq{ | ||||
|                   % <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto" | ||||
|                   % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|                   % title="$remove_text" aria-label="$remove_text" | ||||
|                   % style="background:white;"> | ||||
|                   % <span class="ui-icon ui-icon-delete"></span> | ||||
|                   % <span class="ui-button-text">$remove_text</span> | ||||
|                   % </a> | ||||
|               % }; | ||||
|             <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|           </td> | ||||
|         </tr> | ||||
|       % } | ||||
|     % } | ||||
|     % } | ||||
|     % } | ||||
|   </tbody> | ||||
| </table> | ||||
| %= hidden_field 'trt' => $pf_datas->{trt} | ||||
|  | ||||
|         %    if (@{ $forwards{$proto} }) { | ||||
|         %        foreach my $entry (@{ $forwards{$proto} }) { | ||||
| 			<tr> | ||||
|         %           my $sport = $entry->key; | ||||
|         %           my $dhost = $entry->prop('DestHost'); | ||||
|         %           my $dport = $entry->prop('DestPort') || ''; | ||||
|         %           my $cmmnt  = $entry->prop('Comment') || ''; | ||||
|         %           my $allow  = $entry->prop('AllowHosts') || ''; | ||||
| 		%= 			t td => (class => 'sme-border') => $proto | ||||
| 		%= 			t td => (class => 'sme-border') => $sport | ||||
| 		%= 			t td => (class => 'sme-border') => $dhost | ||||
| 		%= 			t td => (class => 'sme-border') => $dport | ||||
| 		%= 			t td => (class => 'sme-border') => $allow | ||||
| 		%= 			t td => (class => 'sme-border') => $cmmnt | ||||
| 					<td class='sme-border'> | ||||
| 						%my $remove_text = l('REMOVE');  # Localized text | ||||
| 						%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 						%my $actionRemove = qq{ | ||||
|                                                 %       <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto"> | ||||
| 						%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 						%		$remove_text | ||||
| 						%	</button> | ||||
|                                                 %       </a> | ||||
| 						%}; | ||||
| 					<%= $c->render_to_string(inline => $actionRemove) %> | ||||
| 					</td> | ||||
| 			</tr> | ||||
|          %       } | ||||
|          %   } | ||||
|         %} | ||||
| 	%} | ||||
| 	</tbody> | ||||
| 	</table> | ||||
| 	%= hidden_field 'trt' => $pf_datas->{trt} | ||||
|   | ||||
| </div> | ||||
| @@ -1,46 +1,46 @@ | ||||
| <div id='prt_add'> | ||||
|  | ||||
|     % 	my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/printers2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'prt_CREATE_NEW_PRINTER' | ||||
| 	</h2><br> | ||||
| 	%=l 'prt_CREATE_NEW_DESC' | ||||
| 	</p><br> | ||||
|   %= form_for '/printers2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'prt_CREATE_NEW_PRINTER' | ||||
|       </h2><br> | ||||
|       %= l 'prt_CREATE_NEW_DESC' | ||||
|     </p><br> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'prt_PRINTER_NAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'Name', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'prt_PRINTER_NAME', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'Name', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'DESCRIPTION_BRIEF', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'Description', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'DESCRIPTION_BRIEF', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'Description', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'LOCATION', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'Location' => $c->printerLocation_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'LOCATION', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= select_field 'Location' => $c->printerLocation_list(), class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <br><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $prt_datas->{trt} | ||||
| 	 | ||||
|     % end     | ||||
|     %= hidden_field 'trt' => $prt_datas->{trt} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,81 +1,83 @@ | ||||
| <div id='prt_list'> | ||||
|  | ||||
|  | ||||
|     % my $btn = l('prt_INITIAL_BTN'); | ||||
|   % my $btn = l('prt_INITIAL_BTN'); | ||||
|  | ||||
|     %= form_for '/printers' => (method => 'POST') => begin | ||||
|   %= form_for '/printers' => ( method => 'POST' ) => begin | ||||
|  | ||||
|         %= hidden_field 'trt' => 'ADD' | ||||
|     %= hidden_field 'trt' => 'ADD' | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|    % end     | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|   % end | ||||
|  | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'prt_CURRENT_LIST' | ||||
| 	</h2> | ||||
| 	<br><br> | ||||
|     % 	my $numPrinters = @$printerDrivers; | ||||
|     %	if ($numPrinters == 0){ | ||||
|         %=l 'prt_NO_PRINTERS' | ||||
|     %	} else { | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'NAME' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'DESCRIPTION' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'LOCATION' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'prt_REMOTE_ADDRESS' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'prt_REMOTE_NAME' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACTION' | ||||
|     	    </th> | ||||
|     	</tr> | ||||
|     	</thead><tbody> | ||||
|     %    foreach my $printer (@$printerDrivers) | ||||
|     %    { | ||||
|     %        my $address = ($printer->prop('Location') eq 'remote') | ||||
|     %        ? $printer->prop('Address') : 'N/A'; | ||||
|     %        my $remoteName = ($printer->prop('Location') eq 'remote') | ||||
|     %        ? $printer->prop('RemoteName') : 'N/A'; | ||||
|     %        $remoteName = 'raw' unless ($remoteName); | ||||
|   <p> | ||||
|     <h2> | ||||
|       %= l 'prt_CURRENT_LIST' | ||||
|     </h2> | ||||
|     <br><br> | ||||
|     % my $numPrinters = @$printerDrivers; | ||||
|     % if ($numPrinters == 0){ | ||||
|       %= l 'prt_NO_PRINTERS' | ||||
|     % } else { | ||||
|     <table class="sme-border TableSort"><thead> | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $printer->key | ||||
|             %= t td => (class => 'sme-border') => $printer->prop('Description') | ||||
|             %= t td => (class => 'sme-border') => $printer->prop('Location') | ||||
|             %= t td => (class => 'sme-border') => $address | ||||
|             %= t td => (class => 'sme-border') => $remoteName | ||||
| 			<td class='sme-border'> | ||||
| 				%my $remove_text = l('REMOVE');  # Localized text | ||||
| 				%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 				%my $printer_name = $printer->key; | ||||
| 				%my $actionRemove = qq{ | ||||
|                                 %       <a href="printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name"> | ||||
| 				%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 				%		$remove_text | ||||
| 				%	</button> | ||||
|                                 %       </a> | ||||
| 				%}; | ||||
| 			<%= $c->render_to_string(inline => $actionRemove) %> | ||||
| 			</td> | ||||
|     	</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
| 	<%} %> | ||||
| 	</p> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'NAME' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'DESCRIPTION' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'LOCATION' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'prt_REMOTE_ADDRESS' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'prt_REMOTE_NAME' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'ACTION' | ||||
|           </th> | ||||
|         </tr> | ||||
|       </thead><tbody> | ||||
|         % foreach my $printer (@$printerDrivers) | ||||
|         % { | ||||
|           % my $address = ( $printer->prop('Location') eq 'remote' ) | ||||
|           % ? $printer->prop('Address') : 'N/A'; | ||||
|           % my $remoteName = ( $printer->prop('Location') eq 'remote' ) | ||||
|           % ? $printer->prop('RemoteName') : 'N/A'; | ||||
|           % $remoteName = 'raw' unless ($remoteName); | ||||
|           <tr> | ||||
|             %= t td => ( class => 'sme-border' ) => $printer->key | ||||
|             %= t td => ( class => 'sme-border' ) => $printer->prop('Description') | ||||
|             %= t td => ( class => 'sme-border' ) => $printer->prop('Location') | ||||
|             %= t td => ( class => 'sme-border' ) => $address | ||||
|             %= t td => ( class => 'sme-border' ) => $remoteName | ||||
|             <td class='sme-border'> | ||||
|               % my $remove_text = l('REMOVE'); # Localized text | ||||
|               % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|               % my $printer_name = $printer->key; | ||||
|               % my $actionRemove = qq{ | ||||
|                 % <a href="printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name" | ||||
|                 % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|                 % title="$remove_text" aria-label="$remove_text" | ||||
|                 % style="background:white;"> | ||||
|                 % <span class="ui-icon ui-icon-delete"></span> | ||||
|                 % <span class="ui-button-text">$remove_text</span> | ||||
|                 % </a> | ||||
|             % }; | ||||
|           <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|         </td> | ||||
|       </tr> | ||||
|       % } | ||||
|     </tbody> | ||||
|   </table> | ||||
|   <% } %> | ||||
| </p> | ||||
|  | ||||
|  | ||||
| </div> | ||||
| </div> | ||||
| @@ -1,43 +1,43 @@ | ||||
| <div id='prt_net'> | ||||
|  | ||||
|     % 	my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/printers2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'prt_CREATE_NETWORK_PRINTER' | ||||
| 	</h2> | ||||
| 	 | ||||
| 	<br><br> | ||||
| 	%=l 'prt_CREATE_NETWORK_DESC' | ||||
| 	</p> | ||||
| 	 | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'prt_HOSTNAME_OR_IP', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'Address', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   %= form_for '/printers2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'prt_CREATE_NETWORK_PRINTER' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'prt_REMOTE_NAME_DESC', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'RemoteName' => 'raw', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|       <br><br> | ||||
|       %= l 'prt_CREATE_NETWORK_DESC' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'prt_HOSTNAME_OR_IP', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'Address', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $prt_datas->{trt} | ||||
| 	%= hidden_field 'Name' => $prt_datas->{name} | ||||
| 	%= hidden_field 'Description' => $prt_datas->{description} | ||||
| 	%= hidden_field 'Location' => $prt_datas->{location} | ||||
| 	 | ||||
|     % end | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'prt_REMOTE_NAME_DESC', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'RemoteName' => 'raw', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
|     <p> | ||||
|       <br><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => $prt_datas->{trt} | ||||
|     %= hidden_field 'Name' => $prt_datas->{name} | ||||
|     %= hidden_field 'Description' => $prt_datas->{description} | ||||
|     %= hidden_field 'Location' => $prt_datas->{location} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,39 +1,39 @@ | ||||
| <div id='pse_add'> | ||||
|  | ||||
|     % 	my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/pseudonyms2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'pse_TITLE_CREATE' | ||||
| 	</h2> | ||||
| 	<br> | ||||
| 	%= $c->render_to_string(inline => l('pse_VALID_PSEUDONYM_NAMES')); | ||||
| 	</p> | ||||
|   %= form_for '/pseudonyms2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'pse_TITLE_CREATE' | ||||
|       </h2> | ||||
|       <br> | ||||
|       %= $c->render_to_string( inline => l('pse_VALID_PSEUDONYM_NAMES') ); | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'pse_PSEUDONYM_NAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= text_field 'Pseudonym', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'pse_PSEUDONYM_NAME', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= text_field 'Pseudonym', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'pse_SELECT_ACCOUNT', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= select_field 'Account' => $c->existing_accounts_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'pse_SELECT_ACCOUNT', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= select_field 'Account' => $c->existing_accounts_list(), class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <br><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $pse_datas->{trt} | ||||
| 	 | ||||
|     % end     | ||||
|     %= hidden_field 'trt' => $pse_datas->{trt} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,25 +1,25 @@ | ||||
| <div id='pse_del'> | ||||
|  | ||||
|     %	my $btn = l('REMOVE'); | ||||
|     %= form_for '/pseudonyms2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'pse_REMOVE_PSEUDONYM' | ||||
| 	</h2> | ||||
|   % my $btn = l('REMOVE'); | ||||
|   %= form_for '/pseudonyms2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'pse_REMOVE_PSEUDONYM' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	%= $c->render_to_string(inline => l('pse_ABOUT_TO_REMOVE', $pse_datas->{pseudonym})); | ||||
|       <p> | ||||
|         %= $c->render_to_string( inline => l( 'pse_ABOUT_TO_REMOVE', $pse_datas->{pseudonym} ) ); | ||||
|  | ||||
| 	</p> | ||||
|       </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|       <p> | ||||
|         <br> | ||||
|         %= submit_button "$btn", class => 'action' | ||||
|       </p> | ||||
|  | ||||
|         %= hidden_field 'trt' => $pse_datas->{trt} | ||||
|         %= hidden_field 'Pseudonym' => $pse_datas->{pseudonym} | ||||
|       %= hidden_field 'trt' => $pse_datas->{trt} | ||||
|       %= hidden_field 'Pseudonym' => $pse_datas->{pseudonym} | ||||
|  | ||||
|     % end     | ||||
|     % end | ||||
|  | ||||
| </div> | ||||
|   </div> | ||||
|   | ||||
| @@ -1,96 +1,100 @@ | ||||
| <div id='pse_list'> | ||||
|  | ||||
|     % my $btn = l('pse_CLICK_TO_CREATE'); | ||||
|   % my $btn = l('pse_CLICK_TO_CREATE'); | ||||
|  | ||||
|     %= $c->render_to_string(inline => l('pse_DESCRIPTION')); | ||||
|   %= $c->render_to_string( inline => l('pse_DESCRIPTION') ); | ||||
|  | ||||
|     %= form_for '/pseudonyms' => (method => 'POST') => begin | ||||
|   %= form_for '/pseudonyms' => ( method => 'POST' ) => begin | ||||
|  | ||||
|         %= hidden_field 'trt' => 'ADD' | ||||
|     %= hidden_field 'trt' => 'ADD' | ||||
|  | ||||
| 	<p><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
| 	 | ||||
|     % end     | ||||
|     <p><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|   % end | ||||
|  | ||||
|  | ||||
| 	<p><h2> | ||||
| 	%=l 'pse_CURRENT_PSEUDONYMS' | ||||
| 	</h2><br> | ||||
|     % 	my $numPseudonyms = @$pseudonyms; | ||||
|     %	if ($numPseudonyms == 0){ | ||||
|         %=l 'pse_ACCOUNT_PSEUDONYM_NONE' | ||||
|     %	} else { | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'pse_PSEUDONYM' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'pse_USER_OR_GROUP' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACTION' | ||||
|     	    </th> | ||||
| 			<!-- <th class='sme-border' style="display: normal;"></th> --> | ||||
|    	</tr></thead> | ||||
|    	<tbody> | ||||
|  | ||||
|     %    foreach my $pseudonym ( @$pseudonyms ) | ||||
|     %    { | ||||
|     %	    my $modifiable = $pseudonym->prop('Changeable') || 'yes'; | ||||
|     %	    my $removable = $pseudonym->prop('Removable') || 'yes'; | ||||
|  | ||||
|     %       my $account = $pseudonym->prop('Account'); | ||||
|     %       $account = "Administrator" if ($account eq "admin"); | ||||
|     %	    $account = $c->l("pse_EVERYONE") if ($account eq "shared"); | ||||
|  | ||||
|     %	    my $visible = $pseudonym->prop('Visible'); | ||||
|     %	    $account .= $c->l("pse_LOCAL_ONLY") | ||||
|     %    	if (defined $visible && $visible eq "internal"); | ||||
|  | ||||
|   <p><h2> | ||||
|       %= l 'pse_CURRENT_PSEUDONYMS' | ||||
|     </h2><br> | ||||
|     % my $numPseudonyms = @$pseudonyms; | ||||
|     % if ($numPseudonyms == 0){ | ||||
|       %= l 'pse_ACCOUNT_PSEUDONYM_NONE' | ||||
|     % } else { | ||||
|     <table class="sme-border TableSort"><thead> | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $pseudonym->key | ||||
|             %= t td => (class => 'sme-border') => $account | ||||
|           <th class='sme-border'> | ||||
|             %= l 'pse_PSEUDONYM' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'pse_USER_OR_GROUP' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'ACTION' | ||||
|           </th> | ||||
|           <!-- <th class='sme-border' style="display: normal;"></th> --> | ||||
|       </tr></thead> | ||||
|       <tbody> | ||||
|  | ||||
| 			<td class='sme-border'> | ||||
| 				%my ($actionModify, $actionRemove) = ' ';  | ||||
| 				%if ($modifiable eq 'yes') {  | ||||
| 					%my $modify_text = l('MODIFY');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $pseudonyms_entry_name = $pseudonym->key;  # pseudonyms_entry name extracted from the data structure | ||||
| 					%$actionModify = qq{ | ||||
|                                         %       <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name"> | ||||
| 					%	<button type='button' class='sme-modify-button' title='$modify_text' > | ||||
| 					%		$modify_text | ||||
| 					%	</button> | ||||
|                                         %       </a> | ||||
| 					%}; | ||||
| 				%} | ||||
|         % foreach my $pseudonym (@$pseudonyms) | ||||
|         % { | ||||
|           % my $modifiable = $pseudonym->prop('Changeable') || 'yes'; | ||||
|           % my $removable = $pseudonym->prop('Removable') || 'yes'; | ||||
|  | ||||
| 				%if ($removable eq 'yes')  {  | ||||
| 					%my $remove_text = l('REMOVE');  # Localized text | ||||
| 					%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 					%my $pseudonyms_entry_name = $pseudonym->key;  # pseudonyms_entry name extracted from the data structure | ||||
| 					%$actionRemove = qq{ | ||||
|                                         %       <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name"> | ||||
| 					%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 					%		$remove_text | ||||
| 					%	</button> | ||||
|                                         %       </a> | ||||
| 					%}; | ||||
| 				%} | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %> | ||||
|           % my $account = $pseudonym->prop('Account'); | ||||
|           % $account = "Administrator" if ( $account eq "admin" ); | ||||
|           % $account = $c->l("pse_EVERYONE") if ( $account eq "shared" ); | ||||
|  | ||||
| 			</td> | ||||
| 		</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
| 	<%} %> | ||||
| 	</p> | ||||
|           % my $visible = $pseudonym->prop('Visible'); | ||||
|           % $account .= $c->l("pse_LOCAL_ONLY") | ||||
|           % if ( defined $visible && $visible eq "internal" ); | ||||
|  | ||||
|           <tr> | ||||
|             %= t td => ( class => 'sme-border' ) => $pseudonym->key | ||||
|             %= t td => ( class => 'sme-border' ) => $account | ||||
|  | ||||
|             <td class='sme-border'> | ||||
|               % my ( $actionModify, $actionRemove ) = ' '; | ||||
|               % if ($modifiable eq 'yes') { | ||||
|                 % my $modify_text = l('MODIFY'); # Localized text | ||||
|                 % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|                 % my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure | ||||
|                 % $actionModify = qq{ | ||||
|                   % <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name" | ||||
|                   % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|                   % title="$modify_text" aria-label="$modify_text" | ||||
|                   % style="background:white;"> | ||||
|                   % <span class="ui-icon ui-icon-pencil"></span> | ||||
|                   % <span class="ui-button-text">$modify_text</span> | ||||
|                   % </a> | ||||
|               % }; | ||||
|           % } | ||||
|  | ||||
|           % if ($removable eq 'yes') { | ||||
|             % my $remove_text = l('REMOVE'); # Localized text | ||||
|             % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|             % my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure | ||||
|             % $actionRemove = qq{ | ||||
|               % <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name" | ||||
|               % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|               % title="$remove_text" aria-label="$remove_text" | ||||
|               % style="background:white;"> | ||||
|               % <span class="ui-icon ui-icon-delete"></span> | ||||
|               % <span class="ui-button-text">$remove_text</span> | ||||
|               % </a> | ||||
|           % }; | ||||
|         % } | ||||
|         <%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|  | ||||
|       </td> | ||||
|     </tr> | ||||
|     % } | ||||
|   </tbody> | ||||
| </table> | ||||
| <% } %> | ||||
| </p> | ||||
|  | ||||
|  | ||||
|  | ||||
| </div> | ||||
| </div> | ||||
| @@ -1,53 +1,53 @@ | ||||
| <div id='pse_upd'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/pseudonyms2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'pse_MODIFY_PSEUDONYM' | ||||
| 	</h2> | ||||
| 	<br> | ||||
| 	%=l 'pse_DESC_PSEUDONYM_NAME' | ||||
| 	</p> | ||||
|   %= form_for '/pseudonyms2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'pse_MODIFY_PSEUDONYM' | ||||
|       </h2> | ||||
|       <br> | ||||
|       %= l 'pse_DESC_PSEUDONYM_NAME' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'pse_PSEUDONYM_NAME', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= $pse_datas->{pseudonym}, class => 'data' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'pse_PSEUDONYM_NAME', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= $pse_datas->{pseudonym}, class => 'data' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'pse_SELECT_ACCOUNT', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Account' => $pse_datas->{account} unless param 'Account'; | ||||
| 	%= select_field 'Account' => $c->existing_accounts_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'pse_SELECT_ACCOUNT', class => 'label' | ||||
|       </span><span class=data> | ||||
|         % param 'Account' => $pse_datas->{account} unless param 'Account'; | ||||
|         %= select_field 'Account' => $c->existing_accounts_list(), class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
|     %if ( $c->is_pseudonym_not_removable( $pse_datas->{pseudonym} ) ) { | ||||
|     % if ( $c->is_pseudonym_not_removable( $pse_datas->{pseudonym} ) ) { | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'pse_SELECT_INTERNAL', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Internal' => $pse_datas->{internal} unless param 'Internal'; | ||||
| 	%= select_field 'Internal' => [ [(l 'YES') => 'YES'], [(l 'NO') => 'NO'] ], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|       <p> | ||||
|         <span class=label> | ||||
|           %= l 'pse_SELECT_INTERNAL', class => 'label' | ||||
|         </span><span class=data> | ||||
|           % param 'Internal' => $pse_datas->{internal} unless param 'Internal'; | ||||
|           %= select_field 'Internal' => [ [ ( l 'YES' ) => 'YES' ], [ ( l 'NO' ) => 'NO' ] ], class => 'input'; | ||||
|         </span> | ||||
|       </p> | ||||
|  | ||||
|     %} | ||||
|      | ||||
| 	<p> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     % } | ||||
|  | ||||
| 	%= hidden_field 'trt' => $pse_datas->{trt} | ||||
|         %= hidden_field 'Pseudonym' => $pse_datas->{pseudonym} | ||||
| 	 | ||||
|     %end | ||||
|   <p> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
|   %= hidden_field 'trt' => $pse_datas->{trt} | ||||
|   %= hidden_field 'Pseudonym' => $pse_datas->{pseudonym} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,82 +1,84 @@ | ||||
| <div id='quo_list'> | ||||
|  | ||||
| 	<p> | ||||
|     %    my $modul = $c->render_to_string(inline => $c->l('quo_QUOTA_DESC')); | ||||
| 	%= $modul | ||||
| 	 | ||||
| 	<h3> | ||||
| 	%=l 'quo_CURRENT_USAGE_AND_SETTINGS' | ||||
| 	</h3> | ||||
|   <p> | ||||
|     % my $modul = $c->render_to_string( inline => $c->l('quo_QUOTA_DESC') ); | ||||
|     %= $modul | ||||
|  | ||||
| 	<br> | ||||
|     % 	my $numUsers = @$userAccounts; | ||||
|     %	if ($numUsers == 0){ | ||||
|         %=l 'ACCOUNT_USER_NONE' | ||||
|     %	} else { | ||||
|     <h3> | ||||
|       %= l 'quo_CURRENT_USAGE_AND_SETTINGS' | ||||
|     </h3> | ||||
|  | ||||
|     %    my $limit = l('quo_LIMIT_WITH_GRACE_MB'); $limit =~ s#(graceX)#<br>$1#; | ||||
|     %	 my $absolute = l('quo_ABS_LIMIT_MB');     $absolute =~ s#(limitX)#<br>$1#; | ||||
|     %    my $current = l('quo_CURRENT_USAGE');     $current =~ s#(usageX)#<br>$1#; | ||||
|     <br> | ||||
|     % my $numUsers = @$userAccounts; | ||||
|     % if ($numUsers == 0){ | ||||
|       %= l 'ACCOUNT_USER_NONE' | ||||
|     % } else { | ||||
|  | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACCOUNT' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'USER_NAME' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %= $limit | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %= $absolute | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %= $current | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACTION' | ||||
|     	    </th> | ||||
|     	</tr> | ||||
|     	</thead><tbody> | ||||
|     % my $limit = l('quo_LIMIT_WITH_GRACE_MB'); $limit =~ s#(graceX)#<br>$1#; | ||||
|     % my $absolute = l('quo_ABS_LIMIT_MB'); $absolute =~ s#(limitX)#<br>$1#; | ||||
|     % my $current = l('quo_CURRENT_USAGE'); $current =~ s#(usageX)#<br>$1#; | ||||
|  | ||||
|     %    foreach my $user (@$userAccounts) | ||||
|     %    { | ||||
|     %	    my $uid = getpwnam($user->key); | ||||
|     %       unless ($uid) { | ||||
|     %		warn($self->localise('COULD_NOT_GET_UID'),$user->key); | ||||
|     %		next; | ||||
|     %	    } | ||||
|     %	    my $name = $user->prop("FirstName")." ".$user->prop("LastName"); | ||||
|     %	    my $dev = Quota::getqcarg('/home/e-smith/files'); | ||||
|     %	    my ($bc, $bs, $bh, $bt, $ic, $is, $ih, $it) = Quota::query($dev, $uid); | ||||
|     <table class="sme-border TableSort"><thead> | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $user->key | ||||
|             %= t td => (class => 'sme-border') => $name | ||||
|             %= t td => (class => 'sme-border') => sprintf("%.2f", $bs / 1024 ) | ||||
|             %= t td => (class => 'sme-border') => sprintf("%.2f", $bh / 1024 ) | ||||
|             %= t td => (class => 'sme-border') => sprintf("%.2f", $bc / 1024 ) | ||||
| 			<td class='sme-border'> | ||||
| 				%my $modify_text = l('MODIFY');  # Localized text | ||||
| 				%my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 				%my $quota_user_name = $user->key;  # quotas_entry name extracted from the data structure | ||||
| 				%my $actionModify = qq{ | ||||
|                                 %       <a href="quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name"> | ||||
| 				%	<button type='button' class='sme-modify-button' title='$modify_text' > | ||||
| 				%		$modify_text | ||||
| 				%	</button> | ||||
|                                 %       </a> | ||||
| 				%}; | ||||
| 				<%= $c->render_to_string(inline => $actionModify) %> | ||||
| 			</td> | ||||
|     	</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
| 	<%} %> | ||||
| 	</p> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'ACCOUNT' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'USER_NAME' | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= $limit | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= $absolute | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= $current | ||||
|           </th> | ||||
|           <th class='sme-border'> | ||||
|             %= l 'ACTION' | ||||
|           </th> | ||||
|         </tr> | ||||
|       </thead><tbody> | ||||
|  | ||||
|         %= hidden_field 'trt' => $quo_datas->{trt} | ||||
|         % foreach my $user (@$userAccounts) | ||||
|         % { | ||||
|           % my $uid = getpwnam( $user->key ); | ||||
|           % unless ($uid) { | ||||
|             % warn( $self->localise('COULD_NOT_GET_UID'), $user->key ); | ||||
|             % next; | ||||
|           % } | ||||
|         % my $name = $user->prop("FirstName") . " " . $user->prop("LastName"); | ||||
|         % my $dev = Quota::getqcarg('/home/e-smith/files'); | ||||
|         % my ( $bc, $bs, $bh, $bt, $ic, $is, $ih, $it ) = Quota::query( $dev, $uid ); | ||||
|         <tr> | ||||
|           %= t td => ( class => 'sme-border' ) => $user->key | ||||
|           %= t td => ( class => 'sme-border' ) => $name | ||||
|           %= t td => ( class => 'sme-border' ) => sprintf( "%.2f", $bs / 1024 ) | ||||
|           %= t td => ( class => 'sme-border' ) => sprintf( "%.2f", $bh / 1024 ) | ||||
|           %= t td => ( class => 'sme-border' ) => sprintf( "%.2f", $bc / 1024 ) | ||||
|           <td class='sme-border'> | ||||
|             % my $modify_text = l('MODIFY'); # Localized text | ||||
|             % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|             % my $quota_user_name = $user->key; # quotas_entry name extracted from the data structure | ||||
|             % my $actionModify = qq{ | ||||
|               % <a href="quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name" | ||||
|               % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|               % title="$modify_text" aria-label="$modify_text" | ||||
|               % style="background:white;"> | ||||
|               % <span class="ui-icon ui-icon-pencil"></span> | ||||
|               % <span class="ui-button-text">$modify_text</span> | ||||
|               % </a> | ||||
|           % }; | ||||
|           <%= $c->render_to_string( inline => $actionModify ) %> | ||||
|         </td> | ||||
|       </tr> | ||||
|       % } | ||||
|     </tbody> | ||||
|   </table> | ||||
|   <% } %> | ||||
| </p> | ||||
|  | ||||
| </div> | ||||
| %= hidden_field 'trt' => $quo_datas->{trt} | ||||
|  | ||||
| </div> | ||||
| @@ -1,84 +1,84 @@ | ||||
| <div id='quo_upd'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/quota2' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'quo_MODIFY_USER_TITLE' | ||||
| 	</h2> | ||||
| 	</p> | ||||
|   %= form_for '/quota2' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'quo_MODIFY_USER_TITLE' | ||||
|       </h2> | ||||
|     </p> | ||||
|  | ||||
|     %    my $userid = $quo_datas->{user}; | ||||
|     %    my $user = $quo_datas->{userRec}; | ||||
| <!-- | ||||
|     	 for my $user @$userAccounts | ||||
|         { | ||||
|            unless ( $user->key eq $userid) { | ||||
|     		warn(l('USER_DIFFERENT'),$user->key); | ||||
|     		next; | ||||
|     	    } | ||||
| 	} | ||||
| --> | ||||
|     %	my $uid = getpwnam($user->key); | ||||
|     %    unless ($uid) { | ||||
|     %		warn(l('COULD_NOT_GET_UID'),$user->key); | ||||
|     %		next; | ||||
|     %	 } | ||||
|     % my $userid = $quo_datas->{user}; | ||||
|     % my $user = $quo_datas->{userRec}; | ||||
|     <!-- | ||||
|     for my $user @$userAccounts | ||||
|     { | ||||
|     unless ( $user->key eq $userid) { | ||||
|     warn(l('USER_DIFFERENT'),$user->key); | ||||
|     next; | ||||
|     } | ||||
|     } | ||||
|     --> | ||||
|     % my $uid = getpwnam( $user->key ); | ||||
|     % unless ($uid) { | ||||
|       % warn( l('COULD_NOT_GET_UID'), $user->key ); | ||||
|       % next; | ||||
|     % } | ||||
|  | ||||
|     %	  my $name = $user->prop("FirstName") . " " . $user->prop("LastName"); | ||||
|     %	  my $dev = Quota::getqcarg('/home/e-smith/files'); | ||||
|     %	  my ($bc, $bs, $bh, $bt, $ic, $is, $ih, $it) = Quota::query($dev, $uid); | ||||
|   % my $name = $user->prop("FirstName") . " " . $user->prop("LastName"); | ||||
|   % my $dev = Quota::getqcarg('/home/e-smith/files'); | ||||
|   % my ( $bc, $bs, $bh, $bt, $ic, $is, $ih, $it ) = Quota::query( $dev, $uid ); | ||||
|  | ||||
| 	<p> | ||||
| 	%=l 'quo_USER'  | ||||
| 	%= "$name (\"$userid\")"  | ||||
| 	%=l 'quo_CURRENTLY_HAS'  | ||||
| 	%= $ic  | ||||
|         %=l 'quo_FILES'  | ||||
| 	%=l 'quo_OCCUPYING'  | ||||
| 	%= $c->toMB($bc) | ||||
| 	%=l 'quo_MEGABYTES' | ||||
| 	</p> | ||||
| 	 | ||||
| 	<p> | ||||
| 	%=l 'quo_INSTRUCTIONS' | ||||
| 	</p> | ||||
|   <p> | ||||
|     %= l 'quo_USER' | ||||
|     %= "$name (\"$userid\")" | ||||
|     %= l 'quo_CURRENTLY_HAS' | ||||
|     %= $ic | ||||
|     %= l 'quo_FILES' | ||||
|     %= l 'quo_OCCUPYING' | ||||
|     %= $c->toMB($bc) | ||||
|     %= l 'quo_MEGABYTES' | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'quo_USER', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= $name, class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     %= l 'quo_INSTRUCTIONS' | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'quo_LIMIT_WITH_GRACE', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Soft' => $quo_datas->{softlim} unless param 'Soft'; | ||||
| 	%= text_field 'Soft', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'quo_USER', class => 'label' | ||||
|     </span><span class=data> | ||||
|       %= $name, class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'quo_ABS_LIMIT', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Hard' => $quo_datas->{hardlim} unless param 'Hard'; | ||||
| 	%= text_field 'Hard', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'quo_LIMIT_WITH_GRACE', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Soft' => $quo_datas->{softlim} unless param 'Soft'; | ||||
|       %= text_field 'Soft', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'quo_ABS_LIMIT', class => 'label' | ||||
|     </span><span class=data> | ||||
|       % param 'Hard' => $quo_datas->{hardlim} unless param 'Hard'; | ||||
|       %= text_field 'Hard', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $quo_datas->{trt} | ||||
|         %= hidden_field 'user' => $quo_datas->{user} | ||||
| 	 | ||||
|     % end     | ||||
|   <p> | ||||
|     <br><br> | ||||
|     %= submit_button "$btn", class => 'action' | ||||
|   </p> | ||||
|  | ||||
| </div> | ||||
|   %= hidden_field 'trt' => $quo_datas->{trt} | ||||
|   %= hidden_field 'user' => $quo_datas->{user} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,14 +1,14 @@ | ||||
| 	<p><h2> | ||||
| 	%=l 'rma_TITLE_PPTP' | ||||
| 	</h2><br> | ||||
| 	%=l 'rma_DESC_PPTP' | ||||
| 	<br> | ||||
| 	<span class=label> | ||||
| 	%=l 'rma_LABEL_PPTP' | ||||
| 	</span><span class=data> | ||||
| 	% param 'PptpSessions' => $c->get_pptp_sessions unless param 'PptpSessions'; | ||||
| 	%= text_field 'PptpSessions' =>  $c->get_pptp_sessions(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| <p><h2> | ||||
|     %= l 'rma_TITLE_PPTP' | ||||
|   </h2><br> | ||||
|   %= l 'rma_DESC_PPTP' | ||||
|   <br> | ||||
|   <span class=label> | ||||
|     %= l 'rma_LABEL_PPTP' | ||||
|   </span><span class=data> | ||||
|     % param 'PptpSessions' => $c->get_pptp_sessions unless param 'PptpSessions'; | ||||
|     %= text_field 'PptpSessions' => $c->get_pptp_sessions(), class => 'input' | ||||
|   </span> | ||||
| </p> | ||||
|  | ||||
| 	<!--<hr class='sectionbar' />--> | ||||
| <!--<hr class='sectionbar' />--> | ||||
|   | ||||
| @@ -1,14 +1,14 @@ | ||||
| <div id='swt_theme'> | ||||
|     <font class="sme-copyright"> | ||||
|   <font class="sme-copyright"> | ||||
|     % my $btn = l('swt_THEME'); | ||||
|     %= form_for $c->url_for('swttheme') => (method => 'POST') => begin | ||||
| 	% my $value = $c->session->{'CurrentTheme'}; | ||||
| 	% $value = session 'CurrentTheme'; | ||||
|     %= form_for $c->url_for('swttheme') => ( method => 'POST' ) => begin | ||||
|       % my $value = $c->session->{'CurrentTheme'}; | ||||
|       % $value = session 'CurrentTheme'; | ||||
|  | ||||
| 	% param 'Theme' => $value unless param 'Theme'; | ||||
| 	%= select_field 'Theme' => $c->theme_list(), class => 'input' | ||||
| 	%= hidden_field 'From' => $c->tx->req->url | ||||
| 	%= submit_button "$btn" | ||||
|     % end     | ||||
|     </font> | ||||
|       % param 'Theme' => $value unless param 'Theme'; | ||||
|       %= select_field 'Theme' => $c->theme_list(), class => 'input' | ||||
|       %= hidden_field 'From' => $c->tx->req->url | ||||
|       %= submit_button "$btn" | ||||
|     % end | ||||
|   </font> | ||||
| </div> | ||||
|   | ||||
| @@ -1,32 +1,32 @@ | ||||
| %	use SrvMngr qw( getNavigation simpleNavMerge ); | ||||
| %	my %nav1 = %{SrvMngr->getNavigation( $c->languages(), 'U' )}; | ||||
| % 	my %nav2 = %{SrvMngr->getNavigation( $c->languages(), 'A', session('username') )}; | ||||
| %	my %nav = $c->session->{is_admin} ? %nav1 : %{SrvMngr->simpleNavMerge(\%nav1, \%nav2)}; | ||||
| % use SrvMngr qw( getNavigation simpleNavMerge ); | ||||
| % my %nav1 = %{ SrvMngr->getNavigation( $c->languages(), 'U' ) }; | ||||
| % my %nav2 = %{ SrvMngr->getNavigation( $c->languages(), 'A', session('username') ) }; | ||||
| % my %nav = $c->session->{is_admin} ? %nav1 : %{ SrvMngr->simpleNavMerge( \%nav1, \%nav2 ) }; | ||||
|  | ||||
| 	<div id='usermenu'> | ||||
| 	<a href='#' id='toguser' class='section section-title'>Current User (<%= session 'username' %>)</a> | ||||
| 	<div id='menuuser'> | ||||
| %    my $cc = 300; | ||||
| %    foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'})  | ||||
| %		<=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) { | ||||
| 		<!-- div class='section'><%= $h %></div --> | ||||
| %		my ($classNew, $target, $href) = ''; | ||||
| %		foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} }  @{$nav{$h}{'DESCRIPTIONS'}}) { | ||||
| %			next if ($_->{'MENUCAT'} ne 'A' && $_->{'MENUCAT'} ne 'U' );	# menu User  | ||||
| %		    if ( $_->{'FILENAME'} =~ m/^2\// ) { | ||||
| %				$target = '_self'; | ||||
| %				(my $file2 = $_->{'FILENAME'}) =~ s|^2/||; | ||||
| %				$href = '/smanager/' . $file2; | ||||
| %		    } else { | ||||
| %				$target = 'main'; | ||||
| %				$href = '/server-manager' . $_->{'FILENAME'}; | ||||
| %		    } | ||||
| 			<div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' | ||||
| 			id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> | ||||
| %           $cc++; | ||||
| %		} | ||||
| <div id='usermenu'> | ||||
|   <a href='#' id='toguser' class='section section-title'>Current User (<%= session 'username' %>)</a> | ||||
|   <div id='menuuser'> | ||||
|     % my $cc = 300; | ||||
|     % foreach my $h (sort { ($nav{$a}{'WEIGHT'}/$nav{$a}{'COUNT'}) | ||||
|       % <=> ($nav{$b}{'WEIGHT'}/$nav{$b}{'COUNT'}) } keys %nav) { | ||||
|       <!-- div class='section'><%= $h %></div --> | ||||
|     % my ( $classNew, $target, $href ) = ''; | ||||
|     % foreach (sort { $a->{'WEIGHT'} <=> $b->{'WEIGHT'} } @{$nav{$h}{'DESCRIPTIONS'}}) { | ||||
|       % next if ( $_->{'MENUCAT'} ne 'A' && $_->{'MENUCAT'} ne 'U' ); # menu User | ||||
|       % if ( $_->{'FILENAME'} =~ m/^2\// ) { | ||||
|         % $target = '_self'; | ||||
|         % ( my $file2 = $_->{'FILENAME'} ) =~ s|^2/||; | ||||
|         % $href = '/smanager/' . $file2; | ||||
|       % } else { | ||||
|       % $target = 'main'; | ||||
|       % $href = '/server-manager' . $_->{'FILENAME'}; | ||||
|     % } | ||||
|   <div class='menu-cell'><a class='item<%= $classNew %>' target='<%= $target %>' | ||||
|     id='sme<%= $cc %>' href='<%= $href %>'><%= $_->{'DESCRIPTION'} %></a></div> | ||||
| % $cc++; | ||||
| % } | ||||
|  | ||||
| %    } | ||||
| % } | ||||
|  | ||||
|     </div> | ||||
|     </div> | ||||
| </div> | ||||
| </div> | ||||
|   | ||||
| @@ -1,28 +1,28 @@ | ||||
| <div id='usr_del'> | ||||
|  | ||||
|     % 	my $btn = l('REMOVE'); | ||||
|   % my $btn = l('REMOVE'); | ||||
|  | ||||
|     %= form_for '/useraccountsd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'usr_REMOVE_ACCOUNT_TITLE' | ||||
| 	</h2> | ||||
| 	 | ||||
| 	<br> | ||||
| 	%= $c->l('usr_REMOVE_DESC', $usr_datas->{user}, $usr_datas->{name} ); | ||||
| 	<br> | ||||
| 	%= $c->render_to_string(inline => $c->l('usr_REMOVE_DESC2')) | ||||
| 	</p> | ||||
|   %= form_for '/useraccountsd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'usr_REMOVE_ACCOUNT_TITLE' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|       <br> | ||||
|       %= $c->l( 'usr_REMOVE_DESC', $usr_datas->{user}, $usr_datas->{name} ); | ||||
|       <br> | ||||
|       %= $c->render_to_string( inline => $c->l('usr_REMOVE_DESC2') ) | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $usr_datas->{trt} | ||||
| 	%= hidden_field 'user' => $usr_datas->{user} | ||||
| 	%= hidden_field 'name' => $usr_datas->{name} | ||||
| 	 | ||||
|     % end     | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|     %= hidden_field 'user' => $usr_datas->{user} | ||||
|     %= hidden_field 'name' => $usr_datas->{name} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,158 +1,167 @@ | ||||
| <div id='usr_list'> | ||||
|  | ||||
|  | ||||
|     % my $btn = l('usr_ADD_USER'); | ||||
|   % my $btn = l('usr_ADD_USER'); | ||||
|  | ||||
|     %= form_for '/useraccounts' => (method => 'POST') => begin | ||||
|   %= form_for '/useraccounts' => ( method => 'POST' ) => begin | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     % end     | ||||
|   % end | ||||
|  | ||||
| 	<p> | ||||
| 	%= $c->render_to_string(inline => $c->l('usr_FIRSTPAGE_DESC')) | ||||
| 	<br> | ||||
| 	</p> | ||||
| 	 | ||||
|     % 	my $numUsers = @$users; | ||||
|     %	if ($numUsers == 0){ | ||||
|         %=l 'usr_NO_USER_ACCOUNTS' | ||||
|     %	} else { | ||||
| 	<table class="sme-border TableSort"><thead> | ||||
| 	<tr> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACCOUNT' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'USER_NAME' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'usr_VPN_CLIENT_ACCESS' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'usr_FORWARDING_ADDRESS' | ||||
|     	    </th> | ||||
|     	    <th class='sme-border'> | ||||
|     	    %=l 'ACTION' | ||||
|     	    </th> | ||||
|     	</tr> | ||||
|         </thead><tbody> | ||||
|     	 | ||||
|     %    foreach my $user (@$users) { | ||||
|   <p> | ||||
|     %= $c->render_to_string( inline => $c->l('usr_FIRSTPAGE_DESC') ) | ||||
|     <br> | ||||
|   </p> | ||||
|  | ||||
|     %        my $username = $user->key(); | ||||
|     %        my $first    = $user->prop('FirstName'); | ||||
|     %        my $last     = $user->prop('LastName'); | ||||
|     %        my $lockable = $user->prop('Lockable') || 'yes'; | ||||
|     %        my $removable = $user->prop('Removable') || 'yes'; | ||||
|     %        my $fwd       = (($user->prop('EmailForward') || 'local') =~ m/^forward|both$/) ? | ||||
|     %                       $user->prop('ForwardAddress') : ''; | ||||
|     %        my $vpnaccess = $user->prop('VPNClientAccess') || 'no'; | ||||
|     %        $vpnaccess = $vpnaccess eq 'yes' ? $c->l('YES') : $c->l('NO'); | ||||
|     %        my $password_set = $user->prop('PasswordSet'); | ||||
|   % my $numUsers = @$users; | ||||
|   % if ($numUsers == 0){ | ||||
|     %= l 'usr_NO_USER_ACCOUNTS' | ||||
|   % } else { | ||||
|   <table class="sme-border TableSort"><thead> | ||||
|       <tr> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ACCOUNT' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'USER_NAME' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'usr_VPN_CLIENT_ACCESS' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'usr_FORWARDING_ADDRESS' | ||||
|         </th> | ||||
|         <th class='sme-border'> | ||||
|           %= l 'ACTION' | ||||
|         </th> | ||||
|       </tr> | ||||
|     </thead><tbody> | ||||
|  | ||||
|       % foreach my $user (@$users) { | ||||
|  | ||||
|         % my $username = $user->key(); | ||||
|         % my $first = $user->prop('FirstName'); | ||||
|         % my $last = $user->prop('LastName'); | ||||
|         % my $lockable = $user->prop('Lockable') || 'yes'; | ||||
|         % my $removable = $user->prop('Removable') || 'yes'; | ||||
|         % my $fwd = (($user->prop('EmailForward') || 'local') =~ m/^forward|both$/) ? | ||||
|         % $user->prop('ForwardAddress') : ''; | ||||
|         % my $vpnaccess = $user->prop('VPNClientAccess') || 'no'; | ||||
|         % $vpnaccess = $vpnaccess eq 'yes' ? $c->l('YES') : $c->l('NO'); | ||||
|         % my $password_set = $user->prop('PasswordSet'); | ||||
|  | ||||
|         <tr> | ||||
|             %= t td => (class => 'sme-border') => $username | ||||
|             %= t td => (class => 'sme-border') => "$first  $last" | ||||
|             %= t td => (class => 'sme-border') => $vpnaccess | ||||
|             %= t td => (class => 'sme-border') => $fwd | ||||
| 			% my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = ' '; | ||||
| 			% my $modify_text = l('MODIFY');  # Localized text | ||||
| 			% my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 			% my $useraccounts_user_name = $user->key;  # useraccountss_entry name extracted from the data structure | ||||
| 			% my $password_text = l("PASSWORD_RESET"); | ||||
| 			%if ($useraccounts_user_name eq 'admin')  {  | ||||
| 				%$actionModify = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name"> | ||||
| 					%	<button type='button' class='sme-modify-button' title='$modify_text'> | ||||
| 					%		$modify_text | ||||
| 					%	</button> | ||||
| 					%</a> | ||||
| 				%};                              | ||||
| 				%$actionResetPw = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name"> | ||||
| 					%	<button type='button' class='sme-password-button' title='$password_text' > | ||||
| 					%		$password_text | ||||
| 					%	</button> | ||||
| 					%</a> | ||||
| 				%}; | ||||
| 			%} else { | ||||
| 				%$actionModify = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name"> | ||||
| 					%	<button type='button' class='sme-modify-button' title='$modify_text' > | ||||
| 					%		$modify_text | ||||
| 					%	</button> | ||||
| 					%</a> | ||||
| 				%}; | ||||
| 			%} | ||||
| 			%if ($password_set ne 'yes') { | ||||
| 				%$actionLock = l('ACCOUNT_LOCKED'); | ||||
| 				%$actionResetPw = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> | ||||
| 						%	<button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; > | ||||
| 						%		$password_text | ||||
| 						%	</button> | ||||
| 					%</a> | ||||
| 				%}; | ||||
| 			%} elsif ($useraccounts_user_name ne 'admin') { | ||||
| 				% my $lock_text = l('ACCOUNT LOCKED');  # Localized text | ||||
| 				% my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 				% my $useraccounts_user_name = $user->key;  # useraccountss_entry name extracted from the data structure | ||||
| 				%$actionLock = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name"> | ||||
| 						%	<button type='button' class='sme-lock-button' title='$lock_text' > | ||||
| 						%		$lock_text | ||||
| 						%	</button> | ||||
| 					%</a> | ||||
| 					%}; | ||||
| 				%$actionResetPw = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> | ||||
| 					%	<button type='button' class='sme-password-button' title='$password_text' > | ||||
| 					%		$password_text | ||||
| 					%	</button> | ||||
| 					%</a> | ||||
| 					%}; | ||||
| 			%} | ||||
| 			%if ( $removable eq 'yes' )  {  | ||||
| 				% my $remove_text = l('REMOVE');  # Localized text | ||||
| 				% my $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 				%$actionRemove = qq{ | ||||
| 					%<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name"> | ||||
| 					%	<button type='button' class='sme-remove-button' title='$remove_text' > | ||||
| 					%		$remove_text | ||||
| 					%	</button> | ||||
| 					%</a> | ||||
| 				%}; | ||||
| 			%} | ||||
| 			 | ||||
| 		    % my $thisdomain = $c->req->url->to_abs->host; | ||||
| 			% my $roundcube_text = l('Webmail');  # Localized text | ||||
| 			% $csrf_token = "TOKEN";  # CSRF token for security | ||||
| 			% $useraccounts_user_name = $user->key;  # useraccountss_entry name extracted from the data structure | ||||
| 			% $actionroundcube = qq{ | ||||
| 				%<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px"> | ||||
| 				%	<button type='button' class='sme-email-button' title='$roundcube_text' > | ||||
| 				%		$roundcube_text | ||||
| 				%	</button> | ||||
| 				%</a> | ||||
| 			%}; | ||||
| 			<td class='sme-border' style="min-width:35em"> | ||||
| 					<%= $c->render_to_string(inline => $actionModify) %> | ||||
| 					<%= $c->render_to_string(inline => $actionResetPw) %> | ||||
| 					<%= $c->render_to_string(inline => $actionLock) %> | ||||
| 					<%= $c->render_to_string(inline => $actionRemove) %> | ||||
| 					<%= $c->render_to_string(inline => $actionroundcube) %> | ||||
| 			</td> | ||||
|     	</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
|           %= t td => ( class => 'sme-border' ) => $username | ||||
|           %= t td => ( class => 'sme-border' ) => "$first $last" | ||||
|           %= t td => ( class => 'sme-border' ) => $vpnaccess | ||||
|           %= t td => ( class => 'sme-border' ) => $fwd | ||||
|           % my ( $actionModify, $actionLock, $actionResetPw, $actionRemove, $actionroundcube ) = ' '; | ||||
|           % my $modify_text = l('MODIFY'); # Localized text | ||||
|           % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|           % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure | ||||
|           % my $password_text = l("PASSWORD_RESET"); | ||||
|           % if ($useraccounts_user_name eq 'admin') { | ||||
|             % $actionModify = qq{ | ||||
|               % <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name" | ||||
|               % class="sme-modify-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|               % title="$modify_text" aria-label="$modify_text"> | ||||
|               % <span class="ui-icon ui-icon-pencil"></span> | ||||
|               % <span class="ui-button-text">$modify_text</span> | ||||
|               % </a> | ||||
|           % }; | ||||
|         % $actionResetPw = qq{ | ||||
|           % <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name" | ||||
|           % class="sme-password-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|           % title="$password_text" aria-label="$password_text"> | ||||
|           % <span class="ui-icon ui-icon-refresh"></span> | ||||
|           % <span class="ui-button-text">$password_text</span> | ||||
|           % </a> | ||||
|       % }; | ||||
|     % } else { | ||||
|     % $actionModify = qq{ | ||||
|       % <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name" | ||||
|       % class="sme-modify-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|       % title="$modify_text" aria-label="$modify_text"> | ||||
|       % <span class="ui-icon ui-icon-pencil"></span> | ||||
|       % <span class="ui-button-text">$modify_text</span> | ||||
|       % </a> | ||||
|   % }; | ||||
|   % } | ||||
|   % if ($password_set ne 'yes') { | ||||
|     % $actionLock = l('ACCOUNT_LOCKED'); | ||||
|     % $actionResetPw = qq{ | ||||
|       % <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name" | ||||
|       % class="sme-password-button unset ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|       % title="$password_text" aria-label="$password_text" | ||||
|       % style="background:pink;"> | ||||
|       % <span class="ui-icon ui-icon-refresh"></span> | ||||
|       % <span class="ui-button-text">$password_text</span> | ||||
|       % </a> | ||||
|   % }; | ||||
| % } elsif ($useraccounts_user_name ne 'admin') { | ||||
| % my $lock_text = l('LOCK_ACCOUNT'); # Localized text | ||||
| % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
| % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure | ||||
| % $actionLock = qq{ | ||||
|   % <a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name" | ||||
|   % class="sme-lock-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|   % title="$lock_text" aria-label="$lock_text"> | ||||
|   % <span class="ui-icon ui-icon-locked"></span> | ||||
|   % <span class="ui-button-text">$lock_text</span> | ||||
|   % </a> | ||||
| % }; | ||||
| % $actionResetPw = qq{ | ||||
|   % <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name" | ||||
|   % class="sme-password-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|   % title="$password_text" aria-label="$password_text"> | ||||
|   % <span class="ui-icon ui-icon-refresh"></span> | ||||
|   % <span class="ui-button-text">$password_text</span> | ||||
|   % </a> | ||||
| % }; | ||||
| % } | ||||
| % if ( $removable eq 'yes' ) { | ||||
|   % my $remove_text = l('REMOVE'); # Localized text | ||||
|   % my $csrf_token = "TOKEN"; # CSRF token for security | ||||
|   % $actionRemove = qq{ | ||||
|     % <a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name" | ||||
|     % class="sme-remove-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|     % title="$remove_text" aria-label="$remove_text"> | ||||
|     % <span class="ui-icon ui-icon-trash"></span> | ||||
|     % <span class="ui-button-text">$remove_text</span> | ||||
|     % </a> | ||||
|   % }; | ||||
| % } | ||||
|  | ||||
| 	<%} %> | ||||
| % my $thisdomain = $c->req->url->to_abs->host; | ||||
| % my $roundcube_text = l('Webmail'); # Localized text | ||||
| % $csrf_token = "TOKEN"; # CSRF token for security | ||||
| % $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure | ||||
| % $actionroundcube = qq{ | ||||
|   % <a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px" | ||||
|   % class="sme-email-button ui-button ui-corner-all ui-widget ui-button-icon-only" | ||||
|   % title="$roundcube_text" aria-label="$roundcube_text"> | ||||
|   % <span class="ui-icon ui-icon-mail-closed"></span> | ||||
|   % <span class="ui-button-text">$roundcube_text</span> | ||||
|   % </a> | ||||
| % }; | ||||
| <td class='sme-border' style="min-width:35em"> | ||||
|   <%= $c->render_to_string( inline => $actionModify ) %> | ||||
|   <%= $c->render_to_string( inline => $actionResetPw ) %> | ||||
|   <%= $c->render_to_string( inline => $actionLock ) %> | ||||
|   <%= $c->render_to_string( inline => $actionRemove ) %> | ||||
|   <%= $c->render_to_string( inline => $actionroundcube ) %> | ||||
| </td> | ||||
| </tr> | ||||
| % } | ||||
| </tbody> | ||||
| </table> | ||||
|  | ||||
|         %= hidden_field 'trt' => $usr_datas->{trt} | ||||
| <% } %> | ||||
|  | ||||
| </div> | ||||
| %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|  | ||||
| </div> | ||||
| @@ -1,28 +1,28 @@ | ||||
| <div id='usr_lock'> | ||||
|  | ||||
|     % 	my $btn = l('usr_LOCK'); | ||||
|   % my $btn = l('usr_LOCK'); | ||||
|  | ||||
|     %= form_for '/useraccountsd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'usr_LOCK_ACCOUNT_TITLE' | ||||
| 	</h2> | ||||
| 	 | ||||
| 	<br> | ||||
| 	%= $c->l('usr_LOCK_DESC', $usr_datas->{user}, $usr_datas->{name} ); | ||||
| 	<br> | ||||
| 	%= $c->render_to_string(inline => $c->l('usr_LOCK_DESC2')) | ||||
| 	</p> | ||||
|   %= form_for '/useraccountsd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'usr_LOCK_ACCOUNT_TITLE' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|       <br> | ||||
|       %= $c->l( 'usr_LOCK_DESC', $usr_datas->{user}, $usr_datas->{name} ); | ||||
|       <br> | ||||
|       %= $c->render_to_string( inline => $c->l('usr_LOCK_DESC2') ) | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $usr_datas->{trt} | ||||
| 	%= hidden_field 'user' => $usr_datas->{user} | ||||
| 	%= hidden_field 'name' => $usr_datas->{name} | ||||
| 	 | ||||
|     % end     | ||||
|     <p> | ||||
|       <br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|     %= hidden_field 'user' => $usr_datas->{user} | ||||
|     %= hidden_field 'name' => $usr_datas->{name} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,44 +1,52 @@ | ||||
| <div id='usr_pwd'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/useraccountsd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'RESET_PASSWORD_TITLE' | ||||
| 	</h2> | ||||
| 	 | ||||
| 	<br> | ||||
| 	%= $c->l('usr_RESET_DESC', $usr_datas->{user}, $usr_datas->{name} ); | ||||
| 	<br> | ||||
| 	%= l 'usr_RESET_DESC2' | ||||
| 	</p> | ||||
|   %= form_for '/useraccountsd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'RESET_PASSWORD_TITLE' | ||||
|       </h2> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'PASSWORD_NEW', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'newPass', class => 'input', class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|       <br> | ||||
|       %= $c->l( 'usr_RESET_DESC', $usr_datas->{user}, $usr_datas->{name} ); | ||||
|       <br> | ||||
|       %= l 'usr_RESET_DESC2' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'PASSWORD_VERIFY_NEW', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'newPassVerify', class => 'input', class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       % my $strength = uc( $usr_datas->{passwdstrength} ); | ||||
|       <%= $c->render_to_string( inline => l( 'usr_' . $strength . '_PASSWORD_DESCRIPTION', $usr_datas->{passwdlength} ) ); %> | ||||
|       <br /><br /> | ||||
|       <%= $c->render_to_string( inline => l('usr_PASSWORD_WIKI') ) %> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $usr_datas->{trt} | ||||
| 	%= hidden_field 'user' => $usr_datas->{user} | ||||
| 	%= hidden_field 'name' => $usr_datas->{name} | ||||
| 	 | ||||
|     % end     | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'PASSWORD_NEW', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'newPass', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| </div> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'PASSWORD_VERIFY_NEW', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'newPassVerify', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
|     <p> | ||||
|       <br><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|     %= hidden_field 'user' => $usr_datas->{user} | ||||
|     %= hidden_field 'name' => $usr_datas->{name} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,45 +1,53 @@ | ||||
| <div id='usr_pwds'> | ||||
|  | ||||
|     % 	my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/useraccountsd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	%= l 'usr_SYSTEM_PASSWORD_DESCRIPTION' | ||||
| 	</p> | ||||
|   %= form_for '/useraccountsd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       %= l 'usr_SYSTEM_PASSWORD_DESCRIPTION' | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_CURRENT_SYSTEM_PASSWORD', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'CurPass', class => 'input', class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       % my $strength = uc( $usr_datas->{passwdstrength} ); | ||||
|       <%= $c->render_to_string( inline => l( 'usr_' . $strength . '_PASSWORD_DESCRIPTION', $usr_datas->{passwdlength} ) ); %> | ||||
|       <br /><br /> | ||||
|       <%= $c->render_to_string( inline => l('usr_PASSWORD_WIKI') ) %> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_NEW_SYSTEM_PASSWORD', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'Pass', class => 'input', class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_NEW_SYSTEM_PASSWORD_VERIFY', class => 'label' | ||||
| 	</span><span class=data> | ||||
| 	%= password_field 'PassVerify', class => 'input', class=>'sme-password' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_CURRENT_SYSTEM_PASSWORD', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'CurPass', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_NEW_SYSTEM_PASSWORD', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'Pass', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $usr_datas->{trt} | ||||
| 	%= hidden_field 'user' => $usr_datas->{user} | ||||
| 	%= hidden_field 'name' => $usr_datas->{name} | ||||
| 	 | ||||
|     % end | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_NEW_SYSTEM_PASSWORD_VERIFY', class => 'label' | ||||
|       </span><span class=data> | ||||
|         %= password_field 'PassVerify', class => 'input', class => 'sme-password' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| </div> | ||||
|     <p> | ||||
|       <br><br> | ||||
|       %= submit_button "$btn", class => 'action' | ||||
|     </p> | ||||
|  | ||||
|     %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|     %= hidden_field 'user' => $usr_datas->{user} | ||||
|     %= hidden_field 'name' => $usr_datas->{name} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,185 +1,185 @@ | ||||
| <div id='usr_upd'> | ||||
|  | ||||
|  | ||||
| 	% my $btn = l('ADD'); | ||||
|   % my $btn = l('ADD'); | ||||
|  | ||||
|     %= form_for '/useraccountsd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'usr_P2_TITLE' | ||||
| 	</h2> | ||||
| 	<br> | ||||
| 	%= $c->render_to_string(inline => l ('usr_CREATE_MODIFY_DESC')) | ||||
| 	</p> | ||||
|   %= form_for '/useraccountsd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'usr_P2_TITLE' | ||||
|       </h2> | ||||
|       <br> | ||||
|       %= $c->render_to_string( inline => l('usr_CREATE_MODIFY_DESC') ) | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_ACCOUNT_NAME' | ||||
| 	</span><span class=data> | ||||
| 	% if ( $usr_datas->{trt} eq 'ADD' ) { | ||||
| 	    % param 'user' => $usr_datas->{user} unless param 'user'; | ||||
| 	    %= text_field 'user', class => 'input' | ||||
| 	% } else { | ||||
| 	    % $btn = l('SAVE'); | ||||
| 	    %= $usr_datas->{user}, class => 'data' | ||||
| 	% } | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_ACCOUNT_NAME' | ||||
|       </span><span class=data> | ||||
|         % if ( $usr_datas->{trt} eq 'ADD' ) { | ||||
|           % param 'user' => $usr_datas->{user} unless param 'user'; | ||||
|           %= text_field 'user', class => 'input' | ||||
|         % } else { | ||||
|         % $btn = l('SAVE'); | ||||
|         %= $usr_datas->{user}, class => 'data' | ||||
|       % } | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_FIRSTNAME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName'; | ||||
| 	%= text_field 'FirstName', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_LASTNAME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'LastName' => $usr_datas->{lastname} unless param 'LastName'; | ||||
| 	%= text_field 'LastName', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_FIRSTNAME' | ||||
|     </span><span class=data> | ||||
|       % param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName'; | ||||
|       %= text_field 'FirstName', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_LASTNAME' | ||||
|     </span><span class=data> | ||||
|       % param 'LastName' => $usr_datas->{lastname} unless param 'LastName'; | ||||
|       %= text_field 'LastName', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_DEPARTMENT' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Dept' => $usr_datas->{dept} unless param 'Dept'; | ||||
| 	%= text_field 'Dept', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_COMPANY' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Company' => $usr_datas->{company} unless param 'Company'; | ||||
| 	%= text_field 'Company', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_STREET_ADDRESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Street' => $usr_datas->{street} unless param 'Street'; | ||||
| 	%= text_field 'Street', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_CITY' | ||||
| 	</span><span class=data> | ||||
| 	% param 'City' => $usr_datas->{city} unless param 'City'; | ||||
| 	%= text_field 'City', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_PHONE_NUMBER' | ||||
| 	</span><span class=data> | ||||
| 	% param 'Phone' => $usr_datas->{phone} unless param 'Phone'; | ||||
| 	%= text_field 'Phone', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_EMAIL_DELIVERY' | ||||
| 	</span><span class=data> | ||||
| 	% param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward'; | ||||
| 	%= select_field 'EmailForward' => $c->emailForward_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_FORWARDING_ADDRESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress'; | ||||
| 	%= text_field 'ForwardAddress', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_DEPARTMENT' | ||||
|     </span><span class=data> | ||||
|       % param 'Dept' => $usr_datas->{dept} unless param 'Dept'; | ||||
|       %= text_field 'Dept', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_COMPANY' | ||||
|     </span><span class=data> | ||||
|       % param 'Company' => $usr_datas->{company} unless param 'Company'; | ||||
|       %= text_field 'Company', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_STREET_ADDRESS' | ||||
|     </span><span class=data> | ||||
|       % param 'Street' => $usr_datas->{street} unless param 'Street'; | ||||
|       %= text_field 'Street', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_CITY' | ||||
|     </span><span class=data> | ||||
|       % param 'City' => $usr_datas->{city} unless param 'City'; | ||||
|       %= text_field 'City', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_PHONE_NUMBER' | ||||
|     </span><span class=data> | ||||
|       % param 'Phone' => $usr_datas->{phone} unless param 'Phone'; | ||||
|       %= text_field 'Phone', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_EMAIL_DELIVERY' | ||||
|     </span><span class=data> | ||||
|       % param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward'; | ||||
|       %= select_field 'EmailForward' => $c->emailForward_list(), class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_FORWARDING_ADDRESS' | ||||
|     </span><span class=data> | ||||
|       % param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress'; | ||||
|       %= text_field 'ForwardAddress', class => 'input' | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_VPN_CLIENT_ACCESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess'; | ||||
| 	%= select_field 'VPNClientAccess' => [[ (l 'NO') => 'no'], [ (l 'YES') => 'yes']], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|   <p> | ||||
|     <span class=label> | ||||
|       %= l 'usr_VPN_CLIENT_ACCESS' | ||||
|     </span><span class=data> | ||||
|       % param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess'; | ||||
|       %= select_field 'VPNClientAccess' => [ [ ( l 'NO' ) => 'no' ], [ ( l 'YES' ) => 'yes' ] ], class => 'input'; | ||||
|     </span> | ||||
|   </p> | ||||
|  | ||||
|     %	if (  $usr_datas->{trt} eq 'UPD' and $c->ipsec_for_acct eq 'OK' ) { | ||||
|     %	my $btn2 = $c->l('DOWNLOAD'); | ||||
| 	%= form_for '/useraccountso' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_LABEL_IPSECRW_DOWNLOAD' | ||||
| 	</span><span class=data> | ||||
| 	%= submit_button $btn2, class => 'action' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	%= hidden_field 'trt' => 'CRT' | ||||
|         %= hidden_field 'user' => $usr_datas->{user} | ||||
| 	%end | ||||
|     %	} | ||||
|  | ||||
|     %	my @groups = @{$c->get_groups()}; | ||||
|     %	if ( @groups ) { | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_GROUP_MEMBERSHIPS' | ||||
| 	</span> | ||||
| 	<span class=data> | ||||
| 	<table class="sme-border "><thead> | ||||
| 	<tr><th class='sme-border'> | ||||
|     	    %=l 'usr_MEMBER' | ||||
|     	    </th><th class='sme-border'> | ||||
|     	    %=l 'GROUP' | ||||
|     	    </th><th class='sme-border'> | ||||
|     	    %=l 'DESCRIPTION' | ||||
|     	</th></tr> | ||||
|     	</thead><tbody> | ||||
|     	 | ||||
|     %    foreach my $g ( @groups) { | ||||
|     %	     my $user = $usr_datas->{user}; | ||||
|     %        my $groupname 	= $g->key(); | ||||
|     %        my $description	= $g->prop('Description'); | ||||
|     %        my $checked = ''; | ||||
|     %        if ( $user and $c->is_user_in_group($user, $groupname) ) { | ||||
|     %            $checked = 'checked'; | ||||
|     %        } | ||||
|         <tr> | ||||
|  | ||||
| 	    <td> | ||||
| 	    % if ( $checked eq 'checked' ) { | ||||
| 		<!-- % = check_box 'groupMemberships', value => $groupname, checked => $checked --> | ||||
| 		<input type='checkbox' name='groupMemberships' checked value='<%= $groupname %>'> | ||||
| 	    %} else { | ||||
| 		%= check_box 'groupMemberships' => $groupname | ||||
| 	    %} | ||||
| 	    </td> | ||||
|             <!-- t td => (class => 'sme-border') => (check_box ' groupMemberships' => $groupname  $checked) --> | ||||
|             %= t td => (class => 'sme-border') => $groupname | ||||
|             %= t td => (class => 'sme-border') => "$description" | ||||
|     	</tr> | ||||
|     %    } | ||||
|     	</tbody> | ||||
|     	</table> | ||||
|     	</span> | ||||
| 	</p> | ||||
|     %	} | ||||
|  | ||||
| 	<p> | ||||
| 	<br><br> | ||||
| 	%= submit_button $btn, class => 'action' | ||||
| 	</p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $usr_datas->{trt} | ||||
| 	% if ( $usr_datas->{trt} eq 'UPD' ) { | ||||
|     	    %= hidden_field 'user' => $usr_datas->{user} | ||||
| 	% } | ||||
| 	 | ||||
|   % if ( $usr_datas->{trt} eq 'UPD' and $c->ipsec_for_acct eq 'OK' ) { | ||||
|     % my $btn2 = $c->l('DOWNLOAD'); | ||||
|     %= form_for '/useraccountso' => ( method => 'POST' ) => begin | ||||
|       <p> | ||||
|         <span class=label> | ||||
|           %= l 'usr_LABEL_IPSECRW_DOWNLOAD' | ||||
|         </span><span class=data> | ||||
|           %= submit_button $btn2, class => 'action' | ||||
|         </span> | ||||
|       </p> | ||||
|       %= hidden_field 'trt' => 'CRT' | ||||
|       %= hidden_field 'user' => $usr_datas->{user} | ||||
|     % end | ||||
|   % } | ||||
|  | ||||
|   % my @groups = @{ $c->get_groups() }; | ||||
|   % if ( @groups ) { | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_GROUP_MEMBERSHIPS' | ||||
|       </span> | ||||
|       <span class=data> | ||||
|         <table class="sme-border "><thead> | ||||
|             <tr><th class='sme-border'> | ||||
|                 %= l 'usr_MEMBER' | ||||
|               </th><th class='sme-border'> | ||||
|                 %= l 'GROUP' | ||||
|               </th><th class='sme-border'> | ||||
|                 %= l 'DESCRIPTION' | ||||
|             </th></tr> | ||||
|           </thead><tbody> | ||||
|  | ||||
|             % foreach my $g ( @groups) { | ||||
|               % my $user = $usr_datas->{user}; | ||||
|               % my $groupname = $g->key(); | ||||
|               % my $description = $g->prop('Description'); | ||||
|               % my $checked = ''; | ||||
|               % if ( $user and $c->is_user_in_group($user, $groupname) ) { | ||||
|                 % $checked = 'checked'; | ||||
|               % } | ||||
|             <tr> | ||||
|  | ||||
|               <td> | ||||
|                 % if ( $checked eq 'checked' ) { | ||||
|                   <!-- % = check_box 'groupMemberships', value => $groupname, checked => $checked --> | ||||
|                   <input type='checkbox' name='groupMemberships' checked value='<%= $groupname %>'> | ||||
|                 % } else { | ||||
|                 %= check_box 'groupMemberships' => $groupname | ||||
|               % } | ||||
|             </td> | ||||
|             <!-- t td => (class => 'sme-border') => (check_box ' groupMemberships' => $groupname  $checked) --> | ||||
|             %= t td => ( class => 'sme-border' ) => $groupname | ||||
|             %= t td => ( class => 'sme-border' ) => "$description" | ||||
|           </tr> | ||||
|           % } | ||||
|         </tbody> | ||||
|       </table> | ||||
|     </span> | ||||
|   </p> | ||||
|   % } | ||||
|  | ||||
|   <p> | ||||
|     <br><br> | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   </p> | ||||
|  | ||||
|   %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|   % if ( $usr_datas->{trt} eq 'UPD' ) { | ||||
|     %= hidden_field 'user' => $usr_datas->{user} | ||||
|   % } | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,89 +1,89 @@ | ||||
| <div id='usr_upds'> | ||||
|  | ||||
| 	% my $btn = l('SAVE'); | ||||
|   % my $btn = l('SAVE'); | ||||
|  | ||||
|     %= form_for '/useraccountsd' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<h2> | ||||
| 	%=l 'usr_MODIFY_ADMIN_TITLE' | ||||
| 	</h2><br> | ||||
| 	</p> | ||||
|   %= form_for '/useraccountsd' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       <h2> | ||||
|         %= l 'usr_MODIFY_ADMIN_TITLE' | ||||
|       </h2><br> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_ACCOUNT_NAME' | ||||
| 	</span><span class=data> | ||||
| 	% $btn = l('SAVE'); | ||||
| 	%= $usr_datas->{user}, class => 'data' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_ACCOUNT_NAME' | ||||
|       </span><span class=data> | ||||
|         % $btn = l('SAVE'); | ||||
|         %= $usr_datas->{user}, class => 'data' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_FIRSTNAME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName'; | ||||
| 	%= text_field 'FirstName', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_LASTNAME' | ||||
| 	</span><span class=data> | ||||
| 	% param 'LastName' => $usr_datas->{lastname} unless param 'LastName'; | ||||
| 	%= text_field 'LastName', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_FIRSTNAME' | ||||
|       </span><span class=data> | ||||
|         % param 'FirstName' => $usr_datas->{firstname} unless param 'FirstName'; | ||||
|         %= text_field 'FirstName', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_LASTNAME' | ||||
|       </span><span class=data> | ||||
|         % param 'LastName' => $usr_datas->{lastname} unless param 'LastName'; | ||||
|         %= text_field 'LastName', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_EMAIL_DELIVERY' | ||||
| 	</span><span class=data> | ||||
| 	% param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward'; | ||||
| 	%= select_field 'EmailForward' => $c->emailForward_list(), class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_FORWARDING_ADDRESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress'; | ||||
| 	%= text_field 'ForwardAddress', class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_EMAIL_DELIVERY' | ||||
|       </span><span class=data> | ||||
|         % param 'EmailForward' => $usr_datas->{emailforward} unless param 'EmailForward'; | ||||
|         %= select_field 'EmailForward' => $c->emailForward_list(), class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_FORWARDING_ADDRESS' | ||||
|       </span><span class=data> | ||||
|         % param 'ForwardAddress' => $usr_datas->{forwardaddress} unless param 'ForwardAddress'; | ||||
|         %= text_field 'ForwardAddress', class => 'input' | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_VPN_CLIENT_ACCESS' | ||||
| 	</span><span class=data> | ||||
| 	% param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess'; | ||||
| 	%= select_field 'VPNClientAccess' => [[ (l 'NO') => 'no'], [ (l 'YES') => 'yes']], class => 'input' | ||||
| 	</span> | ||||
| 	</p> | ||||
|     <p> | ||||
|       <span class=label> | ||||
|         %= l 'usr_VPN_CLIENT_ACCESS' | ||||
|       </span><span class=data> | ||||
|         % param 'VPNClientAccess' => $usr_datas->{vpnclientaccess} unless param 'VPNClientAccess'; | ||||
|         %= select_field 'VPNClientAccess' => [ [ ( l 'NO' ) => 'no' ], [ ( l 'YES' ) => 'yes' ] ], class => 'input'; | ||||
|       </span> | ||||
|     </p> | ||||
|  | ||||
|     %	if ( $c->ipsec_for_acct eq 'OK' ) { | ||||
|     %	my $btn2 = $c->l('DOWNLOAD'); | ||||
| 	%= form_for '/useraccountso' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	<span class=label> | ||||
| 	%=l 'usr_LABEL_IPSECRW_DOWNLOAD' | ||||
| 	</span><span class=data> | ||||
| 	%= submit_button $btn2, class => 'action' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	%= hidden_field 'trt' => 'CRT' | ||||
|     % if ( $c->ipsec_for_acct eq 'OK' ) { | ||||
|       % my $btn2 = $c->l('DOWNLOAD'); | ||||
|       %= form_for '/useraccountso' => ( method => 'POST' ) => begin | ||||
|         <p> | ||||
|           <span class=label> | ||||
|             %= l 'usr_LABEL_IPSECRW_DOWNLOAD' | ||||
|           </span><span class=data> | ||||
|             %= submit_button $btn2, class => 'action' | ||||
|           </span> | ||||
|         </p> | ||||
|         %= hidden_field 'trt' => 'CRT' | ||||
|         %= hidden_field 'user' => $usr_datas->{user} | ||||
| 	%end | ||||
|     %	} | ||||
|       % end | ||||
|     % } | ||||
|  | ||||
| 	<p> | ||||
| 	<br> | ||||
| 	%= submit_button $btn, class => 'action' | ||||
| 	</p> | ||||
|   <p> | ||||
|     <br> | ||||
|     %= submit_button $btn, class => 'action' | ||||
|   </p> | ||||
|  | ||||
| 	%= hidden_field 'trt' => $usr_datas->{trt} | ||||
|     	%= hidden_field 'user' => $usr_datas->{user} | ||||
| 	 | ||||
|     % end | ||||
|   %= hidden_field 'trt' => $usr_datas->{trt} | ||||
|   %= hidden_field 'user' => $usr_datas->{user} | ||||
|  | ||||
|   % end | ||||
|  | ||||
| </div> | ||||
|   | ||||
| @@ -1,32 +1,32 @@ | ||||
| % layout 'default', title => "Sme server 2 - Port Forwards"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module portforwarding-panel'> | ||||
|   <div id='module' class='module portforwarding-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 		%= dumper "<pf>".$c->current_route | ||||
| 		%= dumper $c->stash("ret") | ||||
| 		%= dumper $c->stash("portforwarding") | ||||
| 		%  my $ref = $pf_datas->{portforwarding}; | ||||
| 		%= dumper $ref->{TCP}->[0]."</pf>" | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper "<pf>" . $c->current_route | ||||
|           %= dumper $c->stash("ret") | ||||
|           %= dumper $c->stash("portforwarding") | ||||
|           % my $ref = $pf_datas->{portforwarding}; | ||||
|           %= dumper $ref->{TCP}->[0] . "</pf>" | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     <h1><%= $title%></h1> | ||||
|      %= $modul | ||||
|  | ||||
|     % if ($pf_datas->{trt} eq 'ADD') { | ||||
| 		%= include 'partials/_pf_add' | ||||
|     %} elsif ($pf_datas->{trt} eq 'ADD1') { | ||||
| 	    %= include 'partials/_pf_add' | ||||
|     %} elsif ($pf_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_pf_del' | ||||
| 	%} elsif ($pf_datas->{trt} eq 'DEL1'){ | ||||
| 		%= include 'partials/_pf_list' | ||||
| 	%} else { | ||||
| 		%= include 'partials/_pf_list' | ||||
| 	%} | ||||
|   <h1><%= $title %></h1> | ||||
|   %= $modul | ||||
|  | ||||
|   % if ($pf_datas->{trt} eq 'ADD') { | ||||
|     %= include 'partials/_pf_add' | ||||
|   % } elsif ($pf_datas->{trt} eq 'ADD1') { | ||||
|   %= include 'partials/_pf_add' | ||||
|   % } elsif ($pf_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_pf_del' | ||||
|   % } elsif ($pf_datas->{trt} eq 'DEL1'){ | ||||
|   %= include 'partials/_pf_list' | ||||
|   % } else { | ||||
|   %= include 'partials/_pf_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,32 +1,32 @@ | ||||
| % layout 'default', title => "Sme server 2 - printers"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module printers-panel'> | ||||
|   <div id='module' class='module printers-panel'> | ||||
|  | ||||
|     %if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $prt_datas | ||||
| 	</p> | ||||
|     %} | ||||
|     % if (config->{debug} == 1) { | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $prt_datas | ||||
|       </p> | ||||
|     % } | ||||
|  | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
| 			%= $c->render_to_string(inline => stash 'error')  | ||||
| 		</div> | ||||
|     %} | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|     % if ($prt_datas->{trt} eq 'ADD') { | ||||
| 	%= include 'partials/_prt_add' | ||||
|     %} elsif ($prt_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_prt_del' | ||||
| 	%} elsif ($prt_datas->{trt} eq 'NET') { | ||||
| 		%= include 'partials/_prt_net' | ||||
| 	    %} else { | ||||
| 		%= include 'partials/_prt_list' | ||||
| 	    %} | ||||
|   % if ($prt_datas->{trt} eq 'ADD') { | ||||
|     %= include 'partials/_prt_add' | ||||
|   % } elsif ($prt_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_prt_del' | ||||
|   % } elsif ($prt_datas->{trt} eq 'NET') { | ||||
|   %= include 'partials/_prt_net' | ||||
|   % } else { | ||||
|   %= include 'partials/_prt_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,43 +1,43 @@ | ||||
| % layout 'default', title => "Sme server 2 - proxy"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module proxy-panel'> | ||||
|     %if (config->{debug} == 1) { | ||||
| 	<p>(DBG)route: <%= $c->current_route %><br> | ||||
| 	(DBG)ht stat: <%= $prx_datas->{http_proxy_status}%> <br> | ||||
| 	(DBG)sm stat: <%=$prx_datas->{smtp_proxy_status} %> | ||||
| 	</p> | ||||
|     %} | ||||
|     <h1><%= $title %></h1> | ||||
|     <br> | ||||
|     <%= $modul %> | ||||
|     <% 	my $btn = l('SAVE'); %> | ||||
|   <div id='module' class='module proxy-panel'> | ||||
|     % if (config->{debug} == 1) { | ||||
|       <p>(DBG)route: <%= $c->current_route %><br> | ||||
|         (DBG)ht stat: <%= $prx_datas->{http_proxy_status} %> <br> | ||||
|         (DBG)sm stat: <%= $prx_datas->{smtp_proxy_status} %> | ||||
|       </p> | ||||
|     % } | ||||
|   <h1><%= $title %></h1> | ||||
|   <br> | ||||
|   <%= $modul %> | ||||
|   <% my $btn = l('SAVE'); %> | ||||
|  | ||||
|     %= form_for 'proxy' => (method => 'POST') => begin | ||||
| 	<p> | ||||
| 	%=l 'prx_HTTP_PROXY_STATUS_DESCRIPTION' | ||||
| 	<br><br> | ||||
| 	<span class=label> | ||||
| 	%=l 'prx_HTTP_PROXY_STATUS_LABEL' | ||||
| 	</span><span class=data> | ||||
| 	% param 'http_proxy_status' => $prx_datas->{http_proxy_status} unless param 'http_proxy_status'; | ||||
| 	%= select_field 'http_proxy_status' =>  [[ (l 'ENABLED') => 'enabled'], [ (l 'DISABLED') => 'disabled']], class => 'input', id => 'htproxstat' | ||||
| 	</span> | ||||
| 	</p> | ||||
| 	%if ( $prx_datas->{smtp_proxy_status} ) { | ||||
| 	    <p> | ||||
| 	    %=l 'prx_SMTP_PROXY_STATUS_DESCRIPTION' | ||||
| 	    <br><br> | ||||
| 	    <span class=label> | ||||
| 	    %=l 'prx_SMTP_PROXY_STATUS_LABEL' | ||||
| 	    </span><span class=data> | ||||
| 	    % param 'smtp_proxy_status' => $prx_datas->{smtp_proxy_status} unless param 'smtp_proxy_status'; | ||||
| 	    %= select_field 'smtp_proxy_status' => [[ (l 'ENABLED') => 'transparent'], [ (l 'DISABLED') => 'disabled'], [ (l 'prx_BLOCKED') => 'blocked']], class => 'input', id => 'smproxstat', default => $prx_datas->{smtp_proxy_status} | ||||
| 	    <br><br> | ||||
| 	    </span> | ||||
| 	    </p> | ||||
| 	%} | ||||
| 	%= submit_button "$btn", class => 'action' | ||||
|     % end | ||||
|   %= form_for 'proxy' => ( method => 'POST' ) => begin | ||||
|     <p> | ||||
|       %= l 'prx_HTTP_PROXY_STATUS_DESCRIPTION' | ||||
|       <br><br> | ||||
|       <span class=label> | ||||
|         %= l 'prx_HTTP_PROXY_STATUS_LABEL' | ||||
|       </span><span class=data> | ||||
|         % param 'http_proxy_status' => $prx_datas->{http_proxy_status} unless param 'http_proxy_status'; | ||||
|         %= select_field 'http_proxy_status' => [ [ ( l 'ENABLED' ) => 'enabled' ], [ ( l 'DISABLED' ) => 'disabled' ] ], class => 'input', id => 'htproxstat'; | ||||
|       </span> | ||||
|     </p> | ||||
|     % if ( $prx_datas->{smtp_proxy_status} ) { | ||||
|       <p> | ||||
|         %= l 'prx_SMTP_PROXY_STATUS_DESCRIPTION' | ||||
|         <br><br> | ||||
|         <span class=label> | ||||
|           %= l 'prx_SMTP_PROXY_STATUS_LABEL' | ||||
|         </span><span class=data> | ||||
|           % param 'smtp_proxy_status' => $prx_datas->{smtp_proxy_status} unless param 'smtp_proxy_status'; | ||||
|           %= select_field 'smtp_proxy_status' => [ [ ( l 'ENABLED' ) => 'transparent' ], [ ( l 'DISABLED' ) => 'disabled' ], [ ( l 'prx_BLOCKED' ) => 'blocked' ] ], class => 'input', id => 'smproxstat', default => $prx_datas->{smtp_proxy_status}; | ||||
|           <br><br> | ||||
|         </span> | ||||
|       </p> | ||||
|     % } | ||||
|   %= submit_button "$btn", class => 'action' | ||||
|   % end | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
| @@ -1,32 +1,32 @@ | ||||
| % layout 'default', title => "Sme server 2 - pseudonyms"; | ||||
|  | ||||
| % content_for 'module' => begin | ||||
| <div id='module' class='module pseudonyms-panel'> | ||||
|   <div id='module' class='module pseudonyms-panel'> | ||||
|  | ||||
|     % if (config->{debug} == 1) { | ||||
| 	<p> | ||||
| 	%= dumper $c->current_route | ||||
| 	%= dumper $pse_datas | ||||
| 	</p> | ||||
|       <p> | ||||
|         %= dumper $c->current_route | ||||
|         %= dumper $pse_datas | ||||
|       </p> | ||||
|     % } | ||||
|      | ||||
|     % if ( stash 'error' ) { | ||||
|     	<br><div class=sme-error> | ||||
|     	%= $c->render_to_string(inline => stash 'error')  | ||||
| 	</div> | ||||
|     %} | ||||
|  | ||||
|     <h1><%= $title%></h1> | ||||
|   % if ( stash 'error' ) { | ||||
|     <br><div class=sme-error> | ||||
|       %= $c->render_to_string( inline => stash 'error' ) | ||||
|     </div> | ||||
|   % } | ||||
|  | ||||
|     % if ($pse_datas->{trt} eq 'ADD') { | ||||
| 	%= include 'partials/_pse_add' | ||||
|     %} elsif ($pse_datas->{trt} eq 'DEL') { | ||||
| 	    %= include 'partials/_pse_del' | ||||
| 	%} elsif ($pse_datas->{trt} eq 'UPD') { | ||||
| 		%= include 'partials/_pse_upd' | ||||
| 	    %} else { | ||||
| 		%= include 'partials/_pse_list' | ||||
| 	    %} | ||||
|   <h1><%= $title %></h1> | ||||
|  | ||||
|   % if ($pse_datas->{trt} eq 'ADD') { | ||||
|     %= include 'partials/_pse_add' | ||||
|   % } elsif ($pse_datas->{trt} eq 'DEL') { | ||||
|   %= include 'partials/_pse_del' | ||||
|   % } elsif ($pse_datas->{trt} eq 'UPD') { | ||||
|   %= include 'partials/_pse_upd' | ||||
|   % } else { | ||||
|   %= include 'partials/_pse_list' | ||||
|   % } | ||||
|  | ||||
| </div> | ||||
| %end | ||||
| % end | ||||
|   | ||||
Some files were not shown because too many files have changed in this diff Show More
		Reference in New Issue
	
	Block a user