adding export to read mailbox status information, RT#15987
[freeside.git] / httemplate / search / report_477.html
1 <% include('/elements/header.html', 'FCC Form 477 Report' ) %>
2
3 <FORM ACTION="477.html" METHOD="GET">
4 <INPUT TYPE="hidden" NAME="magic" VALUE="active">
5
6   <TABLE BGCOLOR="#cccccc" CELLSPACING=0>
7
8     <TR>
9       <TH CLASS="background" COLSPAN=2 ALIGN="left">
10         <FONT SIZE="+1">Search options</FONT>
11       </TH>
12     </TR>
13
14     <% include( '/elements/tr-select-agent.html',
15                    'curr_value'    => scalar( $cgi->param('agentnum') ),
16                    'disable_empty' => 0,
17                )
18     %>
19
20     <% include( '/elements/tr-select-pkg_class.html',
21                    'multiple'       => 1,
22                    'empty_label' => '(empty class)',
23                )
24     %>
25
26     <SCRIPT type="text/javascript">
27       function partchange(what) {
28         var id = 'part' + what.value;
29         var element = document.getElementById(id);
30         if (what.checked) {
31           element.style.display = '';
32         } else {
33           element.style.display = 'none';
34         }
35       }
36     </SCRIPT>
37
38     <% include( '/elements/tr-checkbox.html',
39                    'label' => 'Enable part IA?',
40                    'field' => 'part',
41                    'value' => 'IA',
42                    'onchange' => 'partchange(this)',
43                )
44     %>
45
46     <TR id='partIA' style="display:none"><TD>Part IA</TD><TD><TABLE>
47       <TR><TD>Download speeds</TD><TD>
48         <TABLE>
49 %       my $i = 0;
50 %       foreach my $speed ( @FS::Report::FCC_477::download ) {
51           <TR>
52             <TH><% $speed %></TH>
53             <TD>
54             <% include( '/elements/select-table.html',
55                            'table'        => 'part_pkg_report_option',
56                            'name_col'     => 'name',
57                            'hashref'      => { 'disabled' => '' },
58                            'element_name' => 'part1_column_option',
59                            'disable_empty' => 1,
60                            'curr_value'   =>
61                                 FS::Report::FCC_477::restore_fcc477map("part1_column_option_$i"),
62                        )
63             %>
64             </TD>
65           </TR>
66 %       $i++
67 %       }
68         </TABLE></TD>
69       <TD>Upload speeds</TD><TD>
70         <TABLE>
71 %       $i = 0;
72 %       foreach my $speed ( @FS::Report::FCC_477::upload ) {
73           <TR>
74             <TH><% $speed %></TH>
75             <TD>
76             <% include( '/elements/select-table.html',
77                            'table'        => 'part_pkg_report_option',
78                            'name_col'     => 'name',
79                            'hashref'      => { 'disabled' => '' },
80                            'element_name' => 'part1_row_option',
81                            'disable_empty' => 1,
82                            'curr_value'   =>
83                                 FS::Report::FCC_477::restore_fcc477map("part1_row_option_$i"),
84                        )
85             %>
86             </TD>
87           </TR>
88 %       $i++
89 %       }
90         </TABLE></TD></TR>
91       <TR><TD>Technologies</TD><TD>
92         <TABLE>
93 %       $i = 0;
94 %       foreach my $tech ( @FS::Report::FCC_477::technology ) {
95           <TR>
96             <TH><% $tech %></TH>
97             <TD>
98             <% include( '/elements/select-table.html',
99                            'table'        => 'part_pkg_report_option',
100                            'name_col'     => 'name',
101                            'hashref'      => { 'disabled' => '' },
102                            'element_name' => "part1_technology_option_$i",
103                            'empty_label'  => '(omit)',
104                            'curr_value'   =>
105                                 FS::Report::FCC_477::restore_fcc477map("part1_technology_option_$i"),
106                        )
107             %>
108             </TD>
109           </TR>
110 %       $i++
111 %       }
112         </TABLE></TD></TR>
113     </TABLE></TD></TR>
114
115     <% include( '/elements/tr-checkbox.html',
116                    'label' => 'Enable part IIA?',
117                    'field' => 'part',
118                    'value' => 'IIA',
119                    'onchange' => 'partchange(this)',
120                )
121     %>
122
123     <TR id='partIIA' style="display:none"><TD>Part IIA</TD><TD><TABLE>
124 %   $i = 0;
125 %   foreach my $option ( @FS::Report::FCC_477::part2aoption ) {
126     <TR>
127       <TH><% $option %></TH>
128       <TD>
129       <% include( '/elements/select-table.html',
130                      'table'        => 'part_pkg_report_option',
131                      'name_col'     => 'name',
132                      'hashref'      => { 'disabled' => '' },
133                      'element_name' => 'part2a_row_option',
134                      'curr_value'   =>
135                            FS::Report::FCC_477::restore_fcc477map("part2a_row_option_$i"),
136                  )
137       %>
138       </TD>
139     </TR>
140 %    $i++
141 %   }
142   </TABLE></TD></TR>
143
144     <% include( '/elements/tr-checkbox.html',
145                    'label' => 'Enable part IIB?',
146                    'field' => 'part',
147                    'value' => 'IIB',
148                    'onchange' => 'partchange(this)',
149                )
150     %>
151
152     <TR id='partIIB' style="display:none"><TD>Part IIB</TD><TD><TABLE>
153 %   $i = 0;
154 %   foreach my $option ( @FS::Report::FCC_477::part2boption ) {
155     <TR>
156       <TH><% $option %></TH>
157       <TD>
158       <% include( '/elements/select-table.html',
159                      'table'        => 'part_pkg_report_option',
160                      'name_col'     => 'name',
161                      'hashref'      => { 'disabled' => '' },
162                      'element_name' => 'part2b_row_option',
163                       'curr_value'   =>
164                             FS::Report::FCC_477::restore_fcc477map("part2b_row_option_$i"),
165                  )
166       %>
167       </TD>
168     </TR>
169 %    $i++
170 %   }
171   </TABLE></TD></TR>
172
173     <% include( '/elements/tr-checkbox.html',
174                    'label' => 'Enable part IV?',
175                    'field' => 'part',
176                    'value' => 'IV',
177                    'onchange' => 'partchange(this)',
178                )
179     %>
180
181     <TR id='partIV' style="display:none"><TD>Part IV</TD><TD><TABLE>
182     <% include( '/elements/tr-textarea.html',
183                    'label'        => 'Explanatory notes',
184                    'id'           => 'partIV',
185                    'field'         => 'notes',
186                    'rows'         => 15,
187                    'cols'         => 80,
188                )
189     %>
190   </TABLE></TD></TR>
191
192     <% include( '/elements/tr-checkbox.html',
193                    'label' => 'Enable part V?',
194                    'field' => 'part',
195                    'value' => 'V',
196                    'onchange' => 'partchange(this)',
197                )
198     %>
199     <TR id='partV' style="display:none">
200         <TD>Part V</TD>
201         <TD>
202             <% include( '/elements/select-table.html',
203                      'table'        => 'part_pkg_report_option',
204                      'name_col'     => 'name',
205                      'hashref'      => { 'disabled' => '' },
206                      'element_name' => 'partv_report_option',
207                  )
208             %>
209         </TD>
210     </TR>
211
212
213     <% include( '/elements/tr-checkbox.html',
214                    'label' => 'Enable part VI?',
215                    'field' => 'part',
216                    'value' => 'VI_census',
217                )
218     %>
219
220   </TABLE>
221
222 <BR>
223 <INPUT TYPE="submit" VALUE="Get Report">
224
225 </FORM>
226
227 <% include('/elements/footer.html') %>
228 <%init>
229
230 die "access denied"
231   unless $FS::CurrentUser::CurrentUser->access_right('List packages');
232
233 </%init>