X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_477.html;h=b842b1f3f8509de47fd3593582fd4e605728c185;hb=59c29eed0653360378f9c5428c1c3c5833c3b387;hp=7ac497a112fade8b1e3a7536e3921a9a061eba88;hpb=b5c4237a34aef94976bc343c8d9e138664fc3984;p=freeside.git diff --git a/httemplate/search/report_477.html b/httemplate/search/report_477.html index 7ac497a11..b842b1f3f 100755 --- a/httemplate/search/report_477.html +++ b/httemplate/search/report_477.html @@ -17,8 +17,20 @@ ) %> +% # not tr-select-state, we only want to choose from among those that +% # have customers + <& /elements/tr-select-table.html, + 'label' => 'State', + 'field' => 'state', + 'table' => 'cust_location', + 'name_col' => 'state', + 'value_col' => 'state', + 'disable_empty' => 1, + 'records' => \@states, + &> + <% include( '/elements/tr-select-pkg_class.html', - 'pre_options' => [ '0' => 'all' ], + 'multiple' => 1, 'empty_label' => '(empty class)', ) %> @@ -33,19 +45,30 @@ element.style.display = 'none'; } } + function toggleV() { + document.getElementById('enableV').disabled = + ! (document.getElementById('enableIIA').checked || + document.getElementById('enableIIB').checked); + } + function toggleVI() { + document.getElementById('enableVI').disabled = + ! document.getElementById('enableIA').checked; + } <% include( '/elements/tr-checkbox.html', 'label' => 'Enable part IA?', 'field' => 'part', + 'id' => 'enableIA', 'value' => 'IA', - 'onchange' => 'partchange(this)', + 'onchange' => 'partchange(this); toggleVI();', ) %> Part IA
Download speeds +% my $i = 0; % foreach my $speed ( @FS::Report::FCC_477::download ) { @@ -56,14 +79,18 @@ 'hashref' => { 'disabled' => '' }, 'element_name' => 'part1_column_option', 'disable_empty' => 1, + 'curr_value' => + FS::Report::FCC_477::restore_fcc477map("part1_column_option_$i"), ) %> +% $i++ % }
<% $speed %>
Upload speeds +% $i = 0; % foreach my $speed ( @FS::Report::FCC_477::upload ) { @@ -74,15 +101,18 @@ 'hashref' => { 'disabled' => '' }, 'element_name' => 'part1_row_option', 'disable_empty' => 1, + 'curr_value' => + FS::Report::FCC_477::restore_fcc477map("part1_row_option_$i"), ) %> +% $i++ % }
<% $speed %>
Technologies -% my $i = 0; +% $i = 0; % foreach my $tech ( @FS::Report::FCC_477::technology ) { @@ -93,6 +123,8 @@ 'hashref' => { 'disabled' => '' }, 'element_name' => "part1_technology_option_$i", 'empty_label' => '(omit)', + 'curr_value' => + FS::Report::FCC_477::restore_fcc477map("part1_technology_option_$i"), ) %> @@ -105,12 +137,14 @@ <% include( '/elements/tr-checkbox.html', 'label' => 'Enable part IIA?', 'field' => 'part', + 'id' => 'enableIIA', 'value' => 'IIA', - 'onchange' => 'partchange(this)', + 'onchange' => 'partchange(this); toggleV();', ) %> <% include( '/elements/tr-checkbox.html', 'label' => 'Enable part IIB?', 'field' => 'part', + 'id' => 'enableIIB', 'value' => 'IIB', - 'onchange' => 'partchange(this)', + 'onchange' => 'partchange(this); toggleV();', ) %> <% include( '/elements/tr-checkbox.html', 'label' => 'Enable part IV?', 'field' => 'part', + 'id' => 'enableIV', #unused 'value' => 'IV', 'onchange' => 'partchange(this)', ) @@ -175,16 +218,41 @@ 'label' => 'Enable part V?', 'field' => 'part', 'value' => 'V', + 'id' => 'enableV', + 'onchange' => 'partchange(this)', + 'postfix' => + ' (requires Part IIA or IIB)', ) %> + + + + + <% include( '/elements/tr-checkbox.html', 'label' => 'Enable part VI?', 'field' => 'part', + 'id' => 'enableVI', 'value' => 'VI_census', + 'postfix' => + ' (requires part IA)', ) %> - +
<% $tech %>

@@ -198,4 +266,10 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right('List packages'); +my @states = qsearch({ + 'table' => 'cust_location', + 'select' => 'DISTINCT(state)', + 'hashref' => { 'country' => 'US' }, # 477 report isn't relevant elsewhere +}); +