X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fprovision_list.html;h=22054e6445afba8164f0c40f5ca5f780693cb2ac;hp=0c8e050784f204a2efa5df392178e9e9af746257;hb=5d5e7f7248d786938c08c867c9ad8f855f92c532;hpb=b8cfd0780aa40bb07f3215bf9cb58011f5e32a35 diff --git a/fs_selfservice/FS-SelfService/cgi/provision_list.html b/fs_selfservice/FS-SelfService/cgi/provision_list.html index 0c8e05078..22054e644 100644 --- a/fs_selfservice/FS-SelfService/cgi/provision_list.html +++ b/fs_selfservice/FS-SelfService/cgi/provision_list.html @@ -1,24 +1,31 @@ Setup services

- - -<%= 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"; @@ -32,6 +39,14 @@ function areyousure(href, message) { "$td>". $cust_svc->{label}[1]. ''; $OUT .= '
password: '. encode_entities($cust_svc->{_password}). '' if exists($cust_svc->{_password}); + if ( exists($cust_svc->{svchash}) ) { + $OUT .= '
Email: '. encode_entities($cust_svc->{svchash}->{email}). '' + if exists($cust_svc->{svchash}->{email}) + && length($cust_svc->{svchash}->{email}); + $OUT .= '
Forward to: '. encode_entities($cust_svc->{svchash}->{forwarddst}). '' + if exists($cust_svc->{svchash}->{forwarddst}) + && length($cust_svc->{svchash}->{forwarddst}); + } $OUT .= ''. "$td>"; @@ -41,9 +56,10 @@ function areyousure(href, message) { #} unless ( $cust_svc->{'svcnum'} == $svcnum ) { - $OUT .= qq!(!. + $OUT .= qq!(!. 'delete)'; - + $OUT .= qq!
(modify)! + if ( exists($cust_svc->{svchash}) && $cust_svc->{label}[2] eq 'svc_phone' ); } $OUT .= '
'; $col = $col eq $col1 ? $col2 : $col1; @@ -75,7 +91,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 .= '