]> git.evergreen-ils.org Git - Evergreen.git/blob - Open-ILS/src/reporter/templates/stage2.ttk
big ol reporter cleanup for the meeting
[Evergreen.git] / Open-ILS / src / reporter / templates / stage2.ttk
1 [%
2
3 WRAPPER html/html;
4    WRAPPER header.ttk + navbar.ttk title="Report Templates";
5         PROCESS inputs;
6         PROCESS class_manip;
7         PROCESS widget_manip;
8         INCLUDE logout.ttk;
9    END;
10
11    WRAPPER html/body;
12
13         PROCESS logic_header.ttk;
14         PROCESS select_sorter.js;
15
16         templates = DBI.tie('reporter.stage2', 'id')
17         reports = DBI.tie('reporter.stage3', 'id')
18         tmpl = {};
19
20
21         IF CGI.param('id');
22                 tid = CGI.param('id');
23                 tmpl = templates.$tid;
24         END;
25
26         IF CGI.param('action') == 'save';
27                 PROCESS save_stage2;
28         ELSIF CGI.param('action') == 'edit';
29                 rid = CGI.param('report');
30                 r = reports.$rid;
31                 report = utils.JSON2perl( r.params );
32                 PROCESS run_stage2;
33         ELSIF CGI.param('action') == 'run';
34                 PROCESS run_stage2;
35         ELSE;
36                 PROCESS view_stage2;
37         END;
38    END;
39    INCLUDE footer.ttk;
40 END;
41
42
43
44
45 BLOCK save_stage2;
46         stage1 = CGI.param('stage1');
47         pub = CGI.param('publictemplate') OR 'f';
48         owner = user.id();
49
50         p_obj = {};
51         FOR p = CGI.param();
52
53                 logme([p,CGI.param(p)]);
54
55                 parts = p.split(':');
56                 p1 = parts.0;
57                 p2 = parts.1;
58                 p3 = parts.2;
59                 p4 = parts.3;
60                 
61                 IF p4
62                         AND (CGI.param("$p1").list.grep("^$p2$").size > 0)
63                         AND (CGI.param("$p1:$p2").list.grep("^$p3$").size > 0)
64                         AND (CGI.param("$p1:$p2:$p3").list.grep("^$p4$").size > 0);
65
66                         p_obj.$p1.$p2.$p3.$p4 = CGI.param(p);
67
68                 ELSIF p2
69                         AND (CGI.param("$p1").list.grep(p2).size > 0);
70                         p_obj.dims.$p2 = 1;
71                 ELSIF p1 != 'filter';
72                         p_obj.$p1 = CGI.param(p);
73                 END;
74
75         END;
76
77         params = utils.perl2JSON( p_obj );
78
79         logme([stage1, params, owner, pub]);
80
81         q = DBI.prepare( stage2_insert );
82         CALL q.execute(stage1, params, owner, pub);
83
84         FOR new_s2 = DBI.query("SELECT * FROM reporter.stage2_id_seq;");
85                 tid = new_s2.last_value;
86                 INCLUDE view_stage2 tmpl = templates.$tid;
87         END;
88 END;
89
90
91
92
93 BLOCK edit_stage2;
94
95 END;
96
97
98
99
100
101 BLOCK view_stage2;
102         logme(tmpl.params);
103         params = utils.JSON2perl( tmpl.params );
104
105         WRAPPER html/table border=0 width='100%';
106                 WRAPPER html/row;
107                         WRAPPER html/cell colspan=5 align='center';
108                                 s1_name_xpath = '/reporter/tables/table[@id="' _ params.stage1 _ '"]/label';
109                                 INCLUDE anchor
110                                         content=config.findvalue( s1_name_xpath )
111                                         href="stage1?id=" _ params.stage1;
112                                 ' :: ' _ params.templatename _ '<br>';
113                                 INCLUDE anchor
114                                         content="Create a report from this template"
115                                         href=CGI.url('-path', 1) _ '?action=run&id=' _ tmpl.id;
116                         END;
117                 END;
118
119                 WRAPPER html/row;
120                         INCLUDE html/cell colspan=4 content="<b>Filterable Attributes:</b>";
121                 END;
122
123                 core_table = params.stage1;
124
125                 tables = params.filter.keys;
126                 tables.unshift(core_table);
127                 tables = tables.unique;
128
129                 FOR t = tables;
130                         logme(['table id or link id', t]);
131
132                         f_table = INCLUDE find_table_id id=t;
133
134                         table = config.findnodes( "/reporter/tables/table[@id='$f_table']");
135                         WRAPPER html/row;
136                                 INCLUDE html/cell;
137                                 WRAPPER html/cell colspan=4 align='left';
138
139                                         IF t != f_table;
140                                                 link_xpath = '//*[@id="' _ t _ '"]';
141                                                 dim_link = config.findnodes(link_xpath);
142
143                                                 link_label_xpath =
144                                                         '../../fields/field[@name="' _
145                                                         dim_link.findvalue('@field') _ '"]/label';
146                                                 dim_link.findvalue(link_label_xpath);
147
148                                                 ' -- ';
149                                         END;
150
151                                         table.findvalue( 'label' );
152                                 END;
153                         END;
154
155                         FOR f_field = params.filter.$t.keys;
156                                 logme([f_table,f_field]);
157                                 FOR f_fam = params.filter.$t.$f_field.keys;
158                                         logme([f_table,f_field,f_fam]);
159                                         f_widget = params.filter.$t.$f_field.$f_fam;
160                                         logme([f_table,f_field,f_fam,f_widget]);
161
162                                         WRAPPER html/row;
163                                                 field = table.findnodes( "fields/field[@name='$f_field']" );
164                                                 fam = config.findnodes( "/reporter/widgets/widget-family[@name='$f_fam']" );
165                                                 widget = fam.findnodes( "widget[@name='$f_widget']" );
166
167                                                 INCLUDE html/cell colspan=2;
168                                                 INCLUDE html/cell align='right' content=field.findvalue( 'label' );
169                                                 INCLUDE html/cell align='center' content=fam.findvalue( 'label' );
170                                                 INCLUDE html/cell align='left' content=widget.findvalue( 'label' );
171                                         END;
172                                 END;
173                         END;
174                 END;
175
176                 WRAPPER html/row;
177                         INCLUDE html/cell colspan=5 content="<br>";
178                 END;
179
180                 WRAPPER html/row;
181                         INCLUDE html/cell colspan=5 content="<b>Attributes Available for Output</b>";
182                 END;
183
184                 tables = params.dims.keys;
185                 tables.unshift(core_table);
186                 tables = tables.unique;
187
188                 FOR t = tables;
189
190                         f_table = INCLUDE find_table_id id=t;
191                         
192                         table = config.findnodes( "/reporter/tables/table[@id='$f_table']");
193                         tname = table.findvalue( "label" );
194                         tdesc = table.findvalue( "desription" );
195
196                         #NEXT IF table.findvalue('@fact-table') == 'true';
197                         
198                         WRAPPER html/row;
199                                 INCLUDE html/cell;
200                                 WRAPPER html/cell colspan=4 align='left';
201                                         IF t != f_table;
202                                                 link_xpath = '//*[@id="' _ t _ '"]';
203                                                 dim_link = config.findnodes(link_xpath);
204
205                                                 link_label_xpath =
206                                                         '../../fields/field[@name="' _
207                                                         dim_link.findvalue('@field') _ '"]/label';
208                                                 dim_link.findvalue(link_label_xpath);
209
210                                                 ' -- ';
211                                         END;
212                                         tname;
213                                 END;
214                         END;
215
216
217                         FOR field = table.findnodes('fields/field[not(@primary) or @primary != "true"]');
218                                 link_test = 'links/link[@field="' _ field.findvalue('@name') _ '" and (not(@hidden) or @hidden!="false")]';
219                                 logme(['view_stage2 -> link_test',link_test]);
220                                 NEXT IF table.findnodes( link_test );
221
222                                 fname = field.findvalue( "label" );
223                                 fdesc = field.findvalue( "desription" );
224
225                                 WRAPPER html/row;
226
227                                         INCLUDE html/cell colspan=2;
228                                         INCLUDE html/cell align='right' content=fname;
229                                         INCLUDE html/cell colspan=2 align='center' content=fdesc;
230                                 END;
231                         END;
232                 END;
233
234         END;
235 END;
236
237
238 BLOCK run_stage2;
239         logme(tmpl.params);
240         params = utils.JSON2perl( tmpl.params );
241
242         %]
243                 <script language="javascript">
244                         var outputs = {};
245                         var filters = {};
246                         function send_it (f) {
247                                 var bad_filters = [];
248                                 for (var i in filters) {
249                                         if (!f.elements[i].value) {
250                                                 bad_filters.push(filters[i]); 
251                                         }
252                                 }
253                                 if (bad_filters.length) {
254                                         var fstring = '';
255                                         for (var i in bad_filters)
256                                                 fstring = fstring + "\n\t" + bad_filters[i];
257
258                                         alert('You must choose a value for these filters or settings:\n' + fstring);
259                                         return false;
260                                 }
261
262                                 Widget.Select.selectAll('output_order');
263                                 return true;
264                         }
265                 </script>
266                 <br/>
267         [%
268
269         WRAPPER html/table width="100%";
270                 WRAPPER html/row;
271                         WRAPPER html/cell align='center';
272                                 s1_name_xpath = '/reporter/tables/table[@id="' _ params.stage1 _ '"]/label';
273                                 INCLUDE anchor
274                                         content=config.findvalue( s1_name_xpath )
275                                         href="stage1?id=" _ params.stage1;
276                                 ' :: ' _ params.templatename;
277                         END;
278                 END;
279         END;
280
281         '<br/><br/><div id="output_order_div"';
282
283         WRAPPER form id="stage3_new" name="stage3_new" action="stage3" onsubmit="return send_it(this);" method="POST";
284                 INCLUDE hidden name='stage2' value=CGI.param('id');
285
286                 '<br/><center><b>Report Name:</b>';
287                 rname = '';
288                 IF report;
289                         rname = report.reportname _ ' (COPY)';
290                 END;
291                 INCLUDE text name='reportname' size="50" value=rname;
292                 '</center><br/><br/>';
293                 '<script language="javascript">filters["reportname"] = "Report Name";</script>';
294
295                 WRAPPER html/table id='order_table' width="100%";
296                         WRAPPER html/row  style="border-top: solid black 2px;";
297                                 INCLUDE html/cell colspan=2 content='<b>Output and Sort Order</b>' style="border-top: solid black 2px;";
298                                 INCLUDE html/cell colspan=2 content='<b>Output Formats</b>' align="center" style="border-top: solid black 2px;";
299                         END;
300                         WRAPPER html/row;
301                                 WRAPPER html/cell rowspan=3 width="25%";
302                                         WRAPPER select multi=1 size=5 id='output_order' name='output_order';
303                                                 FOR column = report.output_order;
304                                                         parts = column.split(':');
305                                                         xpath = '/reporter/tables/table[@id="' _ parts.1 _ '"]/fields/field[@name="' _ parts.2 _ '"]';
306                                                         IF parts.1 != params.stage1;
307                                                                 xpath = '//*[@id="' _ parts.1 _ '"]/@table';
308                                                                 name = config.findvalue(xpath);
309                                                                 xpath = '/reporter/tables/table[@id="' _ name _ '"]/fields/field[@name="' _ parts.2 _ '"]';
310                                                         END;
311                                                         node = config.findnodes(xpath);
312                                                         IF node.findvalue('@primary') == 'true' && parts.1 == params.stage1;
313                                                                 INCLUDE option value=column content='Per group count -- ' _ node.findvalue('description');
314                                                         ELSE;
315                                                                 INCLUDE option value=column content=node.findvalue('description');
316                                                         END;
317                                                 END;
318                                         END;
319                                 END;
320                                 WRAPPER html/cell;
321                                         INCLUDE anchor href='javascript:void(0);' content='Up' onclick="Widget.Select.moveSelectedOptionsUp('output_order')";
322                                 END;
323
324                                 WRAPPER html/cell align="right";
325                                         checked = 'checked';
326                                         IF report.output_format.grep('csv') == 0;
327                                                 checked = '';
328                                         END;
329                                         INCLUDE checkbox name='output_format' value='csv';
330                                 END;
331                                 INCLUDE html/cell content="CSV" align="left";
332                         END;
333                         WRAPPER html/row;
334                                 WRAPPER html/cell;
335                                         INCLUDE anchor href='javascript:void(0);' content='Down' onclick="Widget.Select.moveSelectedOptionsDown('output_order')";
336                                 END;
337
338                                 WRAPPER html/cell align="right";
339                                         checked = 'checked';
340                                         IF report.output_format.grep('excel') == 0;
341                                                 checked = '';
342                                         END;
343                                         INCLUDE checkbox name='output_format' value='excel';
344                                 END;
345                                 INCLUDE html/cell content="Excel" align="left";
346                         END;
347                         WRAPPER html/row;
348                                 INCLUDE html/cell;
349                                 WRAPPER html/cell align="right" valign='top';
350                                         checked = 'checked';
351                                         IF report.output_format.grep('html') == 0;
352                                                 checked = '';
353                                         END;
354                                         INCLUDE checkbox name='output_format' value='html';
355                                 END;
356                                 WRAPPER html/cell align="left";
357                                         'HTML<br/>';
358                                         WRAPPER html/table;
359                                                 WRAPPER html/row + html/cell colspan=2;
360                                                         "<i>Graph types</i>";
361                                                 END;
362                                                 WRAPPER html/row;
363                                                         WRAPPER html/cell;
364                                                                 checked = 'checked';
365                                                                 IF report.output_format.grep('bar') == 0;
366                                                                         checked = '';
367                                                                 END;
368                                                                 INCLUDE checkbox name='html_graph_type' value='bar';
369                                                         END;
370                                                         INCLUDE html/cell content='Bar';
371                                                 END;
372                                                 WRAPPER html/row;
373                                                         WRAPPER html/cell;
374                                                                 checked = 'checked';
375                                                                 IF report.output_format.grep('pie') == 0;
376                                                                         checked = '';
377                                                                 END;
378                                                                 INCLUDE checkbox name='html_graph_type' value='pie';
379                                                         END;
380                                                         INCLUDE html/cell content='Pie';
381                                                 END;
382                                                 WRAPPER html/row;
383                                                         WRAPPER html/cell;
384                                                                 checked = '';
385                                                                 IF report.output_format.grep('line');
386                                                                         checked = 'checked';
387                                                                 END;
388                                                                 INCLUDE checkbox name='html_graph_type' value='line';
389                                                         END;
390                                                         INCLUDE html/cell content='Line';
391                                                 END;
392                                         END;
393                                 END;
394                         END;
395                 END;
396
397                 checked = 0;
398
399                 '<br/><br/><b>Pivot Column:</b> ';
400                 WRAPPER select id='pivot_col' name='pivot_col';
401                         INCLUDE option value='' content='No Pivot';
402                         FOR column = report.output_order;
403                                 parts = column.split(':');
404                                 xpath = '/reporter/tables/table[@id="' _ parts.1 _ '"]/fields/field[@name="' _ parts.2 _ '"]/description';
405                                 IF parts.1 != params.stage1;
406                                         xpath = '//*[@id="' _ parts.1 _ '"]/@table';
407                                         name = config.findvalue(xpath);
408                                         xpath = '/reporter/tables/table[@id="' _ name _ '"]/fields/field[@name="' _ parts.2 _ '"]/description';
409                                 END;
410                                 selected = 0;
411                                 IF column == report.pivot_col;
412                                         selected = 1;
413                                 END;
414                                 INCLUDE option value=column content=config.findvalue(xpath);
415                         END;
416                 END;
417                 '<br/><br/></div>';
418
419                 WRAPPER html/table border=0 width='100%';
420                         WRAPPER html/row;
421                                 INCLUDE html/cell colspan=4 content="<b>Filterable Attributes</b><br/><br/>" style="border-top: solid black 2px;";
422                         END;
423
424                         core_table = params.stage1;
425
426                         tables = params.filter.keys;
427                         tables.unshift(core_table) IF tables.grep("^$core_table$");
428                         tables = tables.unique;
429
430                         FOR t = tables;
431                                 NEXT UNLESS params.filter.$t.keys;
432                                 f_table = INCLUDE find_table_id id=t;
433                                 table = config.findnodes( "/reporter/tables/table[@id='$f_table']");
434
435                                 table_label = table.findvalue( 'label' );
436
437                                 WRAPPER html/row;
438                                         WRAPPER html/cell colspan=3 align='center' style="border: solid black 1px; background: lightgray;";
439                                                 IF t != f_table;
440                                                         link_xpath = '//*[@id="' _ t _ '"]';
441                                                         dim_link = config.findnodes(link_xpath);
442
443                                                         link_label_xpath =
444                                                                 '../../fields/field[@name="' _
445                                                                 dim_link.findvalue('@field') _ '"]/label';
446
447                                                         table_label = table_label _ ' -- ' _ dim_link.findvalue(link_label_xpath);
448                                                 END;
449                                                 table_label;
450                                         END;
451                                 END;
452
453                                 FOR f_field = params.filter.$t.keys;
454                                         logme([f_table,f_field]);
455                                         FOR f_fam = params.filter.$t.$f_field.keys;
456                                                 logme([f_table,f_field,f_fam]);
457                                                 f_widget = params.filter.$t.$f_field.$f_fam;
458                                                 logme([f_table,f_field,f_fam,f_widget]);
459
460                                                 WRAPPER html/row;
461                                                         field = table.findnodes( "fields/field[@name='$f_field']" );
462                                                         fam = config.findnodes( "/reporter/widgets/widget-family[@name='$f_fam']" );
463                                                         widget = fam.findnodes( "widget[@name='$f_widget']" );
464
465                                                         w_file = 'widgets/' _ fam.findvalue('@name') _ '.' _ widget.findvalue('@name');
466                                                         INCLUDE html/cell align='left' style="padding-left: 50px;" content=field.findvalue( 'label' );
467
468                                                         WRAPPER html/cell align='left';
469                                                                 TRY;
470                                                                                 classname = table.findvalue('@id');
471                                                                                 fieldname = field.findvalue('@name');
472                                                                                 widgetname = widget.findvalue('@name');
473                                                                                 famname = fam.findvalue('@name');
474                                                                                 table_alias = t;
475         
476                                                                                 input_prefix = "filter:$t:$fieldname:$famname:$widgetname";
477                                                                                 current_value = report.filter.$t.$fieldname.$famname.$widgetname;
478                                                                                 logme(current_value);
479         
480                                                                                 PROCESS $w_file widget_family=fam;
481                                                                                 PROCESS editor;
482                                                                 CATCH;
483                                                                         %]ARG!! Couldn't render widget [% $w_file %] ([% error.info %])!!![%
484                                                                 END;
485                                                         END;
486                                                 END;
487                                         END;
488                                 END;
489                         END;
490         
491                         WRAPPER html/row;
492                                 INCLUDE html/cell colspan=4 content="<br>";
493                         END;
494
495                         WRAPPER html/row;
496                                 INCLUDE html/cell colspan=4 content="<b>Attributes Available for Output</b><br/><br/>" style="border-top: solid black 2px;";
497                         END;
498
499                         table = config.findnodes( "/reporter/tables/table[@id='$core_table']" );
500                         classname = table.findvalue( "@id" );
501                         tname = table.findvalue( "label" );
502                         tdesc = table.findvalue( "desription" );
503
504                         WRAPPER html/row;
505                                 INCLUDE html/cell colspan=4 align='center' content=tname style="border: solid black 1px; background: lightgray;";
506                         END;
507
508                         pkey_field = table.findnodes('fields/field[@primary = "true"]');
509                         pid = pkey_field.findvalue('@name');
510                         plabel = pkey_field.findvalue('label');
511                 
512                         WRAPPER html/row;
513                                 WRAPPER html/cell align='left' style="padding-left: 50px;";
514                                         INCLUDE checkbox
515                                                 checked=(
516                                                         !report || report.output.$classname.$pid == 'include'
517                                                                 ? 'checked'
518                                                                 : ''
519                                                 )
520                                                 name="output:$classname:$pid"
521                                                 value="include"
522                                                 onclick="field_add_remove(this)";
523                                         INCLUDE hidden name="xform:type:$classname:$pid" value="count_dist";
524                                         %]
525                                                 <script language="javascript">
526                                                         outputs['[% "output:$classname:$pid" %]'] = '[% "Per group count of $plabel" %]';
527                                                         [% IF !report %]
528                                                         Widget.Select.addOption(
529                                                                 'output_order',
530                                                                 '[% "output:$classname:$pid" %]', 
531                                                                 '[% "Per group count of $plabel" %]'
532                                                         );
533                                                         [% END %]
534                                                 </script>
535                                         [%
536                                 "Per group count of $plabel<br/><br/>";
537                                 END;
538                                 INCLUDE html/cell align='center';
539                         END;
540
541
542                         tables = params.dims.keys;
543                         tables.unshift(core_table);
544                         tables = tables.unique;
545
546                         core_done = 0;
547
548                         FOR f_table = tables;
549                                 noheader = 0;
550                                 noheader = 1 IF f_table == core_table;
551                                 INCLUDE show_filter_atts;
552                                 WRAPPER html/row;
553                                         INCLUDE html/cell colspan=4 content="<br/><br/>";
554                                 END;
555                         END;
556                 END;
557         
558                 %]
559                         <div id='output_home'/>
560                         <script>
561                                 document.getElementById('output_home').appendChild(
562                                         document.getElementById('output_order_div')
563                                 );
564                         </script>
565                 [%
566
567                 INCLUDE checkbox name="publicreport" value="t" checked=(report.publicreport == 't' ? 'checked' : '');
568                 'Public Report<br>';
569                 INCLUDE submit name="action" value="Run Now";
570                 INCLUDE submit name="action" value="Schedule";
571
572         END;
573 END;
574
575 BLOCK show_filter_atts;
576         t = f_table;
577         f_table = INCLUDE find_table_id id=t;
578         table = config.findnodes( "/reporter/tables/table[@id='$f_table']");
579         classname = table.findvalue( "@id" );
580         tname = table.findvalue( "label" );
581         tdesc = table.findvalue( "desription" );
582
583         IF ! noheader;
584                 WRAPPER html/row;
585                         WRAPPER html/cell colspan=4 align='center' style="border: solid black 1px; background: lightgray;";
586                                 IF t != f_table;
587                                         link_xpath = '//*[@id="' _ t _ '"]';
588                                         dim_link = config.findnodes(link_xpath);
589
590                                         link_label_xpath =
591                                                 '../../fields/field[@name="' _
592                                                 dim_link.findvalue('@field') _ '"]/label';
593                                         dim_link.findvalue(link_label_xpath);
594
595                                         ' -- ';
596                                 END;
597                                 tname;
598                         END;
599                 END;
600         END;
601
602         fields_xpath = 'fields/field[(not(@primary) or @primary != "true") or @hidden="false"]';
603
604
605         count = 1;
606
607         FOR field = table.findnodes(fields_xpath);
608                 link_test = '../../links/link[@field="' _ field.findvalue('@name') _ '" and (not(@hidden) or @hidden!="false")]';
609                 link_test = 'links/link[@field="' _ field.findvalue('@name') _ '" and (not(@hidden) or @hidden!="false")]';
610                 logme(['show_filter_atts -> link_test', t, link_test]);
611                 NEXT IF table.findnodes( link_test );
612
613                 fname = field.findvalue( "label" );
614                 fid = field.findvalue( "@name" );
615
616                 bg_color = 'white';
617                 IF count % 2;
618                         bg_color = 'lightcyan';
619                 END;
620
621                 WRAPPER html/row;
622
623                         WRAPPER html/cell align='left' col=bg_color style="padding-left: 50px;";
624                                 INCLUDE checkbox
625                                         name="output:$t:$fid"
626                                         value="include" 
627                                         onclick="field_add_remove(this)" 
628                                         checked=(report.output.$t.$fid == 'include' ? 'checked' : '');
629                                 %]
630                                         <script language="javascript">
631                                                 outputs['[% "output:$t:$fid" %]'] = '[% fname %]';
632                                         </script>
633                                 [%
634
635                                 fname;
636                         END;
637                         INCLUDE html/cell align='right' content='Output Transformation:' col=bg_color;
638                         WRAPPER html/cell align='left' col=bg_color style="padding-left: 50px;";
639
640                                 dtype = field.findvalue('@transform-group');
641                                 IF !dtype;
642                                         dtype = field.findvalue('@datatype');
643                                 END;
644
645                                 WRAPPER select id="xform:type:$t:$fid" name="xform:type:$t:$fid" onchange="show_hide_params(this)";
646                                         INCLUDE option value='' content='None' selected=(report.xform.type.$t.$fid == '' ? 1 : 0);
647                                         FOR xform = dtype_xform_map.$dtype;
648                                                 xform_label = dtype_xforms.$xform.label;
649                                                 IF dtype_xforms.$xform.param;
650                                                         xform_label = "$xform_label (*)";
651                                                 END;
652                                                 INCLUDE option value=xform content=xform_label selected=(report.xform.type.$t.$fid == xform ? 1 : 0);
653                                         END;
654                                 END;
655
656                                 %]
657
658                                 <br/>
659                                 <span id="hide-param:xform:type:[% t %]:[% fid %]" [% 'style="visibility: hidden;"' IF !report.xform.param.$t.$fid %] >
660                                         <small><super>*</super>Output Tranformation Parameter: </small>
661                                         [% INCLUDE text name="xform:param:$t:$fid" value=report.xform.param.$t.$fid %]
662                                 </span>
663
664                                 [%
665                         END;
666                 END;
667                 count = count + 1;
668         END;
669 END;
670 %]