[freeside-commits] freeside/httemplate/edit/process svc_phone.html, 1.6, 1.7

Ivan,,, ivan at wavetail.420.am
Tue Aug 9 22:22:34 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv18995/httemplate/edit/process

Modified Files:
	svc_phone.html 
Log Message:
multiple DID provisioning, RT#13721

Index: svc_phone.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/svc_phone.html,v
retrieving revision 1.6
retrieving revision 1.7
diff -u -w -d -r1.6 -r1.7
--- svc_phone.html	10 Jan 2011 19:44:43 -0000	1.6
+++ svc_phone.html	10 Aug 2011 05:22:31 -0000	1.7
@@ -1,13 +1,32 @@
-<% include( 'elements/svc_Common.html',
+<& elements/svc_Common.html,
                'table'    => 'svc_phone',
                'args_callback' => $args_callback,
 	       'value_callback' => $value_callback,
-           )
-%>
+               %opt,
+&>
 <%init>
 
+my %opt = ();
+if ( $cgi->param('bulk') ) {
+  $opt{'bulk'}     = 'phonenum';
+
+  my $cust_pkg = qsearchs('cust_pkg', { pkgnum=>scalar($cgi->param('pkgnum')) })
+    or die "unknown pkgnum";
+  my $custnum = $cust_pkg->custnum;
+
+  my $show =
+    $FS::CurrentUser::CurrentUser->default_customer_view =~ /^(jumbo|packages)$/
+      ? ''
+      : ';show=packages';
+  #my $frag = "cust_pkg$pkgnum"; #hack for IE ignoring real #fragment
+  $opt{'redirect'}= popurl(3)."view/cust_main.cgi?custnum=$custnum$show;dummy=";
+}
+
+my $right = $opt{'bulk'} ? 'Bulk provision customer service'
+                         :      'Provision customer service';
+
 die "access denied"
-  unless $FS::CurrentUser::CurrentUser->access_right('Provision customer service'); #something else more specific?
+  unless $FS::CurrentUser::CurrentUser->access_right($right);
 
 my $tollfreephonenum = $cgi->param('tollfreephonenum');
 $cgi->param('phonenum',$tollfreephonenum) if $tollfreephonenum =~ /^\d+$/;



More information about the freeside-commits mailing list