Compare commits

...

5 Commits

Author SHA1 Message Date
d720304f1a delete test file 2025-09-16 18:55:08 +02:00
371a05379f Test for sync 2025-09-16 18:52:26 +02:00
7cb9591eb8 * Mon Sep 15 2025 Brian Read <brianr@koozali.org> 11.0.0-116.sme
- Fix other buttons in lists for elinks [SME: 13113]
2025-09-15 11:11:20 +01:00
a0524a7484 * Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-115.sme
- Fix login and logout and user table buttons so that they are valid html and work for elinks [SME: 13113]
2025-09-14 11:31:59 +01:00
687e763684 * Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-114.sme
- edit intial screen to suppress reconfig message unless admin logged in  [SME: 13112]
2025-09-13 15:53:19 +01:00
13 changed files with 376 additions and 326 deletions

View File

@@ -51,72 +51,76 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure % my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
% my $actionModify = qq{ % my $actionModify = qq{
% <a href="domains2?CsrfDef=$csrf_token&trt=UPD&Domain=$domain_name"> % <a href="domains2?CsrfDef=$csrf_token&trt=UPD&Domain=$domain_name"
% <button type='button' class='sme-modify-button' title='$modify_text' > % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-pencil"></span>
% }; % <span class="ui-button-text">$modify_text</span>
% my $removable = ( $domain->{Removable} || 'yes' ); % </a>
% 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"> % my $removable = ( $domain->{Removable} || 'yes' );
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> % my $actionRemove = '&nbsp;';
</td> % if ($removable eq 'yes') {
</tr> % my $remove_text = l('REMOVE'); # Localized text
% } % my $csrf_token = "TOKEN"; # CSRF token for security
% my $domain_name = $domain->{Domain}; # Domain name extracted from the data structure
% $actionRemove = qq{
% <a href="domains2?CsrfDef=$csrf_token&trt=DEL&Domain=$domain_name"
% class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$remove_text" aria-label="$remove_text"
% style="background:white;">
% <span class="ui-icon ui-icon-delete"></span>
% <span class="ui-button-text">$remove_text</span>
% </a>
% };
%# $actionRemove = "<a href='domains2?CsrfDef=TOKEN&trt=DEL&Domain=" . $domain->{Domain} . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>";
% };
<td class='sme-border' style="min-width:15em">
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
</tbody> </tbody>
</table> </table>
%= hidden_field 'trt' => 'ADD' %= hidden_field 'trt' => 'ADD'
%= form_for '/domains' => ( method => 'POST' ) => begin %= form_for '/domains' => ( method => 'POST' ) => begin
<!-- <HR class="sectionbar">--> <!-- <HR class="sectionbar">-->
<br> <br>
% my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS'); % my $btn2 = l('dom_DOMAINS_PAGE_CORPORATE_DNS');
<h3> <h3>
%= l 'dom_DESC_CORPORATE_DNS_CURRENT' %= l 'dom_DESC_CORPORATE_DNS_CURRENT'
</h3> </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> <p>
%= submit_button "$btn2", class => 'action' <span class=label>
%= l 'dom_LABEL_CORPORATE_DNS_PRIMARY'
</span><span class=data>
%= $dom_datas->{forwarder}
</span>
</p> </p>
%= hidden_field 'trt' => 'UP2'
% end % 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

View File

@@ -43,30 +43,34 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $group_name = $group->key; # group name extracted from the data structure % my $group_name = $group->key; # group name extracted from the data structure
% my $actionModify = qq{ % my $actionModify = qq{
% <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name"> % <a href="groups2?CsrfDef=$csrf_token&trt=UPD&group=$group_name"
% <button type='button' class='sme-modify-button' title='$modify_text' > % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-pencil"></span>
% }; % <span class="ui-button-text">$modify_text</span>
% 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> % </a>
% }; % };
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> % my $remove_text = l('REMOVE'); # Localized text
</td> % my $csrf_token = "TOKEN"; # CSRF token for security
</tr> % my $group_name = $group->key; # group name extracted from the data structure
% } % my $actionRemove = qq{
</tbody> % <a href="groups2?CsrfDef=$csrf_token&trt=DEL&group=$group_name"
</table> % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
<% } %> % title="$remove_text" aria-label="$remove_text"
</p> % style="background:white;">
% <span class="ui-icon ui-icon-delete"></span>
% <span class="ui-button-text">$remove_text</span>
% </a>
% };
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
</tbody>
</table>
<% } %>
</p>
</div> </div>

