From: Bernd Bleßmann Date: Fri, 15 Jan 2016 17:11:26 +0000 (+0100) Subject: PrintOptions_Helper: Angabe eines prefix ermöglichen. X-Git-Tag: release-3.4.1~459 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=6d6d4044b1caa0e4f7c9de61e3a0bc9dd691a035;p=kivitendo-erp.git PrintOptions_Helper: Angabe eines prefix ermöglichen. --- diff --git a/SL/Helper/PrintOptions.pm b/SL/Helper/PrintOptions.pm index 430425a29..230e72dca 100644 --- a/SL/Helper/PrintOptions.pm +++ b/SL/Helper/PrintOptions.pm @@ -22,6 +22,8 @@ sub get_print_options { 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) = (); @@ -122,6 +124,7 @@ sub get_print_options { ); 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}}, @@ -132,6 +135,4 @@ sub get_print_options { return $form->parse_html_template("generic/print_options", { SELECTS => \@SELECTS, %template_vars } ); } - 1; - diff --git a/templates/webpages/generic/print_options.html b/templates/webpages/generic/print_options.html index f8ee3efd3..95de1f762 100644 --- a/templates/webpages/generic/print_options.html +++ b/templates/webpages/generic/print_options.html @@ -9,7 +9,7 @@ [%- FOREACH row = SELECTS %] [%- IF row.show %] - [%- FOREACH data = row.DATA %] [%- END %] @@ -18,15 +18,15 @@ [%- END %] [%- IF display_copies %] - [% 'Copies' | $T8 %] + [% 'Copies' | $T8 %] [%- END %] [%- IF display_groupitems %] [% 'Group Items' | $T8 %] - + [%- END %] [%- IF display_remove_draft %] [% 'Remove Draft' | $T8 %] - + [%- END %]