X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=fs_selfservice%2FFS-SelfService%2Fcgi%2Fprovision_list.html;h=2a3a8e9090c883c3ca0014b6daf03a9f5fc43a73;hb=a60615bf7bde77aa2b9faf3fc268c149eecdb5ab;hp=7e7059388a7a3d768b036a76e5230cfe2196969c;hpb=0cbeb01df08457b056a7ae775b4924c266b4228b;p=freeside.git
diff --git a/fs_selfservice/FS-SelfService/cgi/provision_list.html b/fs_selfservice/FS-SelfService/cgi/provision_list.html
index 7e7059388..2a3a8e909 100644
--- a/fs_selfservice/FS-SelfService/cgi/provision_list.html
+++ b/fs_selfservice/FS-SelfService/cgi/provision_list.html
@@ -1,24 +1,30 @@
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 = ( [ 'customer_change_pkg' => 'change' ] );
+ push @pkg_actions, [ 'process_suspend_pkg' => 'suspend' ]
+ if $self_suspend_reason and !$susp;
+ my $bgcolor = $susp ? '"#ff9900"' : '"#8888ff"';
$OUT .= #''.
- ''.
- $pkg->{'pkg'}.
- ' |
';
+ ''.
+ $pkg->{'pkg'}. ($susp && ' (suspended)').
+ ' | ';
+ foreach my $action (@pkg_actions) {
+ $OUT .= '(' . $action->[1] . ') ';
+ }
+ $OUT .= ' |
';
my $col1 = "ffffff";
my $col2 = "dddddd";
@@ -32,6 +38,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 +55,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;
@@ -58,11 +73,27 @@ function areyousure(href, message) {
my $td = qq!{'svcdb'} eq 'svc_external'
+ #&& $conf->exists('svc_external-skip_manual')
+ ) {
+ $link = "${url}process_svc_external;".
+ "pkgnum=$pkg->{'pkgnum'};".
+ "svcpart=$part_svc->{'svcpart'}";
+ } else {
+ $link = "${url}provision_svc;".
+ "pkgnum=$pkg->{'pkgnum'};".
+ "svcpart=$part_svc->{'svcpart'}";
+ }
+
$OUT .= " | $td COLSPAN=3 ALIGN=center>".
- qq!!.
- 'Setup '. $part_svc->{'svc'}. ' '.
+ 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;
}