|
|
|
@@ -66,58 +66,65 @@
|
|
|
|
|
%my $password_text = l("PASSWORD_RESET");
|
|
|
|
|
%if ($useraccounts_user_name eq 'admin') {
|
|
|
|
|
%$actionModify = qq{
|
|
|
|
|
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-modify-button' title='$modify_text'>
|
|
|
|
|
% $modify_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPS&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-modify-button' title='$modify_text'>
|
|
|
|
|
% $modify_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%$actionResetPw = qq{
|
|
|
|
|
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWS&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-password-button' title='$password_text' >
|
|
|
|
|
% $password_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%} else {
|
|
|
|
|
%$actionModify = qq{
|
|
|
|
|
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-modify-button' title='$modify_text' >
|
|
|
|
|
% $modify_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=UPD&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-modify-button' title='$modify_text' >
|
|
|
|
|
% $modify_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%}
|
|
|
|
|
%if ($password_set ne 'yes') {
|
|
|
|
|
%$actionLock = l('ACCOUNT_LOCKED');
|
|
|
|
|
%$actionResetPw = qq{
|
|
|
|
|
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
|
|
|
|
|
% $password_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=PWD&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-password-button unset' title="$password_text - currently unset" style = background:pink; >
|
|
|
|
|
% $password_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%} else {
|
|
|
|
|
%} elsif ($useraccounts_user_name ne 'admin') {
|
|
|
|
|
%my $lock_text = l('ACCOUNT LOCKED'); # Localized text
|
|
|
|
|
%my $csrf_token = "TOKEN"; # CSRF token for security
|
|
|
|
|
%my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
|
|
|
|
|
%$actionLock = qq{
|
|
|
|
|
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-lock-button' title='$lock_text' >
|
|
|
|
|
% $lock_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%};
|
|
|
|
|
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=LCK&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-lock-button' title='$lock_text' >
|
|
|
|
|
% $lock_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%$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='sme-password-button' title='$password_text' >
|
|
|
|
|
% $password_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%}
|
|
|
|
|
%if ( $removable eq 'yes' ) {
|
|
|
|
|
%my $remove_text = l('REMOVE'); # Localized text
|
|
|
|
|
%my $csrf_token = "TOKEN"; # CSRF token for security
|
|
|
|
|
%$actionRemove = qq{
|
|
|
|
|
% <a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-remove-button' title='$remove_text' >
|
|
|
|
|
% $remove_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%<a href="useraccountsd?CsrfDef=$csrf_token&trt=DEL&user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-remove-button' title='$remove_text' >
|
|
|
|
|
% $remove_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
%}
|
|
|
|
|
|
|
|
|
@@ -127,20 +134,19 @@
|
|
|
|
|
%my $csrf_token = "TOKEN"; # CSRF token for security
|
|
|
|
|
%my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure
|
|
|
|
|
%$actionroundcube = qq{
|
|
|
|
|
% <a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-email-button' title='$roundcube_text' >
|
|
|
|
|
% $roundcube_text
|
|
|
|
|
% </button>
|
|
|
|
|
% </a>
|
|
|
|
|
%<a href="roundcubepanel?CsrfDef=$csrf_token&url=https://$thisdomain/roundcube?_user=$useraccounts_user_name">
|
|
|
|
|
% <button type='button' class='sme-email-button' title='$roundcube_text' >
|
|
|
|
|
% $roundcube_text
|
|
|
|
|
% </button>
|
|
|
|
|
%</a>
|
|
|
|
|
%};
|
|
|
|
|
|
|
|
|
|
<td class='sme-border' style="min-width:35em">
|
|
|
|
|
<%= $c->render_to_string(inline => $actionModify) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionResetPw) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionLock) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionRemove) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionroundcube) %>
|
|
|
|
|
</td>
|
|
|
|
|
<td class='sme-border' style="min-width:35em">
|
|
|
|
|
<%= $c->render_to_string(inline => $actionModify) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionResetPw) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionLock) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionRemove) %>
|
|
|
|
|
<%= $c->render_to_string(inline => $actionroundcube) %>
|
|
|
|
|
</td>
|
|
|
|
|
</tr>
|
|
|
|
|
% }
|
|
|
|
|
</tbody>
|
|
|
|
@@ -150,4 +156,4 @@
|
|
|
|
|
|
|
|
|
|
%= hidden_field 'trt' => $usr_datas->{trt}
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
</div>
|