Edit template for controller - Refine params copy and bring DB opens up to spec with UTF8

This commit is contained in:
2025-10-06 10:57:00 +01:00
parent 29f8de63fd
commit ecb846fc6c
119 changed files with 10059 additions and 36 deletions

View 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) = "&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>
</div>