[freeside-commits] freeside/httemplate/edit/process REAL_cust_pkg.cgi, 1.10, 1.11 part_pkg.cgi, 1.38, 1.39 quick-cust_pkg.cgi, 1.13, 1.14
Ivan,,,
ivan at wavetail.420.am
Tue Jun 16 19:39:11 PDT 2009
Update of /home/cvs/cvsroot/freeside/httemplate/edit/process
In directory wavetail.420.am:/tmp/cvs-serv9378/httemplate/edit/process
Modified Files:
REAL_cust_pkg.cgi part_pkg.cgi quick-cust_pkg.cgi
Log Message:
finish up initial work on customer view tabs (ensure links back to customer view call include show=packages if default view isn't jumbo or packages already), RT#5586
Index: REAL_cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/REAL_cust_pkg.cgi,v
retrieving revision 1.10
retrieving revision 1.11
diff -u -d -r1.10 -r1.11
--- REAL_cust_pkg.cgi 13 Jan 2008 21:35:53 -0000 1.10
+++ REAL_cust_pkg.cgi 17 Jun 2009 02:39:09 -0000 1.11
@@ -3,12 +3,18 @@
<% $cgi->redirect(popurl(2). "REAL_cust_pkg.cgi?". $cgi->query_string ) %>
%} else {
% my $custnum = $new->custnum;
-<% $cgi->redirect(popurl(3). "view/cust_main.cgi?$custnum#cust_pkg$pkgnum" ) %>
+% my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
+% ? ''
+% : ';show=packages';
+% my $frag = "cust_pkg$pkgnum"; #hack for IE ignoring real #fragment
+<% $cgi->redirect(popurl(3). "view/cust_main.cgi?custnum=$custnum$show;fragment=$frag#$frag" ) %>
%}
<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Edit customer package dates');
+ unless $curuser->access_right('Edit customer package dates');
my $pkgnum = $cgi->param('pkgnum') or die;
my $old = qsearchs('cust_pkg',{'pkgnum'=>$pkgnum});
Index: part_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/part_pkg.cgi,v
retrieving revision 1.38
retrieving revision 1.39
diff -u -d -r1.38 -r1.39
--- part_pkg.cgi 8 Feb 2009 02:05:25 -0000 1.38
+++ part_pkg.cgi 17 Jun 2009 02:39:09 -0000 1.39
@@ -134,7 +134,13 @@
my $redirect_callback = sub {
#my( $cgi, $new ) = @_;
return '' unless $custnum;
- popurl(3). "view/cust_main.cgi?keywords=$custnum;dummy=";
+ my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
+ ? ''
+ : ';show=packages';
+ #my $frag = "cust_pkg$pkgnum"; #hack for IE ignoring real #fragment
+
+ #can we link back to the specific customized package? it would be nice...
+ popurl(3). "view/cust_main.cgi?custnum=$custnum$show;dummy=";
};
#these should probably move to @args above and be processed by part_pkg.pm...
Index: quick-cust_pkg.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/process/quick-cust_pkg.cgi,v
retrieving revision 1.13
retrieving revision 1.14
diff -u -d -r1.13 -r1.14
--- quick-cust_pkg.cgi 10 Jan 2009 00:43:06 -0000 1.13
+++ quick-cust_pkg.cgi 17 Jun 2009 02:39:09 -0000 1.14
@@ -3,12 +3,15 @@
<% $cgi->redirect(popurl(3). 'misc/order_pkg.html?'. $cgi->query_string ) %>
%} else {
% my $frag = "cust_pkg". $cust_pkg->pkgnum;
+% my $show = $curuser->default_customer_view =~ /^(jumbo|packages)$/
+% ? ''
+% : ';show=packages';
<% header('Package ordered') %>
<SCRIPT TYPE="text/javascript">
// XXX fancy ajax rebuild table at some point, but a page reload will do for now
// XXX chop off trailing #target and replace... ?
- window.top.location = '<% popurl(3). "view/cust_main.cgi?keywords=$custnum;fragment=$frag#$frag" %>';
+ window.top.location = '<% popurl(3). "view/cust_main.cgi?custnum=$custnum$show;fragment=$frag#$frag" %>';
</SCRIPT>
@@ -16,8 +19,10 @@
%}
<%init>
+my $curuser = $FS::CurrentUser::CurrentUser;
+
die "access denied"
- unless $FS::CurrentUser::CurrentUser->access_right('Order customer package');
+ unless $curuser->access_right('Order customer package');
#untaint custnum (probably not necessary, searching for it is escape enough)
$cgi->param('custnum') =~ /^(\d+)$/
More information about the freeside-commits
mailing list