View File

@@ -2,9 +2,10 @@
<div id="header2" class="hd2 module gradient-panel"> <div id="header2" class="hd2 module gradient-panel">
<img src="images/KoozaliServerManager.png" alt="Koozali Logo" class="logo" > <img src="images/KoozaliServerManager.png" alt="Koozali Logo" class="logo" >
% if ( not defined $c->session->{username} ) { % if ( not defined $c->session->{username} ) {
<button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="login">Login</a></button> <a class="login-button no-visited-state" target="_parent" href="/smanager/login">Login</a>
% } else { % } else {
<button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="logout">Logout <%= $c->session->{username} %></a></button> <!--><button type='button' class="login-button"><a class = "no-visited-state" target="_parent" href="/smanager/logout">Logout <%= $c->session->{username} %></a></button>-->
<a class="login-button no-visited-state" target="_parent" href="/smanager/logout">Logout <%= $c->session->{username} %></a>
% } % }
<div id="flag-container" class = "flag-style"> <div id="flag-container" class = "flag-style">
<!-- The flag icon will be inserted here --> <!-- The flag icon will be inserted here -->

View File

@@ -57,28 +57,32 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure % my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
% $actionModify = qq{ % $actionModify = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name"> % <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name"
% <button type='button' class='sme-modify-button' title='$modify_text' > % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-pencil"></span>
% }; % <span class="ui-button-text">$modify_text</span>
% 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> % </a>
% }; % };
% } % my $remove_text = l('REMOVE'); # Localized text
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %> % $csrf_token = "TOKEN"; # CSRF token for security
</td> %# my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
</tr> % $actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name"
% class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$remove_text" aria-label="$remove_text"
% style="background:white;">
% <span class="ui-icon ui-icon-delete"></span>
% <span class="ui-button-text">$remove_text</span>
% </a>
% };
% } % }
</tbody> <%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</table> </td>
</tr>
% } % }
</tbody>
</table>
% }
</div> </div>

View File

@@ -53,59 +53,65 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure % my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
% $actionModify = qq{ % $actionModify = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=UPD&ibay=$ibays_entry_name"> % <a href="ibaysd?CsrfDef=$csrf_token&trt=UPD&ibay=$ibays_entry_name"
% <button type='button' class='sme-modify-button' title='$modify_text' > % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-pencil"></span>
% }; % <span class="ui-button-text">$modify_text</span>
% } % </a>
% };
% }
% if ($passwordable eq 'yes') { % if ($passwordable eq 'yes') {
% my $password_text = l('PASSWORD_RESET'); # Localized text % my $password_text = l('PASSWORD_RESET'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure % my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
% if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) { % if ($ibay->prop('PasswordSet') ne 'yes' && $needPassword) {
% $actionResetPw = qq{ % $actionResetPw = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name"> % <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; > % <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
% $password_text % $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> % </button>
% </a> % </a>
% }; % };
% } % } else {
<%= $c->render_to_string( inline => $actionModify ) %> % $actionResetPw = qq{
<%= $c->render_to_string( inline => $actionResetPw ) %> % <a href="ibaysd?CsrfDef=$csrf_token&trt=PWD&ibay=$ibays_entry_name"
<%= $c->render_to_string( inline => $actionRemove ) %> % class="sme-password-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
</td> % title="$password_text" aria-label="$password_text"
</tr> % style="background:white;">
% <span class="ui-icon ui-icon-refresh"></span>
% <span class="ui-button-text">$password_text</span>
% </a>
% };
% } % }
</tbody>
</table> % }
<% } %>
% if ($removable eq 'yes') {
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $ibays_entry_name = $ibay->key; # ibays_entry name extracted from the data structure
% $actionRemove = qq{
% <a href="ibaysd?CsrfDef=$csrf_token&trt=DEL&ibay=$ibays_entry_name"
% class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$remove_text" aria-label="$remove_text"
% style="background:white;">
% <span class="ui-icon ui-icon-delete"></span>
% <span class="ui-button-text">$remove_text</span>
% </a>
% };
% }
<%= $c->render_to_string( inline => $actionModify ) %>
<%= $c->render_to_string( inline => $actionResetPw ) %>
<%= $c->render_to_string( inline => $actionRemove ) %>
</td>
</tr>
% }
</tbody>
</table>
<% } %>
</div> </div>

