diff options
author | Mark Wells <mark@freeside.biz> | 2015-02-18 15:50:51 -0800 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2015-02-18 15:50:51 -0800 |
commit | 53a39f74f4735253591e6df083522b3a3bbacd6d (patch) | |
tree | 4cff541f1f151787935effc23fea58355dd09ae3 | |
parent | e11f3188435b30c193fd1443913ed77953e14dea (diff) |
in FCC options editor, jump back to correct page after submitting, #32638
-rwxr-xr-x | httemplate/browse/part_pkg-fcc.html | 9 | ||||
-rw-r--r-- | httemplate/edit/process/bulk-part_pkg-fcc.html | 12 |
2 files changed, 16 insertions, 5 deletions
diff --git a/httemplate/browse/part_pkg-fcc.html b/httemplate/browse/part_pkg-fcc.html index bdfb99a59..69e7d8f31 100755 --- a/httemplate/browse/part_pkg-fcc.html +++ b/httemplate/browse/part_pkg-fcc.html @@ -197,6 +197,13 @@ my $html_form = qq!<FORM ACTION="${p}edit/process/bulk-part_pkg-fcc.html" METHOD ' ) <BR><BR>'; +# pass the page selection through so we can jump back to the current spot +if ( $cgi->param('maxrecords') =~ /^(\d+)$/ ) { + $html_form .= qq!<INPUT TYPE="hidden" NAME="maxrecords" VALUE="$1">!; +} +if ( $cgi->param('offset') =~ /^(\d+)$/ ) { + $html_form .= qq!<INPUT TYPE="hidden" NAME="offset" VALUE="$1">!; +} # restore this only after creating $html_form $cgi->param('classnum', $classnum) if length($classnum); @@ -228,7 +235,7 @@ my @menubar = } function filter_change() { - window.location = '! . $cgi->self_url . qq!?classnum=' + window.location = '<% $cgi->self_url %>?classnum=' + document.getElementById('classnum').value; } </script> diff --git a/httemplate/edit/process/bulk-part_pkg-fcc.html b/httemplate/edit/process/bulk-part_pkg-fcc.html index 8ef330829..d060a242e 100644 --- a/httemplate/edit/process/bulk-part_pkg-fcc.html +++ b/httemplate/edit/process/bulk-part_pkg-fcc.html @@ -17,7 +17,7 @@ % } <% $cgi->redirect($fsurl.'browse/part_pkg-fcc.html?redirect='.$session) %> % } else { -<% $cgi->redirect($fsurl.'browse/part_pkg-fcc.html?classnum='.$classnum.$jump) %> +<% $cgi->redirect($dest) %> % } <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -38,10 +38,14 @@ foreach my $param ($cgi->param) { $error{$pkgpart} = $error if $error; } -my $classnum = $cgi->param('classnum'); +my $dest = $fsurl.'browse/part_pkg-fcc.html?'; +foreach (qw(classnum maxrecords offset)) { + if ( $cgi->param($_) =~ /^(\d+)$/ ) { + $dest .= "$_=$1;"; + } +} -my $jump = ''; if ( $cgi->param('jump') =~ /^pkgpart(\d+)$/ ) { - $jump = '#'.$1; + $dest .= "#$1"; } </%init> |