Edit template for controller - Refine params copy and bring DB opens up to spec with UTF8
This commit is contained in:
85
output/Pseudonyms/AdminLTE/_pse_list.html.new.ep
Normal file
85
output/Pseudonyms/AdminLTE/_pse_list.html.new.ep
Normal file
@@ -0,0 +1,85 @@
|
||||
<div>
|
||||
|
||||
% my $btn = l("pse_CLICK_TO_CREATE");
|
||||
|
||||
<form action="/smanager/pseudonyms" method="POST">
|
||||
<%= $c->render_to_string(inline => l("pse_DESCRIPTION")); %>
|
||||
<div class="row g-3 align-items-center">
|
||||
<div class="col-md-2">
|
||||
<button type="submit" class="btn btn-primary btn-sm"><%= $btn %></button>
|
||||
</div>
|
||||
</div>
|
||||
<%= hidden_field "trt" => "ADD" %>
|
||||
</form>
|
||||
|
||||
<br>
|
||||
<h2><%= l "pse_CURRENT_PSEUDONYMS" %></h2>
|
||||
<br>
|
||||
% my $numPseudonyms = @$pseudonyms;
|
||||
% if ($numPseudonyms == 0) {
|
||||
<%= l "pse_ACCOUNT_PSEUDONYM_NONE" %>
|
||||
% } else {
|
||||
<table class="table table-bordered user-table-max-width">
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="col-sm"><%= l "Pseudonym" %></th>
|
||||
<th class="col-sm"><%= l "pse_USER_OR_GROUP" %></th>
|
||||
<th class="col-sm align-middle" colspan="2"><%= l "ACTION" %></th>
|
||||
<!-- <th class="" 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("Everyone") if ($account eq "shared");
|
||||
|
||||
% my $visible = $pseudonym->prop("Visible");
|
||||
% $account .= $c->l("pse_LOCAL_ONLY")
|
||||
% if (defined $visible && $visible eq "internal");
|
||||
|
||||
<tr>
|
||||
<td><%= $pseudonym->key%></td>
|
||||
<td><%= $account%></td>
|
||||
|
||||
% my ($actionModify, $actionRemove) = " ";
|
||||
% if ($modifiable eq "yes") {
|
||||
%my $modify_text = l("MODIFY"); # Localized text
|
||||
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
|
||||
%$actionModify = qq{
|
||||
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name">
|
||||
% <button type="button" class="btn btn-primary btn-sm" 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="btn btn-primary btn-sm" title="$remove_text" >
|
||||
% $remove_text
|
||||
% </button>
|
||||
% </a>
|
||||
% };
|
||||
% }
|
||||
|
||||
<td class="align-middle"><%= $c->render_to_string(inline => $actionModify) %></td>
|
||||
<td class="align-middle"><%= $c->render_to_string(inline => $actionRemove) %></td>
|
||||
|
||||
</tr>
|
||||
% }
|
||||
</tbody>
|
||||
</table>
|
||||
% }
|
||||
|
||||
</div>
|
96
output/Pseudonyms/default/_pse_list.html.new.ep
Normal file
96
output/Pseudonyms/default/_pse_list.html.new.ep
Normal file
@@ -0,0 +1,96 @@
|
||||
<div id="pse_list">
|
||||
|
||||
% my $btn = l("pse_CLICK_TO_CREATE");
|
||||
|
||||
%= $c->render_to_string(inline => l("pse_DESCRIPTION"));
|
||||
|
||||
%= form_for "/pseudonyms" => (method => "POST") => begin
|
||||
|
||||
%= hidden_field "trt" => "ADD"
|
||||
|
||||
<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 "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("Everyone") if ($account eq "shared");
|
||||
|
||||
% my $visible = $pseudonym->prop("Visible");
|
||||
% $account .= $c->l("pse_LOCAL_ONLY")
|
||||
% if (defined $visible && $visible eq "internal");
|
||||
|
||||
<tr>
|
||||
%= t td => (class => "sme-border") => $pseudonym->key
|
||||
%= t td => (class => "sme-border") => $account
|
||||
|
||||
<td class="sme-border">
|
||||
%my ($actionModify, $actionRemove) = " ";
|
||||
%if ($modifiable eq "yes") {
|
||||
%my $modify_text = l("MODIFY"); # Localized text
|
||||
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||
%my $pseudonyms_entry_name = $pseudonym->key; # pseudonyms_entry name extracted from the data structure
|
||||
%$actionModify = qq{
|
||||
% <a href="pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name">
|
||||
% <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>
|
||||
|
||||
|
||||
|
||||
</div>
|
3
output/Pseudonyms/pseudonyms_en.lex.diff
Normal file
3
output/Pseudonyms/pseudonyms_en.lex.diff
Normal file
@@ -0,0 +1,3 @@
|
||||
'pse_NO_PSEUDONYMS' => ' <b>There are no pseudonyms in the system.</b> ',
|
||||
'pse_PSEUDONYM_INVALID_NOACCT' => 'That account is not hosted on this server',
|
||||
'Pseudonyms' => 'Pseudonyms',
|
67
output/Pseudonyms/pseudonyms_en.lex.new1
Normal file
67
output/Pseudonyms/pseudonyms_en.lex.new1
Normal file
@@ -0,0 +1,67 @@
|
||||
#
|
||||
# Lex file for Pseudonyms generated on 2025-07-17 09:52:33
|
||||
#
|
||||
'pse_ABOUT_TO_REMOVE' => 'You are about to remove the pseudonym: [_1]<br>
|
||||
<b>Are you sure you wish to continue?</b>',
|
||||
'pse_CLICK_TO_CREATE' => 'Add pseudonym',
|
||||
'pse_CREATE_SUCCEEDED' => 'Successfully created pseudonym',
|
||||
'pse_CURRENT_PSEUDONYMS' => 'Current List of Pseudonyms',
|
||||
'pse_DESC_PSEUDONYM_NAME' => ' Please select an existing account or group for the pseudonym from the pulldown menu below',
|
||||
'pse_DESCRIPTION' => '<p>The server automatically creates
|
||||
an e-mail alias for each group. If you want to define an e-mail
|
||||
alias for a list of users, simply create a group and the
|
||||
list will automatically be maintained by the server.</p>
|
||||
<p>Pseudonyms allow you to
|
||||
create other names for existing users or groups.
|
||||
For example, you may wish to create a pseudonym
|
||||
"webmaster" for your "webdevelopers" group or a
|
||||
pseudonym "joe" for the user "joseph".</p>
|
||||
<p>The server automatically creates pseudonyms of the form
|
||||
firstname. lastname and firstname_lastname for every user
|
||||
on the system and a pseudonym "everyone" which contains
|
||||
all users on the system.</p>
|
||||
<p>Pseudonyms also allow you to create e-mail aliases for valid
|
||||
(virtual) domains & users. For example you can forward
|
||||
"sales@virtualdomain1.com" to user "mary" and
|
||||
"sales@virtualdomain2.com" to user "john".
|
||||
You must create the domains and user accounts before creating
|
||||
the email aliases.</p>
|
||||
<p>Pseudonyms can also forward to other pseudonyms, although this
|
||||
is limited to one further level. For example the pseudonym
|
||||
"webmaster" can forward to the pseudonym "techsupport" which
|
||||
then forwards to a specified user "ray". This is useful where
|
||||
one user is responsiblefor multiple roles and saves having
|
||||
to change the pseudonym"s associated with that user many times
|
||||
in the event that the user departs the organisation.</p>
|
||||
<p>You can modify or remove a
|
||||
pseudonym by clicking on the corresponding
|
||||
command next to the pseudonym.</p>',
|
||||
'pse_FORM_TITLE' => 'Create, modify, or remove pseudonyms',
|
||||
'pse_LOCAL_ONLY' => '(local network only)',
|
||||
'pse_MODIFY_PSEUDONYM' => 'Modify Pseudonym',
|
||||
'pse_MODIFY_SUCCEEDED' => 'Successfully modified pseudonym',
|
||||
'pse_NAME_IN_USE' => 'Error: That name is in use You cannot create a pseudonym with that name.',
|
||||
'pse_NO_PSEUDONYMS' => ' <b>There are no pseudonyms in the system.</b> ',
|
||||
'pse_NOT_A_PSEUDONYM' => 'That account is not a pseudonym',
|
||||
'pse_PSEUDONYM_INVALID_DOMAIN' => 'That domain is not hosted on this server',
|
||||
'pse_PSEUDONYM_INVALID_NOACCT' => 'That account is not hosted on this server',
|
||||
'pse_PSEUDONYM_INVALID_SAMEACCT' => 'A pseudonym cannot point to the same account',
|
||||
'pse_PSEUDONYM_NAME' => 'Pseudonym name',
|
||||
'pse_REMOVE_PSEUDONYM' => 'Remove pseudonym',
|
||||
'pse_REMOVE_SUCCEEDED' => 'Successfully removed pseudonym',
|
||||
'pse_SELECT_ACCOUNT' => 'Select account or group',
|
||||
'pse_SELECT_INTERNAL' => 'Local network only',
|
||||
'pse_TITLE_CREATE' => 'Create a pseudonym',
|
||||
'pse_USER_OR_GROUP' => 'User or group',
|
||||
'pse_VALID_PSEUDONYM_NAMES' => ' The pseudonym
|
||||
should contain only lower-case letters, numbers, period,
|
||||
hyphen and underscore
|
||||
and should start with a lower-case letter or
|
||||
number. For example "sales", "john.holland", "123"
|
||||
and "email-administrator" are all valid pseudonyms,
|
||||
but "John Smith" and "Henry Miller" are not.
|
||||
<p>You can also create email aliases for accounts and (virtual)
|
||||
domains that are valid on this server. For example
|
||||
"fred@virtualdomain.com" can be forwarded to "mary"
|
||||
(or to another valid user account).</p> ',
|
||||
'Pseudonyms' => 'Pseudonyms',
|
Reference in New Issue
Block a user