% my $btn = l("usr_ADD_USER");


<%= $c->render_to_string(inline => $c->l("usr_FIRSTPAGE_DESC")) %>
%#= dumper @$users % my $numUsers = @$users; % if ($numUsers == 0) { <%=l "usr_NO_USER_ACCOUNTS" %> % } else {
% foreach my $user (@$users) { % my $username = $user->key(); % my $first = $user->prop("FirstName"); % my $last = $user->prop("LastName"); % my $lockable = $user->prop("Lockable") || "yes"; % my $removable = $user->prop("Removable") || "yes"; % my $fwd = (($user->prop("EmailForward") || "local") =~ m/^forward|both$/) ? % $user->prop("ForwardAddress") : ""; % my $vpnaccess = $user->prop("VPNClientAccess") || "no"; % $vpnaccess = $vpnaccess eq "yes" ? $c->l("YES") : $c->l("NO"); % my $password_set = $user->prop("PasswordSet"); % my $useraccounts_user_name = $user->key; # useraccountss_entry name extracted from the data structure % my $csrf_token = "TOKEN"; # CSRF token for security % my $modify_text = l("MODIFY"); # Localized text % my $remove_text = l("REMOVE"); # Localized text % my $password_text = l("PASSWORD_RESET"); % my $lock_text = l("Lock"); # Localized text % my $roundcube_text = l("Webmail"); # Localized text % my ($actionModify, $actionLock, $actionResetPw, $actionRemove,$actionroundcube) = " "; % my $thisdomain = $c->req->url->to_abs->host; % if ($useraccounts_user_name eq "admin") { %$actionModify = qq{ % % % %}; %$actionResetPw = qq{ % % % %}; % } else { %$actionModify = qq{ % % % %}; % } % if ($password_set ne "yes") { %#$actionLock = l("ACCOUNT_LOCKED"); %$actionLock = qq{ % % % %}; %$actionResetPw = qq{ % % % %}; % } elsif ($useraccounts_user_name ne "admin") { %$actionLock = qq{ % % % %}; %$actionResetPw = qq{ % % % %}; % } % if ( $removable eq "yes" ) { %$actionRemove = qq{ % % % %}; % } % $actionroundcube = qq{ % % % %}; % }
<%= l "ACCOUNT" %> <%= l "USER_NAME" %> <%= l "usr_VPN_CLIENT_ACCESS" %> <%= l "usr_FORWARDING_ADDRESS" %> <%= l "ACTION" %>
<%= $username %> <%= $first %> <%=$last %> <%= $vpnaccess %> <%= $fwd %><%= $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) %>
% } <%= hidden_field "trt" => $usr_datas->{trt} %>