X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=e6cd7d86c750c024d9bd2f04902e5420dd452bda;hb=dd65ba99bb9281571f19744154a3b03bcd3f01ab;hp=09a4cfd649c28fe88e8ffad82c38200af85965d7;hpb=abdb0f8539d8604b3e1ba6218e36a8717e96f88d;p=freeside.git diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index 09a4cfd64..e6cd7d86c 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -1,11 +1,11 @@ -<% include('/elements/header.html', "$action $svc account") %> +<& /elements/header.html, mt("$action [_1] account",$svc) &> -<% include('/elements/error.html') %> +<& /elements/error.html &> % if ( $cust_main ) { - <% include( '/elements/small_custview.html', $cust_main, '', 1, - popurl(2) . "view/cust_main.cgi") %> + <& /elements/small_custview.html, $cust_main, '', 1, + popurl(2) . "view/cust_main.cgi" &> % } @@ -27,17 +27,24 @@ function randomPass() { -Service # <% $svcnum ? "$svcnum" : " (NEW)" %> +% if ( $svcnum ) { +% my $svclabel = emt("Service #[_1]",$svcnum); +% $svclabel =~ s/$svcnum/$svcnum<\/B>/; +<% $svclabel %> +% } else { +<% mt("Service # (NEW)") |h %> +% } + <% ntable("#cccccc",2) %> - Service + <% mt('Service') |h %> <% $part_svc->svc %> - Username + <% mt('Username') |h %> MAXLENGTH=<% $ulen %>> @@ -45,10 +52,10 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> %if ( $part_svc->part_svc_column('_password')->columnflag ne 'F' ) { - Password + <% mt('Password') |h %> MAXLENGTH=<% $pmax %>> - + %}else{ @@ -59,19 +66,16 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> %my $sec_phrase = $svc_acct->sec_phrase; %if ( $conf->exists('security_phrase') % && $part_svc->part_svc_column('sec_phrase')->columnflag ne 'F' ) { -% - - Security phrase + <% mt('Security phrase') |h %> - (for forgotten passwords) + (<% mt('for forgotten passwords') |h %>) % } else { - % } % @@ -80,7 +84,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> %if ( $part_svc->part_svc_column('domsvc')->columnflag eq 'F' ) { % - % } else { % @@ -100,11 +103,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % 'pkgnum' => $pkgnum, % ) % ); -% - - Domain + <% mt('Domain') |h %> % foreach my $svcnum ( @@ -114,7 +115,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % my $svc_domain = $svc_domain{$svcnum}; % - ><% $svc_domain{$svcnum} %> % } @@ -127,7 +127,7 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % if ( $communigate ) { - Aliases + <% mt('Aliases') |h %> @@ -136,25 +136,22 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % } -<% include('/elements/tr-select-svc_pbx.html', +<& /elements/tr-select-svc_pbx.html, 'curr_value' => $svc_acct->pbxsvc, 'part_svc' => $part_svc, 'cust_pkg' => $cust_pkg, - ) -%> +&> %#pop %my $popnum = $svc_acct->popnum || 0; %if ( $part_svc->part_svc_column('popnum')->columnflag eq 'F' ) { % - % } else { - - Access number + <% mt('Access number') |h %> <% FS::svc_acct_pop::popselector($popnum) %> % } @@ -167,7 +164,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % % if ( length($svc_acct->$xid()) ) { - <% uc($xid) %> <% $svc_acct->$xid() %> @@ -175,11 +171,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % } - % } else { - <% uc($xid) %> @@ -195,13 +189,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % && ! $svc_acct->finger ) { % - % } else { - Real Name + <% mt('Real Name') |h %> @@ -219,7 +212,7 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> - Home directory + <% mt('Home directory') |h %> % } @@ -231,13 +224,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % ) { % - % } else { - Shell + <% mt('Shell') |h %> % @@ -245,7 +237,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % foreach $etc_shell (@shells) { % - ><% $etc_shell %> % } @@ -255,222 +246,17 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % } - -% if ( $communigate -% && $part_svc->part_svc_column('cgp_type')->columnflag ne 'F' ) -% { - -% # settings - - - Mailbox type - - -% foreach my $option (qw( MultiMailbox TextMailbox MailDirMailbox -% AGrade BGrade CGrade )) { - cgp_type() ? 'SELECTED' : '' %> - ><% $option %> -% } - - - - -% } else { - -% } - - -% #false laziness w/svc_domain -% if ( $communigate -% && $part_svc->part_svc_column('cgp_accessmodes')->columnflag ne 'F' ) -% { - - - Enabled services - - <% include( '/elements/communigate_pro-accessmodes.html', - 'curr_value' => $svc_acct->cgp_accessmodes, - ) - %> - - - -% } else { - -% } - - -% if ( $part_svc->part_svc_column('quota')->columnflag eq 'F' ) { - -% } else { -% my $quota_label = $communigate ? 'Mail storage limit' : 'Quota'; - - <% $quota_label %> - - -% } - -% tie my %cgp_label, 'Tie::IxHash', -% 'file_quota' => 'File storage limit', -% 'file_maxnum' => 'Number of files limit', -% 'file_maxsize' => 'File size limit', -% ; -% -% foreach my $key (keys %cgp_label) { -% -% if ( !$communigate || $part_svc->part_svc_column($key)->columnflag eq 'F' ){ - -% } else { - - - <% $cgp_label{$key} %> - - - -% } -% } - -% if ( $communigate ) { - - <% include('/elements/tr-checkbox.html', - 'label' => 'Password recovery', - 'field' => 'password_recover', - 'curr_value' => $svc_acct->password_recover, - 'value' => 'Y', - ) - %> - - <% include('/elements/tr-select.html', - 'label' => 'Allowed mail rules', - 'field' => 'cgp_rulesallowed', - 'options' => [ '', 'No', 'Filter Only', 'All But Exec', 'Any' ], - 'labels' => { - '' => 'default (No)', #No always the default? - }, - 'curr_value' => $svc_acct->cgp_rulesallowed, - ) - %> - - <% include('/elements/tr-checkbox.html', - 'label' => 'RPOP modifications', - 'field' => 'cgp_rpopallowed', - 'curr_value' => $svc_acct->cgp_rpopallowed, - 'value' => 'Y', - ) - %> - - <% include('/elements/tr-checkbox.html', - 'label' => 'Accepts mail to "all"', - 'field' => 'cgp_mailtoall', - 'curr_value' => $svc_acct->cgp_mailtoall, - 'value' => 'Y', - ) - %> - - <% include('/elements/tr-checkbox.html', - 'label' => 'Add trailer to sent mail', - 'field' => 'cgp_addmailtrailer', - 'curr_value' => $svc_acct->cgp_addmailtrailer, - 'value' => 'Y', - ) - %> - -% #preferences - -%# false laziness w/svc_domain acct_def - - Message delete method - - -% for ( 'Move To Trash', 'Immediately', 'Mark' ) { - cgp_deletemode ? 'SELECTED' : '' %> - ><% $_ %> -% } - - - - - - On logout remove trash - - - - <% include('/elements/tr-select.html', - 'label' => 'Language', - 'field' => 'cgp_language', - 'options' => [ '', qw( English Arabic Chinese Dutch French German Hebrew Italian Japanese Portuguese Russian Slovak Spanish Thai ) ], - 'labels' => { - '' => 'default (English)', - }, - 'curr_value' => $svc_acct->cgp_language, - ) - %> - - <% include('/elements/tr-select.html', - 'label' => 'Time zone', - 'field' => 'cgp_timezone', - 'options' => $svc_acct->cgp_timezone, - 'labels' => { - '' => 'default (HostOS)', - }, - 'curr_value' => $svc_acct->cgp_timezone, - ) - %> - - <% include('/elements/tr-select.html', - 'label' => 'Layout', - 'field' => 'cgp_skinname', - 'options' => [ '', '***', 'GoldFleece', 'Skin2' ], - 'labels' => { - '' => 'default (***)', - }, - 'curr_value' => $svc_acct->cgp_skinname, - ) - %> - - <% include('/elements/tr-select.html', - 'label' => 'Pronto style', - 'field' => 'cgp_prontoskinname', - 'options' => [ '', 'Pronto', 'Pronto-darkflame', 'Pronto-steel', 'Pronto-twilight', ], - - 'curr_value' => $svc_acct->cgp_prontoskinname, - ) - %> - - <% include('/elements/tr-select.html', - 'label' => 'Send read receipts', - 'field' => 'cgp_sendmdnmode', - 'options' => [ '', 'Never', 'Manually', 'Automatically' ], - 'labels' => { - '' => 'default (Automatically)', - }, - 'curr_value' => $svc_acct->cgp_language, - ) - %> - -%#XXX vacation message, redirect all mail, mail rules - -% } else { - -% for (qw( password_recover cgp_rulesallowed cgp_rpopallowed cgp_mailtoall -% cgp_addmailtrailer -% cgp_deletemode cgp_emptytrash cgp_language cgp_timezone -% cgp_skinname cgp_sendmdnmode -% ) ) { - - -% } - -% } - +<& svc_acct/communigate.html, + 'svc_acct' => $svc_acct, + 'part_svc' => $part_svc, + 'communigate' => $communigate, +&> % if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) { % } else { - IP + <% mt('IP') |h %> % } @@ -484,12 +270,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % my $tf = $uf . "_threshold"; % if ( $curuser->access_right('Edit usage') ) { - <% $label{$uf} %> remaining - (blank disables) + <% mt("[_1] remaining",$label{$uf}) |h %> + (<% mt('blank disables') |h %>) - <% $label{$uf} %> threshold - (blank disables) + <% mt("[_1] threshold",$label{$uf}) |h %> + (<% mt('blank disables') |h %>) % }else{ @@ -503,11 +289,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % % if ( $part_svc->part_svc_column($r)->columnflag =~ /^[FA]$/ ) { - % } else { - <% $FS::raddb::attrib{$a} %> @@ -516,39 +300,39 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %> % } - - RADIUS groups + <% mt('RADIUS groups') |h %> % if ( $part_svc->part_svc_column('usergroup')->columnflag eq 'F' ) { - <% join('', @groups) %> % } else { - <% FS::svc_acct::radius_usergroup_selector( \@groups ) %> % } - % foreach my $field ($svc_acct->virtual_fields) { % # If the flag is X, it won't even show up in $svc_acct->virtual_fields. % if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) { - <% $svc_acct->pvf($field)->widget('HTML', 'edit', $svc_acct->getfield($field)) %> % } % } - +% if ( $captcha_url ) { + +<% mt('Enter the word shown above:') |h %> + +% } + -<% include('/elements/footer.html') %> +<& /elements/footer.html &> <%init> @@ -689,4 +473,18 @@ sub max { (sort(@_))[-1] } +my $captcha_url; +my ($export_google) = $part_svc->part_export('acct_google'); +if ( $export_google ) { + my $error = $export_google->auth_error; + if ( $error ) { + if ( $error->{'captcha_url'} ) { + $captcha_url = $error->{'captcha_url'}; + } + else { + $cgi->param('error', $error->{'message'}); + } + } #if $error +} + %init>