my $locale = $params{locale} || $::locale;
my $options = $params{options};
+ my $prefix = $options->{dialog_name_prefix} || '';
+
# names 3 parameters and returns a hashref, for use in templates
sub opthash { +{ value => shift, selected => shift, oname => shift } }
my (@FORMNAME, @LANGUAGE_ID, @FORMAT, @SENDMODE, @MEDIA, @PRINTER_ID, @SELECTS) = ();
);
my %template_vars = (
+ name_prefix => $prefix || '',
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}},
return $form->parse_html_template("generic/print_options", { SELECTS => \@SELECTS, %template_vars } );
}
-
1;
-
<td>
[%- FOREACH row = SELECTS %]
[%- IF row.show %]
- <select name="[% row.sname %]">
+ <select name="[%- name_prefix %][%- row.sname %]">
[%- FOREACH data = row.DATA %]
<option value="[% data.value %]" [% data.selected %]>[% data.oname %]</option>
[%- END %]
[%- END %]
</td>
[%- IF display_copies %]
- <td>[% 'Copies' | $T8 %] <input name="copies" size="2" value="[% HTML.escape(copies) %]"></td>
+ <td>[% 'Copies' | $T8 %] <input name="[%- name_prefix %]copies" size="2" value="[% HTML.escape(copies) %]"></td>
[%- END %]
[%- IF display_groupitems %]
<td>[% 'Group Items' | $T8 %]</td>
- <td><input name="groupitems" type="checkbox" class="checkbox" [% groupitems_checked %]></td>
+ <td><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="remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]></td>
+ <td><input name="[%- name_prefix %]remove_draft" type="checkbox" class="checkbox" [% remove_draft_checked %]></td>
[%- END %]
</tr>
</table>