X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fprovision_list.html;h=818cd9f35da2558303c45216e6bf05040620dc20;hp=0c8e050784f204a2efa5df392178e9e9af746257;hb=d7eafc9c9aae2bf47ea19a56cc5bb1380c5874e4;hpb=2041a9143fac20b79ead4a1ae01224dedf5b27c2 diff --git a/fs_selfservice/FS-SelfService/cgi/provision_list.html b/fs_selfservice/FS-SelfService/cgi/provision_list.html index 0c8e05078..818cd9f35 100644 --- a/fs_selfservice/FS-SelfService/cgi/provision_list.html +++ b/fs_selfservice/FS-SelfService/cgi/provision_list.html @@ -9,16 +9,30 @@ function areyousure(href, message) { -<%= foreach my $pkg ( - grep { scalar(@{$_->{part_svc}}) - || scalar(@{$_->{cust_svc}}) - } @cust_pkg +<%= + +foreach my $pkg ( + grep { scalar(@{$_->{part_svc}}) + || scalar(@{$_->{cust_svc}}) + } @cust_pkg ) { + my $susp = $pkg->{'susp'} || ''; + warn $pkg->{'pkg'}. ' '.$susp."\n"; + my @pkg_actions = ( [ 'customer_change_pkg' => 'change' ] ); + push @pkg_actions, [ 'process_suspend_pkg' => 'suspend' ] + if $self_suspend_reason and !$susp; + my $bgcolor = $susp ? '"#ff9900"' : '"#8888ff"'; $OUT .= #'
'. - ''; + ''; my $col1 = "ffffff"; my $col2 = "dddddd"; @@ -41,7 +55,7 @@ function areyousure(href, message) { #} unless ( $cust_svc->{'svcnum'} == $svcnum ) { - $OUT .= qq!(!. + $OUT .= qq!(!. 'delete)'; } @@ -75,7 +89,10 @@ function areyousure(href, message) { $OUT .= "$td COLSPAN=3 ALIGN=center>". qq!!. 'Setup '. $part_svc->{'svc'}. ' '. '('. $part_svc->{'num_avail'}. ' available)'. - ''; + '' + #self-service only supports these services so far + if grep { $part_svc->{'svcdb'} eq $_ } qw( svc_acct svc_external ); + $col = $col eq $col1 ? $col2 : $col1; }
'. - $pkg->{'pkg'}. - '
'. + $pkg->{'pkg'}. ($susp && ' (suspended)'). + ''; + foreach my $action (@pkg_actions) { + $OUT .= '(' . $action->[1] . ') '; + } + $OUT .= '