diff --git a/cgi-bin/weborder.pl b/cgi-bin/weborder.pl index 9e5ee632e1..7e85ced1b7 100755 --- a/cgi-bin/weborder.pl +++ b/cgi-bin/weborder.pl @@ -2,7 +2,7 @@ # ----------------------------------------------------------------------------- # Process merchandise order # ----------------------------------------------------------------------------- -# Copyright (C) 2008-2019 Free Software Foundation Europe +# Copyright (C) 2008-2022 Free Software Foundation Europe # # This program is free software: you can redistribute it and/or modify it under # the terms of the GNU Affero General Public License as published by the Free @@ -39,6 +39,8 @@ if ($query->param("url")) { my $name = decode("utf-8", $query->param("name")); my $address = decode("utf-8", $query->param("address")); +my $zip = decode("utf-8", $query->param("zip")); +my $city = decode("utf-8", $query->param("city")); my $country = decode("utf-8", $query->param("country")); my ($country_code, $country_name) = split /\|/, $country; my $email = decode("utf-8", $query->param("email")); @@ -55,7 +57,7 @@ if ($country_code eq 'DE') { } # Remove all parameters except for items and prices. -$query->delete("url", "name", "address", "country", "email", "phone", "language"); +$query->delete("url", "name", "address", "zip", "city", "country", "email", "phone", "language"); my $lang = substr $language, 0, 2; @@ -69,6 +71,12 @@ if (!$name) { exit; } +if (!$address or !$zip or !$city or !$country) { + print "Content-type: text/html\n\n"; + print "

Please enter your complete address!

\n"; + exit; +} + if (!$email) { print "Content-type: text/html\n\n"; print "

Please enter your email address!

\n"; @@ -119,7 +127,7 @@ my $reference = "MP" . $date . (substr $time, -4) . (sprintf "%03u", $amount); # Compile email text # ----------------------------------------------------------------------------- -my $body = "$name\n$address\n$country_name\nPhone: $phone\n\n"; +my $body = "$name\n$address\n$zip $city\n$country_name\nPhone: $phone\n\n"; foreach $item ($query->param) { $value = $query->param($item); @@ -153,6 +161,7 @@ push @odtfill, "/tmp/invoice.odt"; push @odtfill, "repeat=" . $count; push @odtfill, "Name=" . $name; push @odtfill, "Address=" . $address =~ s/\n/\\n/gr; +push @odtfill, "ZipCity=" . $zip . " " . $city; push @odtfill, "Country=" . $country_name; foreach $item ($query->param) { $value = $query->param($item); diff --git a/order/order.de.xhtml b/order/order.de.xhtml index 82c3895bbd..f6e774826d 100644 --- a/order/order.de.xhtml +++ b/order/order.de.xhtml @@ -87,7 +87,21 @@
-