nordic free software award nomination form

svn path=/branches/test/; revision=24409
This commit is contained in:
paul 2012-09-21 00:03:09 +00:00
parent b3889e67f3
commit b5e46a492a
7 changed files with 202 additions and 7 deletions

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 the nominees name, short biography, website, contact information (at least one of email or phone number, or postal address) and a few lines about the persons motivation.
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="utf-8" ?>
<html>
<head>
<title>Free Software Foundation Europe - Thank you for the suggestion!</title>
</head>
<body>
<h1>Thank you for the suggestion!</h1>
<p>
The specified person will be nominated for the Nordic Free Softwae Award.
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

View File

@ -0,0 +1,72 @@
<?xml version="1.0" encoding="utf-8" ?>
<html>
<head>
<title>Nordic Free Software Award</title>
</head>
<body>
<h1>Nordic Free Software Award</h1>
<p>
The Nordic Free Software Award is given to people, projects or organisations in the Nordic countries that have made a prominent contribution to the advancement of Free Software. The award will be announced in November 2012.
</p>
<p>
<h2>Nominate</h2>
<form class="labeledform" id="nfsa-award" method="post" action="/cgi-bin/nfsa-nominate.pl" accept-charset="utf-8">
To nominate a person, please enter information about this person.
<!-- Translators: please set the value for the language to your language code -->
<input type="hidden" name="language" value="en" />
<span class="formlabel">First name, Last name:</span>
<input type="text" name="firstname" placeholder="First Name" size="20" />
<input type="text" name="lastname" placeholder="Last Name" size="20" /><br/>
<span class="formlabel">Short Biography:</span>
<textarea name="biography" rows="6" cols="40"></textarea><br/>
<span class="formlabel">Website:</span>
<input type="text" name="website" placeholder="Email" size="40" /><br/>
<span class="formlabel">Email:</span>
<input type="text" name="email" placeholder="Email" size="40" /><br/>
<span class="formlabel">Phone:</span>
<input type="text" name="phone" placeholder="Telephone Number" size="40" /><br/>
<span class="formlabel">Postal Address:</span>
Street:<input type="text" name="street" size="40" /><br/>
City, Zip:<input type="text" name="city" size="40" /><br/>
Country:<input type="text" name="country" size="40" /><br/>
<span class="formlabel">Motivation:</span>
<textarea name="motivation" 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>
Send an email to award [AT] fscons.org (moderated mailing list) with
the following information:
* Name of nominee
* Bio of nominee
* Website
* Contact info
* Motivation
</p>
<p>
<h2>Previous Award winners</h2>
<ul>
<li>2011 Erik Josefsson<br /> <a href="http://fsfe.org/news/2011/news-20111114-01.en.html">http://fsfe.org/news/2011/news-20111114-01.en.html</a></li>
<li>2010 Bjarni Rúnar Einarsson<br /> <a href="http://fsfe.org/news/2010/news-20101108-01.en.html">http://fsfe.org/news/2010/news-20101108-01.en.html</a></li>
<li>2009 Simon Josefsson and Daniel Stenberg<br /> <a href="https://fscons.org/2009/award/">https://fscons.org/2009/award/</a></li>
<li>2008 Mats Östling<br /> <a href="https://fscons.org/2008/award/">https://fscons.org/2008/award/</a></li>
<li>2007 SkoleLinux?<br /> <a href="https://fscons.org/2007/award-winner">https://fscons.org/2007/award-winner</a></li>
</ul>
</p>
</body>
<timestamp>$Date$ $Author$</timestamp>
</html>
<!--
Local Variables: ***
mode: xml ***
End: ***
-->

78
cgi-bin/nfsa-nominate.pl Executable file
View File

@ -0,0 +1,78 @@
#!/usr/bin/perl
use CGI;
use POSIX qw(strftime);
my $query = new CGI;
my $date = strftime "%Y-%m-%d", localtime;
my $time = strftime "%s", localtime;
my $reference = "nomination.$date." . substr $time, -5;
# technically we only need the last name for shipping
my $firstname = $query->param("firstname");
my $lastname = $query->param("lastname");
my $email = $query->param("email");
my $phone = $query->param("phone");
my $website = $query->param("website");
my $street = $query->param("street");
my $city = $query->param("city");
my $country = $query->param("country");
#my $address = $query->param("address");
my $biography = $query->param("biography");
my $motivation = $query->param("motivation");
my $lang = $query->param("language");
if (
# validate input (more or less)
$firstname and $lastname and
( $email
or $phone
or ($street
and $city
and $country)
)
and $website
and $biography and $motivation
and not $query->param("url")
) {
#send mail
open(MAIL, "|/usr/lib/sendmail -t -f $email");
print MAIL
"Content-Transfer-Encoding: 8bit
Content-type: text/plain; charset=UTF-8
From: $email
To: paul\@fsfe.org
Subject: [NFSA Nomination] $reference $firstname $lastname
This person was just nominated for a Nordic Free Software Award:
First Name: $firstname
Last Name: $lastname
EMail: $email
Phone: $phone
Website: $website
Address:
$street
$city
$country
Biography:
$biography
Motivation:
$motivation
Preferred language was: $lang
";
close MAIL;
print "Location: http://fsfe.org/activities/nordic-free-software-award/nfsa-nominate-thanks.$lang.html\n\n";
} else {
#something was wrong with the input
print "Location: http://fsfe.org/activities/nordic-free-software-award/nfsa-nominate-error.$lang.html\n\n";
}

View File

@ -30,8 +30,7 @@ if (
open(MAIL, "|/usr/lib/sendmail -t -f promoorder\@fsfe.org");
print MAIL
"From: promoorder\@fsfe.org
To: assist\@fsfe.org
Cc: paul\@fsfe.org
To: paul\@fsfe.org
Subject: $reference $firstname $lastname
Hey, someone ordered promotional material:
@ -55,10 +54,10 @@ Your friendly automatic web order program.
";
close MAIL;
print "Location: /order/orderpromo-thanks.$lang.html\n\n";
print "Location: http://test.fsfe.org/order/orderpromo-thanks.$lang.html\n\n";
} else {
#something was wrong with the input
print "Location: /order/orderpromo-error.$lang.html\n\n";
print "Location: http://test.fsfe.org/order/orderpromo-error.$lang.html\n\n";
}

View File

@ -643,14 +643,14 @@ p#introduction {
/* ------------------------------------------------------------------------- */
/* Promopack order form */
/* ------------------------------------------------------------------------- */
#orderpromo .formlabel {
.labeledform .formlabel {
font-weight: bold;
display: inline-block;
text-align: right;
vertical-align: top;
width: 30%;
}
#orderpromo textarea {
.labeledform .formlabel {
display: inline-block;
}

View File

@ -32,7 +32,7 @@ special FSFE`s campaign. Please keep in mind, that for postal reasons,
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">
<form class="highlight labeledform" 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>