2 % $cgi->param('error', $error);
3 <% $cgi->redirect(popurl(3).'/edit/bulk-part_pkg.cgi?', $cgi->query_string) %>
5 <% $cgi->redirect(popurl(3).'/browse/part_pkg.cgi') %>
8 die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('Bulk edit package definitions');
10 my @pkgparts = $cgi->param('pkgpart')
11 or die "no package definitions selected";
14 foreach my $param (grep { /^report_option_\d+$/ } $cgi->param) {
15 if ( length($cgi->param($param)) ) {
16 if ( $cgi->param($param) == 1 ) {
19 $changes{$param} = '';
25 foreach my $pkgpart (@pkgparts) {
26 my $part_pkg = FS::part_pkg->by_key($pkgpart);
27 my %options = ( $part_pkg->options, %changes );
28 $error ||= $part_pkg->replace( options => \%options );