From a3b7282fda1955c41e97b619ba4e27af39e8afaf Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Fri, 21 Nov 2014 16:32:37 -0800 Subject: [PATCH] fix several UI nits in FCC 477 report configuration, #24047 --- FS/FS/Report/FCC_477.pm | 4 +- httemplate/browse/part_pkg-fcc.html | 33 ++++++---- httemplate/edit/part_pkg.cgi | 5 ++ httemplate/edit/process/bulk-part_pkg-fcc.html | 6 +- httemplate/elements/input-fcc_options.html | 3 +- httemplate/elements/tr-input-fcc_options.html | 89 +------------------------- httemplate/misc/part_pkg_fcc_options.html | 3 +- httemplate/search/477.html | 2 +- 8 files changed, 38 insertions(+), 107 deletions(-) diff --git a/FS/FS/Report/FCC_477.pm b/FS/FS/Report/FCC_477.pm index ff29d1953..f5d6a06ec 100644 --- a/FS/FS/Report/FCC_477.pm +++ b/FS/FS/Report/FCC_477.pm @@ -4,14 +4,13 @@ use base qw( FS::Report ); use strict; use vars qw( @upload @download @technology @part2aoption @part2boption %states - $DEBUG ); use FS::Record qw( dbh ); use Tie::IxHash; use Storable; -$DEBUG = 0; +our $DEBUG = 0; =head1 NAME @@ -305,6 +304,7 @@ sub report { unless $class->can($method); my $statement = $class->$method(%opt); + warn $statement if $DEBUG; my $sth = dbh->prepare($statement); $sth->execute or die $sth->errstr; $sth->fetchall_arrayref; diff --git a/httemplate/browse/part_pkg-fcc.html b/httemplate/browse/part_pkg-fcc.html index e3fd97ccf..bdfb99a59 100755 --- a/httemplate/browse/part_pkg-fcc.html +++ b/httemplate/browse/part_pkg-fcc.html @@ -180,9 +180,11 @@ if ( $cgi->param('redirect') ) { 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!
+my $html_form = qq! + ( show class: !. include('/elements/select-pkg_class.html', #'curr_value' => $classnum, @@ -193,20 +195,13 @@ my $html_form = qq! 1, ). ' ) -

' . - qq!!; +

'; + # restore this only after creating $html_form $cgi->param('classnum', $classnum) if length($classnum); -my $html_foot = qq! - -
!; +my $html_foot = ''; my @menubar = ( 'Package definitions' => $p.'browse/part_pkg.cgi' ); @@ -224,3 +219,17 @@ my @menubar = } +<%def .script> + + diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi index 5e42687f9..dca5b3943 100755 --- a/httemplate/edit/part_pkg.cgi +++ b/httemplate/edit/part_pkg.cgi @@ -805,6 +805,11 @@ my $javascript = <<'END'; } } + function finish_edit_fcc(id) { + cClick(); + show_fcc_options(id); // refresh the display + } + END my $warning = diff --git a/httemplate/edit/process/bulk-part_pkg-fcc.html b/httemplate/edit/process/bulk-part_pkg-fcc.html index 4a0fb2a22..8ef330829 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) %> +<% $cgi->redirect($fsurl.'browse/part_pkg-fcc.html?classnum='.$classnum.$jump) %> % } <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -40,4 +40,8 @@ foreach my $param ($cgi->param) { my $classnum = $cgi->param('classnum'); +my $jump = ''; +if ( $cgi->param('jump') =~ /^pkgpart(\d+)$/ ) { + $jump = '#'.$1; +} diff --git a/httemplate/elements/input-fcc_options.html b/httemplate/elements/input-fcc_options.html index fb2500fa5..064c647fc 100644 --- a/httemplate/elements/input-fcc_options.html +++ b/httemplate/elements/input-fcc_options.html @@ -80,7 +80,8 @@ function show_fcc_options(id) { } } // is_phone if ( curr_values['is_voip'] ) { - out += '
  • VoIP telephone service
  • '; + out += '
  • VoIP telephone service over ' + + media + '
  • '; out += '
  • ' + curr_values['voip_sessions'] + ' sessions allowed
  • '; if ( curr_values['voip_lastmile'] ) { diff --git a/httemplate/elements/tr-input-fcc_options.html b/httemplate/elements/tr-input-fcc_options.html index 87117ef1e..1f63588ad 100644 --- a/httemplate/elements/tr-input-fcc_options.html +++ b/httemplate/elements/tr-input-fcc_options.html @@ -7,96 +7,9 @@ - <& hidden.html, 'id' => $id, @_ &> -%# <& input-text.html, 'id' => $id, @_ &> # XXX debugging - - -% # show some kind of useful summary of the FCC options here + <& input-fcc_options.html, 'id' => $id, @_ &> - <%init> my %opt = @_; my $id = $opt{id} || $opt{field}; diff --git a/httemplate/misc/part_pkg_fcc_options.html b/httemplate/misc/part_pkg_fcc_options.html index 27b45e003..0db4e2503 100644 --- a/httemplate/misc/part_pkg_fcc_options.html +++ b/httemplate/misc/part_pkg_fcc_options.html @@ -156,8 +156,7 @@ function save_changes() { } parent_input.value = JSON.stringify(data); // update the display - parent.show_fcc_options(parent_input.id); - parent.cClick(); //overlib + parent.finish_edit_fcc(parent_input.id); } function enable_fieldset(fieldset_id) { diff --git a/httemplate/search/477.html b/httemplate/search/477.html index 244bfa1df..ff2ac8638 100644 --- a/httemplate/search/477.html +++ b/httemplate/search/477.html @@ -212,7 +212,7 @@ my $part_titles = FS::Report::FCC_477->parts; <%def .header_voip> - State + State VoIP OTT VoIP Non-OTT -- 2.11.0