$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,33 +52,30 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
%if ( $part_svc->part_svc_column('_password')->columnflag ne 'F' ) {
- Password |
+ <% mt('Password') |h %> |
MAXLENGTH=<% $pmax %>>
-
+
|
%}else{
%}
-
+
%
%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 %> |
|
% }
-%
+
+
+% if ( $communigate ) {
+
+
+ <% mt('Aliases') |h %> |
+ |
+
+
+% } else {
+
+% }
+
+
+<& /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) %> |
% }
@@ -147,7 +164,6 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
%
% if ( length($svc_acct->$xid()) ) {
-
<% uc($xid) %> |
<% $svc_acct->$xid() %> |
@@ -155,11 +171,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% }
-
% } else {
-
<% uc($xid) %> |
@@ -175,13 +189,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% && ! $svc_acct->finger ) {
%
-
% } else {
- Real Name |
+ <% mt('Real Name') |h %> |
|
@@ -199,7 +212,7 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
- Home directory |
+ <% mt('Home directory') |h %> |
|
% }
@@ -211,13 +224,12 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
% ) {
%
-
% } else {
- Shell |
+ <% mt('Shell') |h %> |
|
% }
-% if ( $part_svc->part_svc_column('quota')->columnflag eq 'F' ) {
-
-
-
-% } else {
+<& svc_acct/communigate.html,
+ 'svc_acct' => $svc_acct,
+ 'part_svc' => $part_svc,
+ 'communigate' => $communigate,
+&>
-
- Quota: |
- |
-
-% }
% if ( $part_svc->part_svc_column('slipip')->columnflag =~ /^[FA]$/ ) {
-
-
% } else {
-
-
- IP |
+ <% mt('IP') |h %> |
|
% }
-%
+
% my %label = ( seconds => 'Time',
% upbytes => 'Upload bytes',
% downbytes => 'Download bytes',
@@ -268,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{
@@ -287,11 +289,9 @@ Service # <% $svcnum ? "$svcnum" : " (NEW)" %>
%
% if ( $part_svc->part_svc_column($r)->columnflag =~ /^[FA]$/ ) {
-
% } else {
-
<% $FS::raddb::attrib{$a} %> |
|
@@ -300,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>
@@ -367,9 +367,11 @@ if ( $cgi->param('error') ) {
$part_svc=qsearchs('part_svc',{'svcpart'=>$svcpart});
die "No part_svc entry!" unless $part_svc;
- $svc_acct = new FS::svc_acct({svcpart => $svcpart});
+ $svc_acct = new FS::svc_acct({svcpart => $svcpart});
+
+ $svcnum='';
- $svcnum='';
+ $svc_acct->password_recover('Y'); #default. hmm.
} else { #editing
@@ -392,6 +394,9 @@ if ( $cgi->param('error') ) {
}
+my $communigate = scalar($part_svc->part_export('communigate_pro'));
+ # || scalar($part_svc->part_export('communigate_pro_singledomain'));
+
my( $cust_pkg, $cust_main ) = ( '', '' );
if ( $pkgnum ) {
$cust_pkg = qsearchs('cust_pkg', { 'pkgnum' => $pkgnum } );
@@ -440,22 +445,17 @@ my $svc = $part_svc->getfield('svc');
my $otaker = getotaker;
my $username = $svc_acct->username;
-my $password;
-my $password_encryption = $svc_acct->_password_encryption;
-my $password_encoding = $svc_acct->_password_encoding;
-
-if($svcnum) {
- if($password = $svc_acct->get_cleartext_password) {
- if (! $conf->exists('showpasswords')) {
- $password = '*HIDDEN*';
- }
- }
- elsif($svc_acct->_password and $password_encryption ne 'plain') {
+
+my $password = '';
+if ( $cgi->param('error') ) {
+ $password = $cgi->param('clear_password');
+} elsif ( $svcnum ) {
+ my $password_encryption = $svc_acct->_password_encryption;
+ if ( $password = $svc_acct->get_cleartext_password ) {
+ $password = '*HIDDEN*' unless $conf->exists('showpasswords');
+ } elsif( $svc_acct->_password and $password_encryption ne 'plain' ) {
$password = "(".uc($password_encryption)." encrypted)";
}
- else {
- $password = '';
- }
}
my $ulen =
@@ -473,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>