X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fsearch%2Freport_477.html;h=b842b1f3f8509de47fd3593582fd4e605728c185;hb=54a357b171aa44f9399b4c146acd2afd3b686075;hp=bc2a95806a534622b353d49af710c90f427718af;hpb=4ef5b3b917b7802a136551ad567dc9d649700f53;p=freeside.git
diff --git a/httemplate/search/report_477.html b/httemplate/search/report_477.html
index bc2a95806..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 ) {
<% $speed %> |
@@ -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++
% }
|
Upload speeds |
+% $i = 0;
% foreach my $speed ( @FS::Report::FCC_477::upload ) {
<% $speed %> |
@@ -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++
% }
|
Technologies |
-% my $i = 0;
+% $i = 0;
% foreach my $tech ( @FS::Report::FCC_477::technology ) {
<% $tech %> |
@@ -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();',
)
%>
Part IIA |
+% $i = 0;
% foreach my $option ( @FS::Report::FCC_477::part2aoption ) {
<% $option %> |
@@ -120,22 +154,27 @@
'name_col' => 'name',
'hashref' => { 'disabled' => '' },
'element_name' => 'part2a_row_option',
+ 'curr_value' =>
+ FS::Report::FCC_477::restore_fcc477map("part2a_row_option_$i"),
)
%>
+% $i++
% }
|
<% include( '/elements/tr-checkbox.html',
'label' => 'Enable part IIB?',
'field' => 'part',
+ 'id' => 'enableIIB',
'value' => 'IIB',
- 'onchange' => 'partchange(this)',
+ 'onchange' => 'partchange(this); toggleV();',
)
%>
Part IIB |
+% $i = 0;
% foreach my $option ( @FS::Report::FCC_477::part2boption ) {
<% $option %> |
@@ -145,16 +184,20 @@
'name_col' => 'name',
'hashref' => { 'disabled' => '' },
'element_name' => 'part2b_row_option',
+ 'curr_value' =>
+ FS::Report::FCC_477::restore_fcc477map("part2b_row_option_$i"),
)
%>
+% $i++
% }
|
<% 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)',
)
%>
+
+ Part V |
+
+ <% include( '/elements/select-table.html',
+ 'table' => 'part_pkg_report_option',
+ 'name_col' => 'name',
+ 'hashref' => { 'disabled' => '' },
+ 'element_name' => 'part5_report_option',
+ 'curr_value' =>
+ FS::Report::FCC_477::restore_fcc477map("part5_report_option"),
+ )
+ %>
+ |
+
+
<% include( '/elements/tr-checkbox.html',
'label' => 'Enable part VI?',
'field' => 'part',
- 'value' => 'VI',
+ 'id' => 'enableVI',
+ 'value' => 'VI_census',
+ 'postfix' =>
+ ' (requires part IA)',
)
%>
-
+
@@ -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
+});
+
%init>
| |