Fix up action commands for pseudonyms and quota
This commit is contained in:
parent
34e7331845
commit
ff9a84dd29
@ -54,19 +54,35 @@
|
||||
%= t td => (class => 'sme-border') => $pseudonym->key
|
||||
%= t td => (class => 'sme-border') => $account
|
||||
|
||||
% my ($actionModify, $actionRemove) = ' ';
|
||||
% if ($modifiable eq 'yes') {
|
||||
% $actionModify = "<a href='pseudonyms2?CsrfDef=TOKEN&trt=UPD&pseudonym=" . $pseudonym->key . "'>" . "<button class='sme-modify-button' title=".l('MODIFY').">".l('MODIFY')."</button>" . "</a>";
|
||||
% }
|
||||
% if ($removable eq 'yes') {
|
||||
% $actionRemove = "<a href='pseudonyms2?CsrfDef=TOKEN&trt=DEL&pseudonym=" . $pseudonym->key . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>";
|
||||
% }
|
||||
<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{
|
||||
% <button type='button' class='sme-modify-button' title='$modify_text'
|
||||
% onclick="window.location.href='pseudonyms2?CsrfDef=$csrf_token&trt=UPD&pseudonym=$pseudonyms_entry_name'">
|
||||
% $modify_text
|
||||
% </button>
|
||||
%};
|
||||
%}
|
||||
|
||||
<td class='sme-border' style="min-width:15em">
|
||||
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
|
||||
</td>
|
||||
</tr>
|
||||
%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{
|
||||
% <button type='button' class='sme-remove-button' title='$remove_text'
|
||||
% onclick="window.location.href='pseudonyms2?CsrfDef=$csrf_token&trt=DEL&pseudonym=$pseudonyms_entry_name'">
|
||||
% $remove_text
|
||||
% </button>
|
||||
%};
|
||||
%}
|
||||
<%= $c->render_to_string(inline => $actionModify) %> <%= $c->render_to_string(inline => $actionRemove) %>
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
% }
|
||||
</tbody>
|
||||
</table>
|
||||
@ -76,4 +92,3 @@
|
||||
|
||||
|
||||
</div>
|
||||
|
||||
|
@ -57,7 +57,18 @@
|
||||
%= 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'><a href="quotad?CsrfDef=TOKEN&trt=UPD&user=<%= $user->key%>"><button class='sme-modify-button' title="<%=l('MODIFY')%>"><%=l('MODIFY') %></button></a></td>
|
||||
<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{
|
||||
% <button type='button' class='sme-modify-button' title='$modify_text'
|
||||
% onclick="window.location.href='quotad?CsrfDef=$csrf_token&trt=UPD&user=$quota_user_name'">
|
||||
% $modify_text
|
||||
% </button>
|
||||
%};
|
||||
<%= $c->render_to_string(inline => $actionModify) %>
|
||||
</td>
|
||||
</tr>
|
||||
% }
|
||||
</tbody>
|
||||
|
@ -37,7 +37,7 @@
|
||||
%= $ic
|
||||
%=l 'quo_FILES'
|
||||
%=l 'quo_OCCUPYING'
|
||||
%= $bc
|
||||
%= $c->toMB($bc)
|
||||
%=l 'quo_MEGABYTES'
|
||||
</p>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user