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') => $pseudonym->key
|
||||||
%= t td => (class => 'sme-border') => $account
|
%= t td => (class => 'sme-border') => $account
|
||||||
|
|
||||||
% my ($actionModify, $actionRemove) = ' ';
|
<td class='sme-border'>
|
||||||
% if ($modifiable eq 'yes') {
|
%my ($actionModify, $actionRemove) = ' ';
|
||||||
% $actionModify = "<a href='pseudonyms2?CsrfDef=TOKEN&trt=UPD&pseudonym=" . $pseudonym->key . "'>" . "<button class='sme-modify-button' title=".l('MODIFY').">".l('MODIFY')."</button>" . "</a>";
|
%if ($modifiable eq 'yes') {
|
||||||
% }
|
%my $modify_text = l('MODIFY'); # Localized text
|
||||||
% if ($removable eq 'yes') {
|
%my $csrf_token = "TOKEN"; # CSRF token for security
|
||||||
% $actionRemove = "<a href='pseudonyms2?CsrfDef=TOKEN&trt=DEL&pseudonym=" . $pseudonym->key . "'>" . "<button class='sme-remove-button' title=".l('REMOVE').">".l('REMOVE')."</button>" . "</a>";
|
%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">
|
%if ($removable eq 'yes') {
|
||||||
<%= $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 $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>
|
</tbody>
|
||||||
</table>
|
</table>
|
||||||
@ -75,5 +91,4 @@
|
|||||||
|
|
||||||
|
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
@ -57,7 +57,18 @@
|
|||||||
%= t td => (class => 'sme-border') => sprintf("%.2f", $bs / 1024 )
|
%= 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", $bh / 1024 )
|
||||||
%= t td => (class => 'sme-border') => sprintf("%.2f", $bc / 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>
|
</tr>
|
||||||
% }
|
% }
|
||||||
</tbody>
|
</tbody>
|
||||||
@ -67,4 +78,4 @@
|
|||||||
|
|
||||||
%= hidden_field 'trt' => $quo_datas->{trt}
|
%= hidden_field 'trt' => $quo_datas->{trt}
|
||||||
|
|
||||||
</div>
|
</div>
|
@ -37,7 +37,7 @@
|
|||||||
%= $ic
|
%= $ic
|
||||||
%=l 'quo_FILES'
|
%=l 'quo_FILES'
|
||||||
%=l 'quo_OCCUPYING'
|
%=l 'quo_OCCUPYING'
|
||||||
%= $bc
|
%= $c->toMB($bc)
|
||||||
%=l 'quo_MEGABYTES'
|
%=l 'quo_MEGABYTES'
|
||||||
</p>
|
</p>
|
||||||
|
|
||||||
@ -81,4 +81,4 @@
|
|||||||
|
|
||||||
% end
|
% end
|
||||||
|
|
||||||
</div>
|
</div>
|
Loading…
Reference in New Issue
Block a user