View File

@@ -4,7 +4,7 @@
<div class="sme-error module"><h5> <div class="sme-error module"><h5>
Warning: you have not yet changed the default system password.</h5></div> Warning: you have not yet changed the default system password.</h5></div>
<% } %> <% } %>
<% if ( $c->is_unsafe ) { %> <% if ( $c->is_unsafe && $c->is_logged_in && $c->is_admin) { %>
<div class="sme-error module"><h5> <div class="sme-error module"><h5>
Warning: a reconfigure and reboot is required before proceeding! Failure to do so now Warning: a reconfigure and reboot is required before proceeding! Failure to do so now
may leave your system in an unknown state!</h5></div> may leave your system in an unknown state!</h5></div>

View File

@@ -80,18 +80,20 @@
% my $local_network_entry = $localnetwork->key; % my $local_network_entry = $localnetwork->key;
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% $actionRemove = qq{ % $actionRemove = qq{
% <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry"> % <a href="localnetworksd?CsrfDef=$csrf_token&trt=DEL&localnetwork=$local_network_entry"
% <button type='button' class='sme-remove-button' title='$remove_text' > % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $remove_text % title="$remove_text" aria-label="$remove_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-delete"></span>
% }; % <span class="ui-button-text">$remove_text</span>
% } % </a>
<td class='sme-border'><%= $c->render_to_string( inline => $actionRemove ) %></td> % };
</tr>
% } % }
</tbody> <td class='sme-border'><%= $c->render_to_string( inline => $actionRemove ) %></td>
</table> </tr>
%= hidden_field 'trt' => $ln_datas->{trt} % }
% } </tbody>
</table>
%= hidden_field 'trt' => $ln_datas->{trt}
% }
</div> </div>

View File

@@ -96,21 +96,23 @@
% my $remove_text = l('REMOVE'); # Localized text % my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $actionRemove = qq{ % my $actionRemove = qq{
% <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto"> % <a href="portforwardingd?CsrfDef=$csrf_token&trt=DEL&sport=$sport&proto=$proto"
% <button type='button' class='sme-remove-button' title='$remove_text' > % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $remove_text % title="$remove_text" aria-label="$remove_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-delete"></span>
% }; % <span class="ui-button-text">$remove_text</span>
<%= $c->render_to_string( inline => $actionRemove ) %> % </a>
</td> % };
</tr> <%= $c->render_to_string( inline => $actionRemove ) %>
% } </td>
</tr>
% } % }
% } % }
% } % }
</tbody> % }
</table> </tbody>
%= hidden_field 'trt' => $pf_datas->{trt} </table>
%= hidden_field 'trt' => $pf_datas->{trt}
</div> </div>

View File

@@ -62,20 +62,22 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $printer_name = $printer->key; % my $printer_name = $printer->key;
% my $actionRemove = qq{ % my $actionRemove = qq{
% <a href="printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name"> % <a href="printers2?CsrfDef=$csrf_token&trt=DEL&&printer=$printer_name"
% <button type='button' class='sme-remove-button' title='$remove_text' > % class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $remove_text % title="$remove_text" aria-label="$remove_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-delete"></span>
% }; % <span class="ui-button-text">$remove_text</span>
<%= $c->render_to_string( inline => $actionRemove ) %> % </a>
</td> % };
</tr> <%= $c->render_to_string( inline => $actionRemove ) %>
% } </td>
</tbody> </tr>
</table> % }
<% } %> </tbody>
</p> </table>
<% } %>
</p>
</div> </div>

View File

