'disableable' => 1,
'disabled_statuspos' => 4,
'agent_virt' => 1,
- 'agent_null_right' => [ $edit, $edit_global ],
- 'agent_null_right_link' => $edit_global,
+ 'agent_null_right' => $edit_global,
'agent_pos' => 3,
'query' =>
{ 'select' => $select,
my $curuser = $FS::CurrentUser::CurrentUser;
-my $edit = 'Edit package definitions';
-my $edit_global = 'Edit global package definitions';
+my $edit = 'Edit FCC report configuration';
+my $edit_global = 'Edit FCC report configuration for all agents';
my $acl_edit = $curuser->access_right($edit);
my $acl_edit_global = $curuser->access_right($edit_global);
my $addl_from =
FS::Report::FCC_477::join_optionnames(@optionnames);
-$cgi->param('classnum', $classnum) if length($classnum);
-
my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];
my @header = ( '#', 'Package', 'Comment' );
my $html_init =
include('/elements/init_overlib.html') .
include('/elements/input-fcc_options.html', js_only => 1) .
- include('.style');
+ include('.style') .
+ include('.script');
-my $html_form = qq!<FORM ACTION="${p}edit/process/bulk-part_pkg-fcc.html" METHOD="POST">
+my $html_form = qq!<FORM ACTION="${p}edit/process/bulk-part_pkg-fcc.html" METHOD="POST" NAME="bulk-part_pkg-fcc">
+ <INPUT TYPE="hidden" NAME="jump">
( show class: !.
include('/elements/select-pkg_class.html',
#'curr_value' => $classnum,
'disable_empty' => 1,
).
' )
- <BR><BR>' .
- qq!<SCRIPT TYPE="text/javascript">
- function filter_change() {
- window.location = '! . $cgi->self_url . qq!?classnum='
- + document.getElementById('classnum').value;
- }
- </SCRIPT>!;
+ <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">!;
+}
-my $html_foot = qq!
- <INPUT TYPE="submit" VALUE="Save changes">
- </FORM>!;
+# restore this only after creating $html_form
+$cgi->param('classnum', $classnum) if length($classnum);
+
+my $html_foot = '</FORM>';
my @menubar =
( 'Package definitions' => $p.'browse/part_pkg.cgi' );
}
</style>
</%def>
+<%def .script>
+<script type="text/javascript">
+ function finish_edit_fcc(id) {
+ cClick();
+ document.forms['bulk-part_pkg-fcc']['jump'].value = id;
+ document.forms['bulk-part_pkg-fcc'].submit(); //immediately save/refresh
+ }
+
+ function filter_change() {
+ window.location = '<% $cgi->self_url %>?classnum='
+ + document.getElementById('classnum').value;
+ }
+</script>
+</%def>