if ((ref $form->{printers} eq 'ARRAY') && scalar @{ $form->{printers } });
@SELECTS = map {
- sname => $_->[1],
- DATA => $_->[0],
- show => !$options->{"hide_" . $_->[1]} && scalar @{ $_->[0] }
+ sname => $_->[1],
+ DATA => $_->[0],
+ show => !$options->{"hide_" . $_->[1]} && scalar @{ $_->[0]},
+ hname => $locale->text($_->[2])
},
- [ \@FORMNAME, 'formname', ],
- [ \@LANGUAGE_ID, 'language_id', ],
- [ \@FORMAT, 'format', ],
- [ \@SENDMODE, 'sendmode', ],
- [ \@MEDIA, 'media', ],
- [ \@PRINTER_ID, 'printer_id', ];
+ [ \@FORMNAME, 'formname', 'Formname' ],
+ [ \@LANGUAGE_ID, 'language_id', 'Language' ],
+ [ \@FORMAT, 'format', 'Format' ],
+ [ \@SENDMODE, 'sendmode', 'Sendmode' ],
+ [ \@MEDIA, 'media', 'Media' ],
+ [ \@PRINTER_ID, 'printer_id', 'Printer' ];
my %dont_display_groupitems = (
'dunning' => 1,
my %template_vars = (
name_prefix => $prefix || '',
+ show_headers => $options->{show_headers},
display_copies => scalar @{ $form->{printers} || [] } && $::lx_office_conf{print_templates}->{latex} && $form->{media} ne 'email',
display_remove_draft => (!$form->{id} && $form->{draft_id}),
display_groupitems => !$dont_display_groupitems{$form->{type}},
<tr>
<td>
<table>
+ [%- IF show_headers %]
<tr>
+ [%- FOREACH row = SELECTS %]
+ [%- IF row.show %]
+ <th align="left">[%- row.hname %]</th>
+ [%- END %]
+ [%- END %]
+ [%- IF display_copies %]
+ <th align="left">[% 'Copies' | $T8 %]</th>
+ [%- END %]
+ [%- IF display_groupitems %]
+ <th align="left">[% 'Group Items' | $T8 %]</th>
+ [%- END %]
+ [%- IF display_remove_draft %]
+ <th align="left">[% 'Remove Draft' | $T8 %]</th>
+ [%- END %]
+ </tr>
+ [%- END %]
+ <tr>
+ [%- FOREACH row = SELECTS %]
+ [%- IF row.show %]
<td>
- [%- FOREACH row = SELECTS %]
- [%- IF row.show %]
<select name="[%- name_prefix %][%- row.sname %]">
[%- FOREACH data = row.DATA %]
- <option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
+ <option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
[%- END %]
</select>
- [%- END %]
- [%- END %]
</td>
+ [%- END %]
+ [%- END %]
[%- IF display_copies %]
- <td>[% 'Copies' | $T8 %] <input name="[%- name_prefix %]copies" size="2" value="[% HTML.escape(copies) %]"></td>
+ <td>[%- IF !show_headers %][%- 'Copies' | $T8 %][%- END %]<input name="[%- name_prefix %]copies" size="2" value="[% HTML.escape(copies) %]"></td>
[%- END %]
[%- IF display_groupitems %]
- <td>[% 'Group Items' | $T8 %]</td>
- <td><input name="[%- name_prefix %]groupitems" type="checkbox" class="checkbox" [% groupitems_checked %]></td>
+ <td>[%- IF !show_headers %][% 'Group Items' | $T8 %][%- END %]
+ <input name="[%- name_prefix %]groupitems" type="checkbox" class="checkbox" [% groupitems_checked %]>
+ </td>
[%- END %]
[%- IF display_remove_draft %]
- <td>[% 'Remove Draft' | $T8 %]</td>
- <td><input name="[%- name_prefix %]remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]></td>
+ <td>[%- IF !show_headers %][% 'Remove Draft' | $T8 %][%- END %]
+ <input name="[%- name_prefix %]remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]>
+ </td>
[%- END %]
</tr>
</table>
</td>
</tr>
</table>
-