' )
<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);
}
function filter_change() {
- window.location = '! . $cgi->self_url . qq!?classnum='
+ window.location = '<% $cgi->self_url %>?classnum='
+ document.getElementById('classnum').value;
}
</script>
% }
<% $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;
$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>