Hosts done and a few tweaks

This commit is contained in:
John Crisp 2025-05-18 22:58:06 +02:00
parent 9d8b704b56
commit 266d8b279c
8 changed files with 282 additions and 286 deletions

View File

@ -4,14 +4,15 @@
<form action="/smanager/groups2" method="POST"> <form action="/smanager/groups2" method="POST">
<br> <br>
<div> <div class="row g-3 align-items-center">
<button type="submit" class="btn btn-primary"><%= $btn %> </button> <div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %> </button>
</div> </div>
<%= hidden_field 'trt' => 'ADD' %> <%= hidden_field 'trt' => 'ADD' %>
</form> </form>
<br> <br>
<h2><%=l 'grp_CURRENT_LIST' %></h2> <h2><%= l 'grp_CURRENT_LIST' %></h2>
<br><br> <br><br>
% my $numGroups = @$groups; % my $numGroups = @$groups;
% if ($numGroups == 0){ % if ($numGroups == 0){

View File

@ -3,27 +3,32 @@
% my $btn = l('REMOVE'); % my $btn = l('REMOVE');
<form action="/smanager/hostentriesd" method="POST"> <form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<div> <div>
<h2><%= l 'hos_REMOVE_TITLE'%> </h2> <h2><%= l 'hos_REMOVE_TITLE'%> </h2>
</div> </div>
<%= $c->l('hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname}); %> <br>
<div>
<%= $c->l('hos_REMOVE_PAGE_DESCRIPTION', $hos_datas->{hostname}); %>
</div>
<br>
<b><%= l 'hos_ABOUT_TO_REMOVE' %></b> <b><%= l 'hos_ABOUT_TO_REMOVE' %></b>
<br><br>
<div class="row g-3 align-items-center"> <div class="row g-3 align-items-center">
<div class="col-md-2"> <div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button> <button type="submit" class="btn btn-primary"><%= $btn %></button>
</div> </div>
</div> </div>
%= hidden_field 'trt' => $hos_datas->{trt}
%= hidden_field 'Hostname' => $hos_datas->{hostname}
%# end <%= hidden_field 'trt' => $hos_datas->{trt} %>
<%= hidden_field 'Hostname' => $hos_datas->{hostname} %>
</form> </form>
</div> </div>

View File

@ -3,81 +3,72 @@
% my $btn = l('hos_ADD_HOSTNAME'); % my $btn = l('hos_ADD_HOSTNAME');
<form action="/smanager/hostentriesd" method="POST"> <form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentries' => (method => 'POST') => begin
<div class="row g-3 align-items-center"> <div class="row g-3 align-items-center">
<div class="col-md-2"> <div class="col-md-2">
<button type="submit" class="btn btn-primary"><%= $btn %></button> <button type="submit" class="btn btn-primary"><%= $btn %></button>
</div> </div>
</div> </div>
<%= hidden_field 'trt' => $hos_datas->{trt} %>
%= hidden_field 'trt' => $hos_datas->{trt}
%# end
</form> </form>
% my %dom_hos = %{$dom_hosts}; % my %dom_hos = %{$dom_hosts};
% foreach my $domain ( sort ( keys %dom_hos ) ) { % foreach my $domain ( sort ( keys %dom_hos ) ) {
<br> <br>
<%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain); %>
<br>
<b> <table class="table table-bordered">
<%= $c->l('hos_CURRENT_HOSTNAMES_FOR_LOCAL_DOMAIN', $domain); %> <thead>
</b> <tr class="user-valign-center">
<th class="col-sm"><%= l 'hos_HOSTNAME' %></th>
<th class="col-auto"><%= l 'hos_HOSTTYPE' %></th>
<th class="col-auto"><%= l 'IP_ADDRESS_OR_FQDN' %></th>
<th class="col-auto"><%= l 'hos_ETHERNET_ADDRESS' %></th>
<th class="col-auto"><%= l 'COMMENT' %></th>
<th class="user-valign-center" colspan="2"><%= l 'ACTION' %></th>
</tr>
</thead>
<br> <tbody>
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) {
<table class="table table-bordered"> <tr>
<thead> <td><%= $_->{'HostName'}; %></td>
<tr> <td><%= $_->{'HostType'}; %></td>
<th><%= l 'hos_HOSTNAME' %></th> <td><%= $_->{'IP'}; %></td>
<th><%= l 'hos_HOSTTYPE' %></th> <td><%= $_->{'MACAddress'}; %></td>
<th><%= l 'IP_ADDRESS_OR_FQDN' %></th> <td><%= $_->{'Comment'}; %></td>
<th><%= l 'hos_ETHERNET_ADDRESS' %></th>
<th><%= l 'COMMENT' %></th> % my ($actionModify, $actionRemove) = '&nbsp;';
<th><%= l 'ACTION' %></th> % my $static = $_->{'static'} || "no";
</tr> % if ($static ne 'yes') {
</thead> %my $modify_text = l('MODIFY'); # Localized text
<tbody> %my $csrf_token = "TOKEN"; # CSRF token for security
%my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
% foreach (@{$dom_hos{$domain}{'HOSTS'}}) { %$actionModify = qq{
<tr> % <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name">
<td><%= $_->{'HostName'}; %></td> % <button type='button' class="btn btn-primary" title='$modify_text' >
<td><%= $_->{'HostType'}; %></td> % $modify_text
<td><%= $_->{'IP'}; %></td> % </button>
<td><%= $_->{'MACAddress'}; %></td> % </a>
<td><%= $_->{'Comment'}; %></td> %};
<!--Need a fix? --> %my $remove_text = l('REMOVE'); # Localized text
<td style="min-width:15em"> %$csrf_token = "TOKEN"; # CSRF token for security
%my ($actionModify, $actionRemove) = '&nbsp;'; %#my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure
%my $static = $_->{'static'} || "no"; %$actionRemove = qq{
%if ($static ne 'yes') { % <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
%my $modify_text = l('MODIFY'); # Localized text % <button type='button' class="btn btn-primary" title='$remove_text' >
%my $csrf_token = "TOKEN"; # CSRF token for security % $remove_text
%my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure % </button>
%$actionModify = qq{ % </a>
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=UPD&Hostname=$hostentries_name"> %};
% <button type='button' class="btn btn-primary" title='$modify_text' > % }
% $modify_text <td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
% </button> <td class="user-valign-center"><%= $c->render_to_string(inline => $actionRemove) %></td>
% </a>
%}; </tr>
%my $remove_text = l('REMOVE'); # Localized text % }
%$csrf_token = "TOKEN"; # CSRF token for security </tbody>
%#my $hostentries_name = $_->{'HostName'}; # hostentries name extracted from the data structure </table>
%$actionRemove = qq{
% <a href="hostentriesd?CsrfDef=$csrf_token&trt=DEL&Hostname=$hostentries_name">
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
% </a>
%};
%}
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
</td>
</tr>
% }
</tbody>
</table>
% } % }
</div> </div>

View File

@ -4,16 +4,14 @@
% my $btn = l('NEXT'); % my $btn = l('NEXT');
<form action="/smanager/hostentriesd" method="POST"> <form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<h2> <h2>
% if ( $hos_datas->{trt} eq "ALC" ) { % if ( $hos_datas->{trt} eq "ALC" ) {
%=l 'hos_CREATE_TYPE' <h2><%=l 'hos_CREATE_TYPE' %></h2>
% } else { % } else {
%=l 'hos_MODIFY_TYPE' <h2><%=l 'hos_MODIFY_TYPE' %></h2>
% $btn = l('MODIFY'); % $btn = l('MODIFY');
% } % }
</h2>
<div> <div>
<%= l 'hos_LOCAL_PAGE_DESCRIPTION' %> <%= l 'hos_LOCAL_PAGE_DESCRIPTION' %>
@ -22,6 +20,7 @@
<div> <div>
<%= l 'hos_LOCAL_IP_DESCRIPTION' %> <%= l 'hos_LOCAL_IP_DESCRIPTION' %>
</div> </div>
<div> <div>
<%= l 'hos_LOCAL_IP' %> <%= l 'hos_LOCAL_IP' %>
</div> </div>
@ -40,8 +39,8 @@
</div> </div>
<div> <div>
% param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress'; % param 'Macaddress' => $hos_datas->{macaddress} unless param 'Macaddress';
<%= text_field 'Macaddress' %> <%= text_field 'Macaddress' %>
</div> </div>
<div class="row g-3 align-items-center"> <div class="row g-3 align-items-center">
@ -50,15 +49,14 @@
</div> </div>
</div> </div>
%= hidden_field 'trt' => $hos_datas->{trt} <%= hidden_field 'trt' => $hos_datas->{trt} %>
%= hidden_field 'Hostname' => $hos_datas->{hostname} <%= hidden_field 'Hostname' => $hos_datas->{hostname} %>
%= hidden_field 'Name' => $hos_datas->{name} <%= hidden_field 'Name' => $hos_datas->{name} %>
%= hidden_field 'Domain' => $hos_datas->{domain} <%= hidden_field 'Domain' => $hos_datas->{domain} %>
%= hidden_field 'Comment'=> $hos_datas->{comment} <%= hidden_field 'Comment'=> $hos_datas->{comment} %>
%= hidden_field 'Hosttype'=> $hos_datas->{hosttype} <%= hidden_field 'Hosttype'=> $hos_datas->{hosttype} %>
%= hidden_field 'Externalip' => $hos_datas->{externalip} <%= hidden_field 'Externalip' => $hos_datas->{externalip} %>
%#end
</form> </form>
</div> </div>

View File

@ -3,60 +3,74 @@
% my $btn = l('NEXT'); % my $btn = l('NEXT');
<form action="/smanager/hostentriesd" method="POST"> <form action="/smanager/hostentriesd" method="POST">
%#= form_for '/hostentriesd' => (method => 'POST') => begin
<h2>
% if ( $hos_datas->{trt} eq "ADD" ) { % if ( $hos_datas->{trt} eq "ADD" ) {
<%=l 'hos_CREATE_TITLE' %> <h2><%=l 'hos_CREATE_TITLE' %></h2>
% } else { % } else {
<%=l 'hos_MODIFY_TITLE' %> <h2><%=l 'hos_MODIFY_TITLE' %></h2>
% $btn = l('MODIFY'); % $btn = l('MODIFY');
% } % }
</h2>
<div><%= l 'hos_HOSTNAME_DESCRIPTION' %></div>
<div><%=l 'hos_HOSTNAME' %></div>
<div> <div>
<%= l 'hos_HOSTNAME_DESCRIPTION' %>
</div>
<br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%=l 'hos_HOSTNAME' %>
</div>
<div class="col-auto">
% if ( $hos_datas->{trt} eq "ADD" ) { % if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Name' => $hos_datas->{name} unless param 'Name'; % param 'Name' => $hos_datas->{name} unless param 'Name';
<%= text_field 'Name' %> <%= text_field 'Name' %>
% } else { % } else {
%= hidden_field 'Name' => $hos_datas->{name} <%= hidden_field 'Name' => $hos_datas->{name} %>
<%= $hos_datas->{name} %> <%= $hos_datas->{name} %>
% } % }
</div> </div>
<div>
<%= l 'DOMAIN' %>
</div> </div>
<div> <br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%= l 'DOMAIN' %>
</div>
<div class="col-auto">
% if ( $hos_datas->{trt} eq "ADD" ) { % if ( $hos_datas->{trt} eq "ADD" ) {
% param 'Domain' => $hos_datas->{domain} unless param 'Domain'; % param 'Domain' => $hos_datas->{domain} unless param 'Domain';
<%= select_field 'Domain', $c->domains_list() %> <%= select_field 'Domain', $c->domains_list() %>
% } else { % } else {
%= hidden_field 'Domain' => $hos_datas->{domain} <%= hidden_field 'Domain' => $hos_datas->{domain} %>
<%= $hos_datas->{domain} %> <%= $hos_datas->{domain} %>
% } % }
</div> </div>
<div>
<%= $c->l('COMMENT', ''); %>
</div> </div>
<div> <br>
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
<%= text_field 'Comment' %> <div class="row g-3 align-items-center">
<div class="col-md-2">
<label for="inputHostComment" class="col-form-label"><%= $c->l('COMMENT', ''); %></label>
</div>
<div class="col-auto">
% param 'Comment' => $hos_datas->{comment} unless param 'Comment';
<input type="text" name="Comment" id="inputHostComment" class="form-control" aria-describedby="inputHostComment" value="<%= $hos_datas->{comment} %>">
</div>
</div> </div>
<div> <br>
<div class="row g-3 align-items-center">
<div class="col-md-2">
<%=l 'LOCATION' %> <%=l 'LOCATION' %>
</div> </div>
<div class="col-auto">
<div> % param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype';
% param 'Hosttype' => $hos_datas->{hosttype} unless param 'Hosttype'; <%= select_field 'Hosttype', $c->hosttype_list(), class => "form-select"; %>
%= select_field 'Hosttype', $c->hosttype_list(), class => "" </div>
</div> </div>
<br> <br>
@ -66,14 +80,13 @@
<button type="submit" class="btn btn-primary"><%= $btn %></button> <button type="submit" class="btn btn-primary"><%= $btn %></button>
</div> </div>
</div> </div>
%= 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 <%= 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} %>
</form> </form>
</div> </div>

View File

@ -25,7 +25,7 @@
<br> <br>
% my $numIbays = @$ibays; % my $numIbays = @$ibays;
% if ($numIbays == 0){ % if ($numIbays == 0) {
<%= l 'iba_NO_IBAYS' %> <%= l 'iba_NO_IBAYS' %>
% } else { % } else {
@ -50,7 +50,7 @@
<tr> <tr>
<td><%= $ibay->key %> <td><%= $ibay->key %>
<td><%= $ibay->prop('Name') %> <td><%= $ibay->prop('Name') %>
<td class="" style="min-width:15em"> <td class="">
% my ($actionModify, $actionResetPw, $actionRemove) = '&nbsp;'; % my ($actionModify, $actionResetPw, $actionRemove) = '&nbsp;';
% if ($modifiable eq 'yes') { % if ($modifiable eq 'yes') {
%my $modify_text = l('MODIFY'); # Localized text %my $modify_text = l('MODIFY'); # Localized text

View File

@ -3,174 +3,159 @@
% my $btn = l('usr_ADD_USER'); % my $btn = l('usr_ADD_USER');
<form action="/smanager/useraccounts" method="POST"> <form action="/smanager/useraccounts" method="POST">
%#= form_for '/useraccounts' => (method => 'POST') => begin <br>
<div>
<br> <button type="submit" class="btn btn-primary"><%= $btn %> </button>
</div>
<div>
<button type="submit" class="btn btn-primary"><%= $btn %> </button>
</div>
</form> </form>
%# end
<br> <br>
%= $c->render_to_string(inline => $c->l('usr_FIRSTPAGE_DESC')) <%= $c->render_to_string(inline => $c->l('usr_FIRSTPAGE_DESC')) %>
<br> <br>
%#= dumper @$users %#= dumper @$users
% my $numUsers = @$users; % my $numUsers = @$users;
% if ($numUsers == 0){ % if ($numUsers == 0) {
%=l 'usr_NO_USER_ACCOUNTS' <%=l 'usr_NO_USER_ACCOUNTS' %>
% } else { % } else {
<div class="table-responsive"> <div class="table-responsive">
<table class="table table-bordered"> <table class="table table-bordered">
<thead> <thead>
<tr> <tr class="">
<th> <th><%=l 'ACCOUNT' %></th>
%=l 'ACCOUNT' <th><%=l 'USER_NAME' %></th>
</th> <th><%=l 'usr_VPN_CLIENT_ACCESS' %></th>
<th> <th><%=l 'usr_FORWARDING_ADDRESS' %></th>
%=l 'USER_NAME' <th class="user-valign-center" colspan="5"><%= l 'ACTION' %></th>
</th> </tr>
<th> </thead>
%=l 'usr_VPN_CLIENT_ACCESS' <tbody>
</th>
<th>
%=l 'usr_FORWARDING_ADDRESS'
</th>
<th class="user-valign-center" colspan="5">
%=l 'ACTION'
</th>
</tr>
</thead>
<tbody>
% foreach my $user (@$users) {
% my $username = $user->key(); % foreach my $user (@$users) {
% my $first = $user->prop('FirstName');
% my $last = $user->prop('LastName'); % my $username = $user->key();
% my $lockable = $user->prop('Lockable') || 'yes'; % my $first = $user->prop('FirstName');
% my $removable = $user->prop('Removable') || 'yes'; % my $last = $user->prop('LastName');
% my $fwd = (($user->prop('EmailForward') || 'local') =~ m/^forward|both$/) ? % my $lockable = $user->prop('Lockable') || 'yes';
% $user->prop('ForwardAddress') : ''; % my $removable = $user->prop('Removable') || 'yes';
% my $vpnaccess = $user->prop('VPNClientAccess') || 'no'; % my $fwd = (($user->prop('EmailForward') || 'local') =~ m/^forward|both$/) ?
% $vpnaccess = $vpnaccess eq 'yes' ? $c->l('YES') : $c->l('NO'); % $user->prop('ForwardAddress') : '';
% my $password_set = $user->prop('PasswordSet'); % my $vpnaccess = $user->prop('VPNClientAccess') || 'no';
% my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure % $vpnaccess = $vpnaccess eq 'yes' ? $c->l('YES') : $c->l('NO');
% my $csrf_token = "TOKEN"; # CSRF token for security % my $password_set = $user->prop('PasswordSet');
% my $modify_text = l('MODIFY'); # Localized text % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
% my $remove_text = l('REMOVE'); # Localized text % my $csrf_token = "TOKEN"; # CSRF token for security
% my $password_text = l("PASSWORD_RESET"); % my $modify_text = l('MODIFY'); # Localized text
% my $lock_text = l('usr_LOCK'); # Localized text % my $remove_text = l('REMOVE'); # Localized text
% my $roundcube_text = l('Webmail'); # Localized text % my $password_text = l("PASSWORD_RESET");
% my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = '&nbsp;'; % my $lock_text = l('usr_LOCK'); # Localized text
% my $thisdomain = $c->req->url->to_abs->host; % my $roundcube_text = l('Webmail'); # Localized text
% my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = '&nbsp;';
<tr> % my $thisdomain = $c->req->url->to_abs->host;
<td><%= $username %></td>
<td><%=$first %>&nbsp<%=$last %></td> <tr>
<td><%= $vpnaccess %></td> <td><%= $username %></td>
<td><%= $fwd %></td> <td><%= $first %>&nbsp<%=$last %></td>
<td><%= $vpnaccess %></td>
% if ($useraccounts_user_name eq 'admin') { <td><%= $fwd %></td>
%$actionModify = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name"> % if ($useraccounts_user_name eq 'admin') {
% <button type='button' class="btn btn-primary" title='$modify_text'> %$actionModify = qq{
% $modify_text %<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
% </button> % <button type='button' class="btn btn-primary" title='$modify_text'>
%</a> % $modify_text
%}; % </button>
%$actionResetPw = qq{ %</a>
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name"> %};
% <button type='button' class="btn btn-primary" title='$password_text' > %$actionResetPw = qq{
% $password_text %<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name">
% </button> % <button type='button' class="btn btn-primary" title='$password_text' >
%</a> % $password_text
%}; % </button>
% } else { %</a>
%$actionModify = qq{ %};
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name"> % } else {
% <button type='button' class="btn btn-primary" title='$modify_text' > %$actionModify = qq{
% $modify_text %<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
% </button> % <button type='button' class="btn btn-primary" title='$modify_text' >
%</a> % $modify_text
%}; % </button>
% } %</a>
%};
% }
% if ($password_set ne 'yes') { % if ($password_set ne 'yes') {
<!-- Needs a fix here --> <!-- Needs a fix here -->
%#$actionLock = l('ACCOUNT_LOCKED'); %#$actionLock = l('ACCOUNT_LOCKED');
<!-- Sets BOTH columns - possibly leave out Reset Password here?--> <!-- Sets BOTH columns - possibly leave out Reset Password here?-->
%$actionLock = qq{ %$actionLock = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="btn btn-danger" title="$password_text - currently unset"> % <button type='button' class="btn btn-danger" title="$password_text - currently unset">
% Unlock % Unlock
% </button> % </button>
%</a> %</a>
%}; %};
%$actionResetPw = qq{ %$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name"> %<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title="$password_text - currently unset"> % <button type='button' class="btn btn-primary" title="$password_text - currently unset">
% $password_text % $password_text
% </button> % </button>
%</a> %</a>
%};
% } elsif ($useraccounts_user_name ne 'admin') {
%$actionLock = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" 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="btn btn-primary" title='$password_text' >
% $password_text
% </button>
%</a>
%};
% }
% if ( $removable eq 'yes' ) {
%$actionRemove = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
%</a>
%};
% }
<!-- If webmail disabled??? -->
% $actionroundcube = qq{
%<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px">
% <button type='button' class="btn btn-primary" title='$roundcube_text' >
% $roundcube_text
% </button>
%</a>
%}; %};
% } elsif ($useraccounts_user_name ne 'admin') { <td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
%$actionLock = qq{ <td class="user-valign-center"><%= $c->render_to_string(inline => $actionResetPw) %></td>
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name"> <td class="user-valign-center"><%= $c->render_to_string(inline => $actionLock) %></td>
% <button type='button' class="btn btn-primary" title='$lock_text' > <td class="user-valign-center"><%= $c->render_to_string(inline => $actionRemove) %></td>
% $lock_text <td class="user-valign-center"><%= $c->render_to_string(inline => $actionroundcube) %></td>
% </button> </tr>
%</a> % }
%}; </tbody>
%$actionResetPw = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$password_text' >
% $password_text
% </button>
%</a>
%};
% }
% if ( $removable eq 'yes' ) {
%$actionRemove = qq{
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
% <button type='button' class="btn btn-primary" title='$remove_text' >
% $remove_text
% </button>
%</a>
%};
% }
<!-- If webmail disabled??? -->
% $actionroundcube = qq{
%<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name&height=600px">
% <button type='button' class="btn btn-primary" title='$roundcube_text' >
% $roundcube_text
% </button>
%</a>
%};
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionModify) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionResetPw) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionLock) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionRemove) %></td>
<td class="user-valign-center"><%= $c->render_to_string(inline => $actionroundcube) %></td>
</tr>
% }
</tbody>
</table> </table>
</div> </div>
<%} %> % }
%= hidden_field 'trt' => $usr_datas->{trt} <%= hidden_field 'trt' => $usr_datas->{trt} %>
</div> </div>

View File

@ -1,6 +1,6 @@
%define name smeserver-manager-AdminLTE %define name smeserver-manager-AdminLTE
%define version 11.0.0 %define version 11.0.0
%define release 21 %define release 22
Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2 Summary: AdminLTE is an html framework for admin consoles - this rpm adds it to smeserver manager2
Name: %{name} Name: %{name}
Version: %{version} Version: %{version}
@ -26,6 +26,9 @@ AdminLTE is an html framework for admin consoles
wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip wget https://github.com/ColorlibHQ/AdminLTE/archive/master.zip
%changelog %changelog
* Sun May 18 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-22.sme
- Hosts done and a few tweaks
* Sun May 18 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-21.sme * Sun May 18 2025 John Crisp <jcrisp@safeandsoundit.co.uk> 11.0.0-21.sme
- Directory updated. More odd fixes. - Directory updated. More odd fixes.