[GRASS-SVN] r46342 - grass-web/trunk
svn_grass at osgeo.org
svn_grass at osgeo.org
Sat May 21 09:49:34 EDT 2011
Author: neteler
Date: 2011-05-21 06:49:33 -0700 (Sat, 21 May 2011)
New Revision: 46342
Modified:
grass-web/trunk/donation.inc
grass-web/trunk/donation.php
Log:
Stefano Cavallari: prettified
Modified: grass-web/trunk/donation.inc
===================================================================
--- grass-web/trunk/donation.inc 2011-05-21 12:58:43 UTC (rev 46341)
+++ grass-web/trunk/donation.inc 2011-05-21 13:49:33 UTC (rev 46342)
@@ -1,5 +1,52 @@
-<!-- MN -->
+<!-- MN, Stefano Cavallari -->
+<!-- Heavily based on http://wikimediafoundation.org#Donate/en -->
+<!-- Heavily based on http://donate.openstreetmap.org/ -->
+<!-- Believed to be GNU Free Documentation License -->
+
+<form method="post" action="process/paypal-submit.php" name="paypalcontribution" onsubmit="return validateForm(this)">
+<p><input type="hidden" name="gateway" value="paypal" /><input type="hidden" name="language" value="en" /></p>
+Contribute with your credit card through PayPal.
+<p>
+Amount:
+<p>
+ <input type="radio" name="amount" id="input_amount_1" onclick="document.paypalcontribution. amountGiven.value = '15'" /> <label for="input_amount_1">€15</label>    
+<br> <input type="radio" name="amount" id="input_amount_2" onclick="document.paypalcontribution. amountGiven.value = '30'" /><label for="input_amount_2"> €30</label>    
+<br> <input type="radio" name="amount" id="input_amount_3" onclick="document.paypalcontribution. amountGiven.value = '50'" /><label for="input_amount_3"> €50</label>    
+<br> <input type="radio" name="amount" id="input_amount_other" value="Other" /> <label for="input_amount_other">Other:</label> <input type="text" name="amountGiven" size="5" onfocus="this.form.input_amount_other.checked=true;" />  <!-- currency menu -->
+<p>
+<select name="currency_code" id="input_currency_code" size="1">
+<option value="EUR" selected="selected">EUR – £</option>
+<option value="XXX">-------</option>
+<option value="GBP">GBP – £</option>
+<option value="EUR">EUR – €</option>
+<option value="USD">USD - $</option>
+<option value="AUD">AUD – $</option>
+<option value="CAD">CAD – $</option>
+<option value="CHF">CHF –</option>
+
+<option value="CZK">CZK – Kč</option>
+
+<option value="DKK">DKK – kr</option>
+<option value="EUR">EUR – €</option>
+<option value="HKD">HKD – HK$</option>
+<option value="HUF">HUF – Ft</option>
+<option value="GBP">GBP – £</option>
+<option value="JPY">JPY – ¥</option>
+<option value="NZD">NZD – NZ$</option>
+
+<option value="NOK">NOK – kr</option>
+<option value="PLN">PLN – zł</option>
+
+<option value="SGD">SGD – S$</option>
+<option value="SEK">SEK – kr</option>
+<option value="USD">USD – $</option>
+</select>
+
+<p>Your credit card donation will be processed by PayPal. The charge will appear as "GRASS GIS" on your credit card statement.
+<input type="submit" value="DONATE" class="red-input-button">
+
+
<h3>Please donate to the GRASS GIS project!</h3>
Donation to the GRASS GIS project via Paypal:
Modified: grass-web/trunk/donation.php
===================================================================
--- grass-web/trunk/donation.php 2011-05-21 12:58:43 UTC (rev 46341)
+++ grass-web/trunk/donation.php 2011-05-21 13:49:33 UTC (rev 46342)
@@ -1,6 +1,12 @@
-<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
-<html>
+<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
+ "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
+<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en" dir="ltr">
<head>
+ <!-- Heavily based on http://wikimediafoundation.org#Donate/en -->
+ <!-- Heavily based on http://donate.openstreetmap.org/ -->
+ <!-- Believed to be GNU Free Documentation License -->
+ <meta http-equiv="Content-Language" content="en" />
+ <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>GRASS GIS Donation page</title>
<meta name="robots" content="index,follow">
<meta name="description"
@@ -10,11 +16,66 @@
vector, image processing, and visualization functionality">
<meta name="keywords"
content="gis, GIS, GRASS, open source,
- free software, Geographical Information System, raster, topology,
+ free software, Geographical Information System, raster, topology,
vector, image processing, visualization">
<meta name="Author" content="Markus Neteler">
- <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<link rel="stylesheet" href="sitestyle.css" type="text/css">
+ <script type="text/javascript" src="js/main.js"></script>
+
+<script type="text/javascript" language="javascript">
+//<![CDATA[
+function validateForm( form ) {
+ var minimums = {
+ 'USD' : 1,
+ 'GBP' : 1, // $1.26
+ 'EUR' : 1, // $1.26
+ 'AUD' : 2, // $1.35
+ 'CAD' : 1, // $0.84
+ 'CHF' : 1, // $0.85
+ 'CZK' : 20, // $1.03
+ 'DKK' : 5, // $0.85
+ 'HKD' : 10, // $1.29
+ 'HUF' : 200, // $0.97
+ 'JPY' : 100, // $1
+ 'NZD' : 2, // $1.18
+ 'NOK' : 10, // $1.44
+ 'PLN' : 5, // $1.78
+ 'SGD' : 2, // $1.35
+ 'SEK' : 10 // $1.28
+ };
+
+ var error = true;
+
+ // Get amount selection
+ var amount = null;
+ for ( var i = 0; i < form.amount.length; i++ ) {
+ if ( form.amount[i].checked ) {
+ amount = form.amount[i].value;
+ }
+ }
+ if ( form.amountGiven.value != "" ) {
+ amount = form.amountGiven.value;
+ }
+ // Check amount is a real number
+ error = ( amount == null || isNaN( amount ) || amount.value <= 0 );
+ if ( error ) {
+ alert( 'You must enter a valid amount.' );
+ }
+
+ // Check amount is at least the minimum
+ var currency = form.currency_code[form.currency_code.selectedIndex].value;
+ if ( typeof( minimums[currency] ) == 'undefined' ) {
+ minimums[currency] = 1;
+ }
+ if ( amount < minimums[currency] ) {
+ alert( 'You must contribute at least $1'.replace('$1', minimums[currency] + ' ' + currency ) );
+ error = true;
+ }
+
+ return !error;
+}
+//]]>
+</script>
</head>
<body>
<!-- TOP LOGO LINE -->
@@ -70,7 +131,7 @@
<td valign="top" class="leftmenu"> <!-- MAIN PART -->
<?php
- include("donation.inc");
+ include("d_test.inc");
?>
<!-- END MAIN PART -->
More information about the grass-commit
mailing list