Browse Source

display thank-you page in correct language

svn path=/branches/test/; revision=24244
pull/8/head
paul 9 years ago
parent
commit
647672e997
4 changed files with 54 additions and 2 deletions
  1. +5
    -2
      cgi-bin/orderpromo.pl
  2. +23
    -0
      order/orderpromo-error.en.xhtml
  3. +23
    -0
      order/orderpromo-thanks.en.xhtml
  4. +3
    -0
      order/promopack.en.xhtml

+ 5
- 2
cgi-bin/orderpromo.pl View File

@ -15,6 +15,7 @@ my $email = $query->param("email");
my $address = $query->param("address");
my $specifics = $query->param("specifics");
my $comment = $query->param("comment");
my $lang = $query->param("language");
if (
# validate input (more or less)
@ -46,15 +47,17 @@ $specifics
Comments:
$comments
Preferred language was: $lang
KTHXBYE
Your friendly automatic web order program.
";
close MAIL;
print "Location: /order/orderpromo-thanks.en.html\n\n";
print "Location: /order/orderpromo-thanks.$lang.html\n\n";
} else {
#something was wrong with the input
print "Location: /order/orderpromo-error.en.html\n\n";
print "Location: /order/orderpromo-error.$lang.html\n\n";
}

+ 23
- 0
order/orderpromo-error.en.xhtml View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<html>
<head>
<title>Free Software Foundation Europe - Ooops, there is something wrong with your input!</title>
</head>
<body>
<h1>Ooops, there is something wrong with your input!</h1>
<p>
Please make sure you entered your name, email, address, and the order itself. Comments are optional.
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

+ 23
- 0
order/orderpromo-thanks.en.xhtml View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<html>
<head>
<title>Free Software Foundation Europe - Thank you for your order!</title>
</head>
<body>
<h1>Thank you for your order!</h1>
<p>
Our team will see to it that the promotional material is sent to you. You may receive further questions and querys in this matter via mail.
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

+ 3
- 0
order/promopack.en.xhtml View File

@ -33,6 +33,8 @@ in general we just send packages up to 1kg. If you need more, please ask.</p>
<form class="highlight" id="orderpromo" method="post" action="/cgi-bin/orderpromo.pl" accept-charset="utf-8">
<!-- Translators: please set the value for the language to your language code -->
<input type="hidden" name="language" value="en" />
<h3>Please send promotional material to:</h3>
<span class="formlabel">First name, Last name:</span>
<input type="text" name="firstname" placeholder="First Name" size="20" />
@ -55,6 +57,7 @@ Some stickers:
<span class="formlabel">Any comment:</span>
<textarea name="comment" rows="4" cols="40"></textarea><br/>
<input type="submit" name="url" value="I am a spam robot" style="display:none;" />
<!-- Translators: please translate the label of this button (the value field) -->
<input type="submit" name="dothis" value="Order now!"/>
<input type="submit" name="url" value="I am a spam robot" style="display:none;" /><br/>
</form>


Loading…
Cancel
Save