[freeside-commits] freeside/fs_selfservice/FS-SelfService/cgi provision_list.html, 1.5, 1.6 selfservice.cgi, 1.46, 1.47 process_suspend_pkg.html, NONE, 1.1
Mark Wells
mark at wavetail.420.am
Mon Nov 22 17:39:03 PST 2010
Update of /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi
In directory wavetail.420.am:/tmp/cvs-serv9277/fs_selfservice/FS-SelfService/cgi
Modified Files:
provision_list.html selfservice.cgi
Added Files:
process_suspend_pkg.html
Log Message:
selfservice command to suspend packages, RT#9989
Index: selfservice.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/selfservice.cgi,v
retrieving revision 1.46
retrieving revision 1.47
diff -u -w -d -r1.46 -r1.47
--- selfservice.cgi 22 Sep 2010 19:16:18 -0000 1.46
+++ selfservice.cgi 23 Nov 2010 01:39:01 -0000 1.47
@@ -14,7 +14,7 @@
payment_info process_payment realtime_collect process_prepay
list_pkgs order_pkg signup_info order_recharge
part_svc_info provision_acct provision_external
- unprovision_svc change_pkg domainselector
+ unprovision_svc change_pkg suspend_pkg domainselector
list_svcs list_svc_usage list_cdr_usage list_support_usage
myaccount_passwd
mason_comp
@@ -73,7 +73,7 @@
#order|pw_list XXX ???
$cgi->param('action') =~
- /^(myaccount|view_invoice|make_payment|make_ach_payment|make_term_payment|make_thirdparty_payment|payment_results|ach_payment_results|recharge_prepay|recharge_results|logout|change_bill|change_ship|change_pay|process_change_bill|process_change_ship|process_change_pay|customer_order_pkg|process_order_pkg|customer_change_pkg|process_change_pkg|process_order_recharge|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|view_usage|view_usage_details|view_cdr_details|view_support_details|change_password|process_change_password)$/
+ /^(myaccount|view_invoice|make_payment|make_ach_payment|make_term_payment|make_thirdparty_payment|payment_results|ach_payment_results|recharge_prepay|recharge_results|logout|change_bill|change_ship|change_pay|process_change_bill|process_change_ship|process_change_pay|customer_order_pkg|process_order_pkg|customer_change_pkg|process_change_pkg|process_order_recharge|provision|provision_svc|process_svc_acct|process_svc_external|delete_svc|view_usage|view_usage_details|view_cdr_details|view_support_details|change_password|process_change_password|customer_suspend_pkg|process_suspend_pkg)$/
or die "unknown action ". $cgi->param('action');
my $action = $1;
@@ -329,6 +329,24 @@
}
+sub process_suspend_pkg {
+ my $results = '';
+ $results = suspend_pkg (
+ 'session_id' => $session_id,
+ map { $_ => $cgi->param($_) }
+ qw( pkgnum )
+ );
+ if ( $results->{'error'} ) {
+ $action = 'provision';
+ return {
+ 'error' => '<FONT COLOR="#FF0000">'. $results->{'error'}. '</FONT>',
+ }
+ }
+ else {
+ return $results;
+ }
+}
+
sub process_order_recharge {
my $results = '';
--- NEW FILE: process_suspend_pkg.html ---
<%= $url = "$selfurl?session=$session_id;action="; ''; %>
<%= include('header', 'Package suspended') %>
<%= include('footer') %>
Index: provision_list.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/fs_selfservice/FS-SelfService/cgi/provision_list.html,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -w -d -r1.5 -r1.6
--- provision_list.html 5 Jan 2007 05:19:35 -0000 1.5
+++ provision_list.html 23 Nov 2010 01:39:01 -0000 1.6
@@ -9,18 +9,30 @@
<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">
-<%= foreach my $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 .= #'<TABLE BORDER=0 CELLSPACING=0 CELLPADDING=2 BGCOLOR="#ffffff">'.
- '<TR><TH BGCOLOR="#6666ff" COLSPAN=2>'.
- $pkg->{'pkg'}. '</TH><TH BGCOLOR="#6666ff" >' .
- qq!(<A style="font-size: smaller;color: #000000" HREF="! .
- qq!${url}customer_change_pkg;pkgnum=$pkg->{'pkgnum'};pkg=$pkg->{'pkg'}">! .
- 'change</A>)</TH></TR>';
+ '<TR><TH BGCOLOR='.$bgcolor.' COLSPAN=2>'.
+ $pkg->{'pkg'}. ($susp && ' (suspended)').
+ '</TH><TH ALIGN="left" BGCOLOR='.$bgcolor.'>';
+ foreach my $action (@pkg_actions) {
+ $OUT .= '(<A style="font-size: smaller;color: #000000" HREF="' .
+ $url . $action->[0] . ';pkgnum=' . $pkg->{'pkgnum'} . ';pkg=' .
+ $pkg->{'pkg'} . '">' . $action->[1] . '</A>) ';
+ }
+ $OUT .= '</TH></TR>';
my $col1 = "ffffff";
my $col2 = "dddddd";
More information about the freeside-commits
mailing list