@@ -61,35 +61,39 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure % my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
% $actionModify = qq{ % $actionModify = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name"> % <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name"
% <button type='button' class='sme-modify-button' title='$modify_text' > % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-pencil"></span>
% }; % <span class="ui-button-text">$modify_text</span>
% }
% 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> % </a>
% }; % };
% } % }
<%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td> % if ($removable eq 'yes') {
</tr> % my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
% $actionRemove = qq{
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name"
% class="sme-remove-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$remove_text" aria-label="$remove_text"
% style="background:white;">
% <span class="ui-icon ui-icon-delete"></span>
% <span class="ui-button-text">$remove_text</span>
% </a>
% };
% } % }
</tbody> <%= $c->render_to_string( inline => $actionModify ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</table>
<% } %> </td>
</p> </tr>
% }
</tbody>
</table>
<% } %>
</p>

View File

@@ -62,21 +62,23 @@
% my $csrf_token = "TOKEN"; # CSRF token for security % my $csrf_token = "TOKEN"; # CSRF token for security
% my $quota_user_name = $user->key; # quotas_entry name extracted from the data structure % my $quota_user_name = $user->key; # quotas_entry name extracted from the data structure
% my $actionModify = qq{ % my $actionModify = qq{
% <a href="quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name"> % <a href="quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name"
% <button type='button' class='sme-modify-button' title='$modify_text' > % class="sme-modify-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text"
% </button> % style="background:white;">
% </a> % <span class="ui-icon ui-icon-pencil"></span>
% }; % <span class="ui-button-text">$modify_text</span>
<%= $c->render_to_string( inline => $actionModify ) %> % </a>
</td> % };
</tr> <%= $c->render_to_string( inline => $actionModify ) %>
% } </td>
</tbody> </tr>
</table> % }
<% } %> </tbody>
</p> </table>
<% } %>
</p>
%= hidden_field 'trt' => $quo_datas->{trt} %= hidden_field 'trt' => $quo_datas->{trt}
</div> </div>

View File

@@ -66,93 +66,102 @@
% my $password_text = l("PASSWORD_RESET"); % my $password_text = l("PASSWORD_RESET");
% if ($useraccounts_user_name eq 'admin') { % if ($useraccounts_user_name eq 'admin') {
% $actionModify = qq{ % $actionModify = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name"> % <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name"
% <button type='button' class='sme-modify-button' title='$modify_text'> % class="sme-modify-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $modify_text % title="$modify_text" aria-label="$modify_text">
% </button> % <span class="ui-icon ui-icon-pencil"></span>
% </a> % <span class="ui-button-text">$modify_text</span>
% };
% $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> % </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{ % $actionResetPw = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> % <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name"
% <button type='button' class='sme-password-button' title='$password_text' > % class="sme-password-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $password_text % title="$password_text" aria-label="$password_text">
% </button> % <span class="ui-icon ui-icon-refresh"></span>
% </a> % <span class="ui-button-text">$password_text</span>
% }; % </a>
% } % };
% if ( $removable eq 'yes' ) { % } else {
% my $remove_text = l('REMOVE'); # Localized text % $actionModify = qq{
% my $csrf_token = "TOKEN"; # CSRF token for security % <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name"
% $actionRemove = qq{ % class="sme-modify-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name"> % title="$modify_text" aria-label="$modify_text">
% <button type='button' class='sme-remove-button' title='$remove_text' > % <span class="ui-icon ui-icon-pencil"></span>
% $remove_text % <span class="ui-button-text">$modify_text</span>
% </button> % </a>
% </a> % };
% }; % }
% } % if ($password_set ne 'yes') {
% $actionLock = l('ACCOUNT_LOCKED');
% $actionResetPw = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"
% class="sme-password-button unset ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$password_text" aria-label="$password_text"
% style="background:pink;">
% <span class="ui-icon ui-icon-refresh"></span>
% <span class="ui-button-text">$password_text</span>
% </a>
% };
% } elsif ($useraccounts_user_name ne 'admin') {
% my $lock_text = l('LOCK_ACCOUNT'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
% $actionLock = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name"
% class="sme-lock-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$lock_text" aria-label="$lock_text">
% <span class="ui-icon ui-icon-locked"></span>
% <span class="ui-button-text">$lock_text</span>
% </a>
% };
% $actionResetPw = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"
% class="sme-password-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$password_text" aria-label="$password_text">
% <span class="ui-icon ui-icon-refresh"></span>
% <span class="ui-button-text">$password_text</span>
% </a>
% };
% }
% if ( $removable eq 'yes' ) {
% my $remove_text = l('REMOVE'); # Localized text
% my $csrf_token = "TOKEN"; # CSRF token for security
% $actionRemove = qq{
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name"
% class="sme-remove-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% title="$remove_text" aria-label="$remove_text">
% <span class="ui-icon ui-icon-trash"></span>
% <span class="ui-button-text">$remove_text</span>
% </a>
% };
% }
% my $thisdomain = $c->req->url->to_abs->host; % my $thisdomain = $c->req->url->to_abs->host;
% my $roundcube_text = l('Webmail'); # Localized text % my $roundcube_text = l('Webmail'); # Localized text
% $csrf_token = "TOKEN"; # CSRF token for security % $csrf_token = "TOKEN"; # CSRF token for security
% $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure % $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
% $actionroundcube = qq{ % $actionroundcube = qq{
% <a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px"> % <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' > % class="sme-email-button ui-button ui-corner-all ui-widget ui-button-icon-only"
% $roundcube_text % title="$roundcube_text" aria-label="$roundcube_text">
% </button> % <span class="ui-icon ui-icon-mail-closed"></span>
% </a> % <span class="ui-button-text">$roundcube_text</span>
% }; % </a>
<td class='sme-border' style="min-width:35em"> % };
<%= $c->render_to_string( inline => $actionModify ) %> <td class='sme-border' style="min-width:35em">
<%= $c->render_to_string( inline => $actionResetPw ) %> <%= $c->render_to_string( inline => $actionModify ) %>
<%= $c->render_to_string( inline => $actionLock ) %> <%= $c->render_to_string( inline => $actionResetPw ) %>
<%= $c->render_to_string( inline => $actionRemove ) %> <%= $c->render_to_string( inline => $actionLock ) %>
<%= $c->render_to_string( inline => $actionroundcube ) %> <%= $c->render_to_string( inline => $actionRemove ) %>
</td> <%= $c->render_to_string( inline => $actionroundcube ) %>
</tr> </td>
% } </tr>
</tbody> % }
</table> </tbody>
</table>
<% } %> <% } %>
%= hidden_field 'trt' => $usr_datas->{trt} %= hidden_field 'trt' => $usr_datas->{trt}
</div> </div>

