X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Fbrowse%2Fpart_pkg-fcc.html;h=9facd10dcff9adf7fc5aab09a33e2c3063450e39;hp=9462c324847881d4d9fbf51586fa13fa8ef643d5;hb=d7cf0d6bb3b81b1c91ef1bcc3252d56f96b65b0f;hpb=0f359d5480aa1621d73ee802f420e8951abc620d
diff --git a/httemplate/browse/part_pkg-fcc.html b/httemplate/browse/part_pkg-fcc.html
index 9462c3248..9facd10dc 100755
--- a/httemplate/browse/part_pkg-fcc.html
+++ b/httemplate/browse/part_pkg-fcc.html
@@ -3,14 +3,13 @@
'menubar' => \@menubar,
'html_init' => $html_init,
'html_form' => $html_form,
- 'html_posttotal' => $html_posttotal,
'name' => 'package definitions',
'disableable' => 1,
'disabled_statuspos' => 4,
'agent_virt' => 1,
'agent_null_right' => [ $edit, $edit_global ],
'agent_null_right_link' => $edit_global,
- 'agent_pos' => 6,
+ 'agent_pos' => 3,
'query' =>
{ 'select' => $select,
'table' => 'part_pkg',
@@ -39,6 +38,14 @@ my $acl_edit_global = $curuser->access_right($edit_global);
die "access denied"
unless $acl_edit || $acl_edit_global;
+if ( $cgi->param('redirect') ) {
+ my $session = $cgi->param('redirect');
+ my $pref = $curuser->option("redirect$session");
+ die "unknown redirect session $session\n" unless length($pref);
+ $cgi = new CGI($pref);
+ $cgi->param('redirect', $session);
+}
+
my $conf = new FS::Conf;
my $orderby = 'pkgpart';
@@ -88,22 +95,8 @@ my $select = join(',',
my $addl_from =
FS::Report::FCC_477::join_optionnames(@optionnames);
-#restore this so pagination works
$cgi->param('classnum', $classnum) if length($classnum);
-#should hide this if there aren't any classes
-my $html_posttotal =
- "
( show class: ".
- include('/elements/select-pkg_class.html',
- #'curr_value' => $classnum,
- 'value' => $classnum, #insist on 0 :/
- 'onchange' => 'filter_change()',
- 'pre_options' => [ '-1' => 'all',
- '0' => '(none)', ],
- 'disable_empty' => 1,
- ).
- ' )';
-
my $link = [ $p.'edit/part_pkg.cgi?', 'pkgpart' ];
my @header = ( '#', 'Package', 'Comment' );
@@ -176,24 +169,42 @@ $extra_count = ( $count_extra_sql ? ' AND ' : ' WHERE ' ). $extra_count
if $extra_count;
my $count_query = "SELECT COUNT(*) FROM part_pkg $count_extra_sql $extra_count";
+# in case of error redirect
+if ( $cgi->param('redirect') ) {
+ push @header, '';
+ push @fields, sub {
+ my $part_pkg = shift;
+ my $pkgpart = $part_pkg->pkgpart;
+ '' . $cgi->param("error$pkgpart") || '' . ''
+ };
+ $align .= 'l';
+}
+
my $html_init =
include('/elements/init_overlib.html') .
include('/elements/input-fcc_options.html', js_only => 1) .
include('.style');
-my $html_form = '';
-my $html_foot = '';
-# insert a checkbox column
-unshift @header, '';
-unshift @fields, sub {
- '';
-};
-unshift @links, '';
-$align = 'c'.$align;
-
+my $html_form = qq!