X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fprovision_list.html;h=086c79e57e9067bacb156f3fdf4cf7b7b06d13b1;hb=877a4eb85cb847bd314d6a9192fedb1dc35c5d02;hp=88d1c848be27743ab124fe0605a658069a5ff5ea;hpb=5e05724a635a22776f1b973f5d7e77989da4e048;p=freeside.git diff --git a/fs_selfservice/FS-SelfService/cgi/provision_list.html b/fs_selfservice/FS-SelfService/cgi/provision_list.html index 88d1c848b..086c79e57 100644 --- a/fs_selfservice/FS-SelfService/cgi/provision_list.html +++ b/fs_selfservice/FS-SelfService/cgi/provision_list.html @@ -1,26 +1,34 @@ 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'} || ''; + my @pkg_actions = (); + if ( ! $susp ) { + push @pkg_actions, [ 'customer_change_pkg' => 'change' ] unless $pkg->{'immutable'}; + push @pkg_actions, [ 'process_suspend_pkg' => 'suspend' ] + if $self_suspend_reason; + } + + my $bgcolor = $susp ? '"#ff9900"' : '"#8888ff"'; $OUT .= #'
'. - ''; + ''; my $col1 = "ffffff"; my $col2 = "dddddd"; @@ -34,6 +42,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>"; @@ -45,7 +61,8 @@ function areyousure(href, message) { unless ( $cust_svc->{'svcnum'} == $svcnum ) { $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; @@ -79,7 +96,7 @@ function areyousure(href, message) { '('. $part_svc->{'num_avail'}. ' available)'. '' #self-service only supports these services so far - if grep { $part_svc->{'svcdb'} eq $_ } qw( svc_acct svc_external ); + if grep { $part_svc->{'svcdb'} eq $_ } qw( svc_acct svc_external svc_forward ); $col = $col eq $col1 ? $col2 : $col1; }
'. - $pkg->{'pkg'}. '' . - qq!(! . - 'change)
'. + $pkg->{'pkg'}. ($susp && ' (suspended)'). + ''; + foreach my $action (@pkg_actions) { + $OUT .= '(' . $action->[1] . ') '; + } + $OUT .= '