View File

@@ -2,7 +2,7 @@ Summary: Sme Server Configuration : Manager 2
%define name smeserver-manager %define name smeserver-manager
Name: %{name} Name: %{name}
%define version 11.0.0 %define version 11.0.0
%define release 113 %define release 116
Version: %{version} Version: %{version}
Release: %{release}%{?dist} Release: %{release}%{?dist}
License: GPL License: GPL
@@ -35,6 +35,7 @@ Requires: perl(Mojolicious::Plugin::CSRFDefender) >= 0.0.8
Requires: perl(Net::Netmask) >= 1.9 Requires: perl(Net::Netmask) >= 1.9
Requires: perl(DBM::Deep) >= 2.0011-1 Requires: perl(DBM::Deep) >= 2.0011-1
Requires: perl(Mojo::JWT) >= 0.08-1 Requires: perl(Mojo::JWT) >= 0.08-1
#Requires: perl(IPS:Run) >= 0.99-1 - needed for enahnced qmailanalog run of pflogsumm
#Requires: perl(Time::TAI64) >= 2.11 #Requires: perl(Time::TAI64) >= 2.11
Requires: perl(Data::Validate::IP) Requires: perl(Data::Validate::IP)
Requires: mutt >= 1.5.21 Requires: mutt >= 1.5.21
@@ -146,6 +147,15 @@ true
%defattr(-,root,root) %defattr(-,root,root)
%changelog %changelog
* Mon Sep 15 2025 Brian Read <brianr@koozali.org> 11.0.0-116.sme
- Fix other buttons in lists for elinks [SME: 13113]
* Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-115.sme
- Fix login and logout and user table buttons so that they are valid html and work for elinks [SME: 13113]
* Sat Sep 13 2025 Brian Read <brianr@koozali.org> 11.0.0-114.sme
- edit intial screen to suppress reconfig message unless admin logged in [SME: 13112]
* Mon Aug 11 2025 Brian Read <brianr@koozali.org> 11.0.0-113.sme * 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] - Re-factor all template files to make them nicely formatted [SME: 13103]