* Mon Aug 11 2025 Brian Read <brianr@koozali.org> 11.0.0-113.sme

- Re-factor all template files to make them nicely formatted  [SME: 13103]
This commit is contained in:
2025-08-12 06:20:31 +01:00
parent 6475521528
commit 74c9beb587
114 changed files with 5301 additions and 5274 deletions

View File

@@ -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>

View File

@@ -1,123 +1,123 @@
<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 = '&nbsp;';
%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">
% <button type='button' class='sme-modify-button' title='$modify_text' >
% $modify_text
% </button>
% </a>
% };
% my $removable = ( $domain->{Removable} || 'yes' );
% my $actionRemove = '&nbsp;';
% 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>
% }
<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
</div>
</div>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,72 +1,72 @@
<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">
% <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>
</div>

View File

@@ -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>

View File

@@ -1,12 +1,12 @@
<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>
</div>
<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>
</div>

View File

@@ -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>

View File

@@ -1,84 +1,84 @@
<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) = '&nbsp;';
%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>
% }
<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 ) = '&nbsp;';
% 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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,111 +1,111 @@
<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) = '&nbsp;';
%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 ) = '&nbsp;';
% 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 ($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">
% <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
% 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>
<% } %>
</div>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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 ) { %>
<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>
<% } %>
</div>
</h5></div>
<% } %>
</div>

View File

@@ -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

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,97 +1,97 @@
<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 = '&nbsp;';
%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}
%}
</div>
<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 = '&nbsp;';
% 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}
% }
</div>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,116 +1,116 @@
<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;
% 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>
% 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">
% <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>

View File

@@ -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>

View File

@@ -1,81 +1,81 @@
<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">
% <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>
</div>

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,95 +1,95 @@
<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) = '&nbsp;';
%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 ) = '&nbsp;';
% 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>
% };
% }
% 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 ) %>
</td>
</tr>
% }
</tbody>
</table>
<% } %>
</p>

View File

@@ -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>

View File

@@ -1,82 +1,82 @@
<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">
% <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>
%= hidden_field 'trt' => $quo_datas->{trt}
</div>

View File

@@ -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>

View File

@@ -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' />-->

View File

@@ -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>

View File

@@ -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>

View File

@@ -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>

View File

@@ -1,158 +1,158 @@
<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) = '&nbsp;';
% 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 ) = '&nbsp;';
% 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>
%= hidden_field 'trt' => $usr_datas->{trt}
<% } %>
%= hidden_field 'trt' => $usr_datas->{trt}
</div>

View File

@@ -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>

View File

@@ -1,52 +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>
<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')) %>
%= 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>
<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 'PASSWORD_NEW', class => 'label'
</span><span class=data>
%= password_field 'newPass', class => 'input', class=>'sme-password'
</span>
</p>
<p>
<span class=label>
%= l 'PASSWORD_NEW', class => 'label'
</span><span class=data>
%= password_field 'newPass', class => 'input', class => 'sme-password'
</span>
</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>
<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>
<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
%= hidden_field 'trt' => $usr_datas->{trt}
%= hidden_field 'user' => $usr_datas->{user}
%= hidden_field 'name' => $usr_datas->{name}
</div>
% end
</div>

View File

@@ -1,53 +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>
<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')) %>
%= form_for '/useraccountsd' => ( method => 'POST' ) => begin
<p>
%= l 'usr_SYSTEM_PASSWORD_DESCRIPTION'
</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_CURRENT_SYSTEM_PASSWORD', class => 'label'
</span><span class=data>
%= password_field 'CurPass', 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>
<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', 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_NEW_SYSTEM_PASSWORD_VERIFY', class => 'label'
</span><span class=data>
%= password_field 'PassVerify', class => 'input', class => 'sme-password'
</span>
</p>
<p>
<br><br>
%= submit_button "$btn", class => 'action'
</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
%= hidden_field 'trt' => $usr_datas->{trt}
%= hidden_field 'user' => $usr_datas->{user}
%= hidden_field 'name' => $usr_datas->{name}
</div>
% end
</div>

View File

@@ -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>

View File

@@ -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>