X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fedit%2Fsvc_acct.cgi;h=f1b8b800b3d6120be05abf387e898f9898f6d442;hp=c27bab88a06fb11f1ecc8f6418974b3f53f502c2;hb=eb9668a6f3181ee02cb335272c5ee4616e61fd09;hpb=ab6a6774557598dc7cdfc57c941a4bf48f3bb64a diff --git a/httemplate/edit/svc_acct.cgi b/httemplate/edit/svc_acct.cgi index c27bab88a..f1b8b800b 100755 --- a/httemplate/edit/svc_acct.cgi +++ b/httemplate/edit/svc_acct.cgi @@ -35,8 +35,6 @@ if ( $cgi->param('error') ) { } else { #adding - $svc_acct = new FS::svc_acct({}); - foreach $_ (split(/-/,$query)) { $pkgnum=$1 if /^pkgnum(\d+)$/; $svcpart=$1 if /^svcpart(\d+)$/; @@ -44,6 +42,8 @@ if ( $cgi->param('error') ) { $part_svc = qsearchs( 'part_svc', { 'svcpart' => $svcpart } ); die "No part_svc entry for svcpart $svcpart!" unless $part_svc; + $svc_acct = new FS::svc_acct({svcpart => $svcpart}); + $svcnum=''; #set gecos @@ -72,6 +72,12 @@ if ( $cgi->param('error') ) { } } + +#fixed radius groups always override & display +if ( $part_svc->part_svc_column('usergroup')->columnflag eq "F" ) { + @groups = split(',', $part_svc->part_svc_column('usergroup')->columnvalue); +} + my $action = $svcnum ? 'Edit' : 'Add'; my $svc = $part_svc->getfield('svc'); @@ -238,7 +244,16 @@ my($quota,$slipip)=( $svc_acct->slipip, ); -print qq!!; +if ( $part_svc->part_svc_column('quota')->columnflag eq "F" ) +{ + print qq!!; +} else { + print <Quota: + + +END +} if ( $part_svc->part_svc_column('slipip')->columnflag eq "F" ) { print qq!!; @@ -266,6 +281,14 @@ if ( $part_svc->part_svc_column('usergroup')->columnflag eq "F" ) { } print ''; +foreach my $field ($svc_acct->virtual_fields) { + if ( $part_svc->part_svc_column($field)->columnflag ne 'F' ) { + # If the flag is X, it won't even show up in $svc_acct->virtual_fields. + print $svc_acct->pvf($field)->widget('HTML', 'edit', + $svc_acct->getfield($field)); + } +} + #submit print qq!
!;