From: Moritz Bunkus Date: Thu, 1 Nov 2007 09:03:32 +0000 (+0000) Subject: Umstellung weiterer HTML-Vorlagen aus templates/webpages/generic von HTML::Template... X-Git-Tag: release-2.6.0beta1~444 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=1adc3d650423ab68ecdd00ae131c0627f4a1028c;p=kivitendo-erp.git Umstellung weiterer HTML-Vorlagen aus templates/webpages/generic von HTML::Template auf Template. --- diff --git a/bin/mozilla/common.pl b/bin/mozilla/common.pl index dee0e0102..e05a146df 100644 --- a/bin/mozilla/common.pl +++ b/bin/mozilla/common.pl @@ -307,9 +307,9 @@ sub delivery_customer_selection { $form->{"title"} = $locale->text("Select a Customer"); $form->header(); - print($form->parse_html_template("generic/select_delivery_customer", { "HEADER" => \@header, - "DELIVERY" => $delivery, - "onload" => $onload })); + print $form->parse_html_template2("generic/select_delivery_customer", { "HEADER" => \@header, + "DELIVERY" => $delivery, + "onload" => $onload }); $lxdebug->leave_sub(); } @@ -349,9 +349,9 @@ sub vendor_selection { $form->{"title"} = $locale->text("Select a Customer"); $form->header(); - print($form->parse_html_template("generic/select_vendor", { "HEADER" => \@header, - "VENDOR" => $vendor, - "onload" => $onload })); + print $form->parse_html_template2("generic/select_vendor", { "HEADER" => \@header, + "VENDOR" => $vendor, + "onload" => $onload }); $lxdebug->leave_sub(); } @@ -405,14 +405,9 @@ sub calculate_qty { sub set_longdescription { $lxdebug->enter_sub(); - - my $callback = "$form->{script}?action=set_longdescription&"; - map({ $callback .= "$_=" . $form->escape($form->{$_}) . "&" } - (qw(login password name input_name input_id), grep({ /^[fl]_/ } keys %$form))); - - $form->{"title"} = $locale->text("Enter longdescription"); + $form->{title} = $locale->text("Enter longdescription"); $form->header(); - print($form->parse_html_template("generic/set_longdescription")); + print $form->parse_html_template2("generic/set_longdescription"); $lxdebug->leave_sub(); } diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index ca505878e..1ec0ca449 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -348,16 +348,13 @@ sub new_item { # save all form variables except action in a previousform variable my $previousform = join '&', map { $form->{$_} =~ s/&/%26/; "$_=$form->{$_}" } grep { !/action/ } keys %$form; - map { $form->{"${_}_$form->{rowcount}"} =~ s/\"/"/g } qw(partnumber description); + push @HIDDENS, { 'name' => 'previousform', 'value' => $form->escape($previousform, 1) }; + push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{$_} }, qw(rowcount vc login password); + push @HIDDENS, map +{ 'name' => $_, 'value' => $form->{"${_}_$form->{rowcount}"} }, qw(partnumber description unit sellprice); + push @HIDDENS, { 'name' => 'taxaccount2', 'value' => $form->{taxaccounts} }; - $form->header; - - push @HIDDENS, { value => $cgi->hidden("-name" => "previousform", "-value" => $form->escape($previousform, 1)) }; - push @HIDDENS, map +{ value => $cgi->hidden("-name" => $_, "-value" => $form->{$_}) }, qw(rowcount vc login password); - push @HIDDENS, map +{ value => $cgi->hidden("-name" => $_, "-value" => $form->{"${_}_$form->{rowcount}"}) }, qw(partnumber description unit sellprice); - push @HIDDENS, { value => $cgi->hidden("-name" => "taxaccount2", "-value" => $form->{taxaccounts}) }; - - print $form->parse_html_template("generic/new_item", { HIDDENS => \@HIDDENS} ); + $form->header(); + print $form->parse_html_template2("generic/new_item", { HIDDENS => [ sort { $a->{name} cmp $b->{name} } @HIDDENS ] } ); $lxdebug->leave_sub(); } @@ -837,13 +834,16 @@ sub print_options { remove_draft_checked => $form->{remove_draft} ? "checked" : '' ); - my $print_options = $form->parse_html_template("generic/print_options", { SELECTS => \@SELECTS, %template_vars } ); + my $print_options = $form->parse_html_template2("generic/print_options", { SELECTS => \@SELECTS, %template_vars } ); if ($options{inline}) { - $lxdebug->leave_sub() and return $print_options; - } else { - print $print_options; $lxdebug->leave_sub(); + $lxdebug->leave_sub(); + return $print_options; } + + print $print_options; + + $lxdebug->leave_sub(); } sub print { diff --git a/templates/webpages/generic/new_item_de.html b/templates/webpages/generic/new_item_de.html index b11a94b0a..dc395803f 100644 --- a/templates/webpages/generic/new_item_de.html +++ b/templates/webpages/generic/new_item_de.html @@ -1,4 +1,4 @@ - +[% USE HTML %]

Dieser Artikel ist nicht in der Datenbank! @@ -13,8 +13,9 @@  Dienstleistung

- - + [%- FOREACH var = HIDDENS %] + + [%- END %] diff --git a/templates/webpages/generic/new_item_master.html b/templates/webpages/generic/new_item_master.html index a60249593..45235ec23 100644 --- a/templates/webpages/generic/new_item_master.html +++ b/templates/webpages/generic/new_item_master.html @@ -1,4 +1,4 @@ - +[% USE HTML %]

Item not on file! @@ -13,8 +13,9 @@  Service

- - + [%- FOREACH var = HIDDENS %] + + [%- END %] diff --git a/templates/webpages/generic/print_options_de.html b/templates/webpages/generic/print_options_de.html index 1b952b927..b1906f50c 100644 --- a/templates/webpages/generic/print_options_de.html +++ b/templates/webpages/generic/print_options_de.html @@ -1,31 +1,38 @@ - - - + +
- - - - - - - - - - - - - - +[% USE HTML %] + +
- - - - Kopien >Waren gruppieren>Entwurf löschen>
+ + - - +
+ + + + [%- IF display_copies %] + + [%- END %] + [%- IF display_groupitems %] + + + [%- END %] + [%- IF display_remove_draft %] + + + [%- END %] -
+ [%- FOREACH row = SELECTS %] + [%- IF row.show %] + + [%- END %] + [%- END %] + Kopien Waren gruppierenEntwurf löschen
-
-
-
+
+
[% status_msg %]
+
diff --git a/templates/webpages/generic/print_options_master.html b/templates/webpages/generic/print_options_master.html index c0a37ea00..94a44b895 100644 --- a/templates/webpages/generic/print_options_master.html +++ b/templates/webpages/generic/print_options_master.html @@ -1,31 +1,38 @@ - - - + +
- - - - - - - - - - - - - - +[% USE HTML %] + +
- - - - Copies >Group Items>Remove Draft>
+ + - - +
+ + + + [%- IF display_copies %] + + [%- END %] + [%- IF display_groupitems %] + + + [%- END %] + [%- IF display_remove_draft %] + + + [%- END %] -
+ [%- FOREACH row = SELECTS %] + [%- IF row.show %] + + [%- END %] + [%- END %] + Copies Group ItemsRemove Draft
-
-
-
+
+
[% status_msg %]
+
diff --git a/templates/webpages/generic/select_delivery_customer_de.html b/templates/webpages/generic/select_delivery_customer_de.html index 93a102258..e269df8e4 100644 --- a/templates/webpages/generic/select_delivery_customer_de.html +++ b/templates/webpages/generic/select_delivery_customer_de.html @@ -1,14 +1,13 @@ -onload=""> +[% USE HTML %]

- - + + + +
[% title %]
- - - @@ -19,23 +18,27 @@
Bitte einen Endkunden aus der Liste auswählen
- - - + [%- FOREACH col = HEADER %] + + [%- END %] - - - - - - - - - - + [%- FOREACH row = DELIVERY %] + + + + + + + + + + + [%- END %]
 [% col.column_title %]
- -
+ + + [% HTML.escape(row.name) %] + [% HTML.escape(row.customernumber) %][% HTML.escape(row.address) %]
diff --git a/templates/webpages/generic/select_delivery_customer_master.html b/templates/webpages/generic/select_delivery_customer_master.html index 13234ffa5..272934d87 100644 --- a/templates/webpages/generic/select_delivery_customer_master.html +++ b/templates/webpages/generic/select_delivery_customer_master.html @@ -1,14 +1,13 @@ -onload=""> +[% USE HTML %] - - + + + +
[% title %]
- - - @@ -19,23 +18,27 @@
Please select a customer from the list below.
- - - + [%- FOREACH col = HEADER %] + + [%- END %] - - - - - - - - - - + [%- FOREACH row = DELIVERY %] + + + + + + + + + + + [%- END %]
 [% col.column_title %]
- -
+ + + [% HTML.escape(row.name) %] + [% HTML.escape(row.customernumber) %][% HTML.escape(row.address) %]
diff --git a/templates/webpages/generic/select_vendor_de.html b/templates/webpages/generic/select_vendor_de.html index e87c7290a..3fc4d31ed 100644 --- a/templates/webpages/generic/select_vendor_de.html +++ b/templates/webpages/generic/select_vendor_de.html @@ -1,14 +1,13 @@ -onload=""> +[% USE HTML %] - - + + + +
[% title %]
- - - @@ -19,23 +18,27 @@
Bitte einen Händler aus der Liste auswählen
- - - + [%- FOREACH col = HEADER %] + + [%- END %] - - - - - - - - - - + [%- FOREACH row = VENDOR %] + + + + + + + + + + + [%- END %]
 [% col.column_title %]
- -
+ + + [% HTML.escape(name) %] + [% HTML.escape(row.customernumber) %][% HTML.escape(row.address) %]
diff --git a/templates/webpages/generic/select_vendor_master.html b/templates/webpages/generic/select_vendor_master.html index f56b961db..51b30b614 100644 --- a/templates/webpages/generic/select_vendor_master.html +++ b/templates/webpages/generic/select_vendor_master.html @@ -1,14 +1,13 @@ -onload=""> +[% USE HTML %] - - + + + +
[% title %]
- - - @@ -19,23 +18,27 @@
Please select a vendor from the list below.
- - - + [%- FOREACH col = HEADER %] + + [%- END %] - - - - - - - - - - + [%- FOREACH row = VENDOR %] + + + + + + + + + + + [%- END %]
 [% col.column_title %]
- -
+ + + [% HTML.escape(name) %] + [% HTML.escape(row.customernumber) %][% HTML.escape(row.address) %]
diff --git a/templates/webpages/generic/set_longdescription_de.html b/templates/webpages/generic/set_longdescription_de.html index 5c1e34ce0..70747809d 100644 --- a/templates/webpages/generic/set_longdescription_de.html +++ b/templates/webpages/generic/set_longdescription_de.html @@ -1,26 +1,16 @@ -onload=""> +[% USE HTML %] - + - - - - - +
[% title %]
- +

Bitte den Langtext eingeben

- - - -
Bitte den Langtext eingeben
+

- - -
- +

diff --git a/templates/webpages/generic/set_longdescription_master.html b/templates/webpages/generic/set_longdescription_master.html index d9d75509c..e071b891d 100644 --- a/templates/webpages/generic/set_longdescription_master.html +++ b/templates/webpages/generic/set_longdescription_master.html @@ -1,26 +1,16 @@ -onload=""> +[% USE HTML %]
- + - - - - - +
[% title %]
- +

Please insert your longdescription below

- - - -
Please insert your longdescription below
+

- - -
- +