[git] gnupg-doc - branch, preview, updated. dc2082d1e6da874f3170a4b6e2176dd049185bf9

by Werner Koch cvs at cvs.gnupg.org
Thu May 4 10:09:06 CEST 2017


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "The GnuPG website and other docs".

The branch, preview has been updated
       via  dc2082d1e6da874f3170a4b6e2176dd049185bf9 (commit)
      from  7322ee29adae530d80e8965fbca51e91e4728916 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit dc2082d1e6da874f3170a4b6e2176dd049185bf9
Author: Werner Koch <wk at gnupg.org>
Date:   Thu May 4 10:06:07 2017 +0200

    web: Move donation form to donate.org and adjust procdonate.

diff --git a/cgi/procdonate.cgi b/cgi/procdonate.cgi
index 650f803..c0894af 100755
--- a/cgi/procdonate.cgi
+++ b/cgi/procdonate.cgi
@@ -39,6 +39,7 @@ my $paytype = "";
 my $stripeamount = "";
 my $euroamount = "";
 my $currency = "";
+my $recur = "";
 my $name = "";
 my $mail = "";
 my $message = "";
@@ -77,6 +78,10 @@ sub write_template ($) {
     my $sel_usd = '';
     my $sel_gbp = '';
     my $sel_jpy = '';
+    my $recur_none = '';
+    my $recur_month = '';
+    my $recur_quarter = '';
+    my $recur_year = '';
     my $message_fmt;
     my $publishname;
     my $check_paytype = 'none';
@@ -85,6 +90,7 @@ sub write_template ($) {
     $amount =~ s/\x22/\x27/g;
     $stripeamount =~ s/\x22/\x27/g;
     $currency =~ s/\x22/\x27/g;
+    $recur =~ s/\x22/\x27/g;
     $name =~ s/\x22/\x27/g;
     $mail =~ s/\x22/\x27/g;
     $message =~ s/\x22/\x27/g;
@@ -95,6 +101,7 @@ sub write_template ($) {
     $amount =~ s/</\x26lt;/g;
     $stripeamount =~ s/</\x26lt;/g;
     $currency =~ s/</\x26lt;/g;
+    $recur =~ s/</\x26lt;/g;
     $name =~ s/</\x26lt;/g;
     $mail =~ s/</\x26lt;/g;
     $message =~ s/</\x26lt;/g;
@@ -116,6 +123,16 @@ sub write_template ($) {
         $sel_jpy = ' selected="selected"';
     }
 
+    if ( $recur =~ /0/ ) {
+        $recur_none    = ' selected="selected"';
+    } elsif ( $recur =~ /12/ ) {
+        $recur_month   = ' selected="selected"';
+    } elsif ( $recur =~ /4/ ) {
+        $recur_quarter = ' selected="selected"';
+    } elsif ( $recur =~ /1/ ) {
+        $recur_year    = ' selected="selected"';
+    }
+
     if ( $paytype eq "cc" ) {
         $check_paytype = "CC";
     } elsif ( $paytype eq "pp" ) {
@@ -171,6 +188,10 @@ sub write_template ($) {
             || s/(<selected=\x22selected\x22)?><!--SEL_USD-->/$sel_usd>/
             || s/(<selected=\x22selected\x22)?><!--SEL_GBP-->/$sel_gbp>/
             || s/(<selected=\x22selected\x22)?><!--SEL_JPY-->/$sel_jpy>/
+            || s/(<selected=\x22selected\x22)?><!--RECUR_NONE-->/$recur_none>/
+            || s/(<selected=\x22selected\x22)?><!--RECUR_MONTH-->/$recur_month>/
+            || s/(<selected=\x22selected\x22)?><!--RECUR_QUARTER-->/$recur_quarter>/
+            || s/(<selected=\x22selected\x22)?><!--RECUR_YEAR-->/$recur_year>/
             || s/<!--PUBLISH_NAME-->/$publishname/
             || s/<!--SEPA_REF-->/$separef/
             || s/<!--ERRORSTR-->/$errorstr/
@@ -298,7 +319,7 @@ sub write_main_page ()
 {
     print $q->header(-type=>'text/html', -charset=>'utf-8');
     print "\n";
-    write_template("donate/index.html");
+    write_template("donate/donate.html");
 }
 
 
@@ -337,7 +358,7 @@ sub check_donation ()
     my %sepa;
     my $anyerr = 0;
 
-    # Note: When re-displaying the page we always use amount other
+    # Note: When re-displaying the page we always use amount "other"
     # because that is easier to implement than figuring out which
     # amount and currency was used and check the appropriate radio
     # button.
@@ -349,21 +370,24 @@ sub check_donation ()
       $currency = 'EUR';
     }
 
+    $recur = $q->param("recur");
     $name = $q->param("name");
     $name = 'Anonymous' if $name eq '';
     $mail = $q->param("mail");
     $message = $q->param("message");
     $stripeamount = "0";
 
-    # Check the amount.
+    # Check the amount and the recurring value
     $data{"Amount"} = $amount;
     $data{"Currency"} = $currency;
+    $data{"Recur"} = $recur;
     if (not payproc ('CHECKAMOUNT', \%data )) {
         $errdict{"amount"} = $data{"ERR_Description"};
         $anyerr = 1;
     }
     $stripeamount = $data{"_amount"};
     $amount = $data{"Amount"};
+    $recur = $data{"Recur"};
     $currency = $data{"Currency"};
     $euroamount = $data{"Euro"};
 
@@ -433,6 +457,7 @@ sub resend_main_page ()
     payproc ('SESSION get ' . $sessid, \%data) or fail $data{"ERR_Description"};
     $amount = $data{"Amount"};
     $currency = $data{"Currency"};
+    $recur = $data{"Recur"};
     $paytype = $data{"Paytype"};
     $stripeamount = $data{"Stripeamount"};
     $euroamount = $data{"Euroamount"};
diff --git a/web/donate/index.org b/web/donate/donate.org
similarity index 93%
copy from web/donate/index.org
copy to web/donate/donate.org
index fe13ab3..f645796 100644
--- a/web/donate/index.org
+++ b/web/donate/donate.org
@@ -56,7 +56,7 @@
     <tr>
       <td align="right">Recurring:</td>
       <td>
-          <select name="recurring" size="1">
+          <select name="recur" size="1">
             <option value="0"
             selected="selected"><!--RECUR_NONE-->Just once</option>
             <option value="12" ><!--RECUR_MONTH-->Monthly</option>
@@ -148,20 +148,6 @@
   </form>
 
 
-<p>Recent donors</p>
-
-<div id="tagcloudlist"><ul>
-<!--BEGIN-SOME-DONATIONS-->
-<!--END-SOME-DONATIONS-->
-<li><a href="/donate/kudos.html">(all)</a></li>
-</ul><p class="doclear"> </p></div>
-<p>Donations received in
-<!--INSERT-THIS-YEAR-->
-: 
-<!--INSERT-YEAR-EURO-->
-</p>
-
-
 </body>
 </html>
 #+END_HTML
diff --git a/web/donate/index.org b/web/donate/index.org
index fe13ab3..d34a02b 100644
--- a/web/donate/index.org
+++ b/web/donate/index.org
@@ -12,141 +12,18 @@
 </head>
 <body>
 
+<blockquote>
+<p>
+Arguing that you don't care about the right to privacy
+because you have nothing to hide is no different from
+saying you don't care about free speech because you have
+nothing to say.   – Edward Snowden
+</p>
+</blockquote>
 
-  <!--ERRORPANEL-->
-
-  <form action="/cgi-bin/procdonate.cgi" method="post" class="inputpanel">
-   <input type="hidden" name="mode" value="main">
-   <p class="ii">Keep this field clear:
-                 <input type="text" size="40" name="url"></p>
-   <table border="0" cellpadding="0" cellspacing="4">
-    <tr>
-      <td></td>
-      <td>How much do you want to donate?<br/>
-          <span class="smallnote">(choosing “other” allows
-          to donate in other currencies)</span></td>
-    </tr>
-    <tr>
-      <td align="right">Amount:</td>
-      <td>
-          <label><input type="radio" name="amount" value="500"/>500 EUR</label>
-          <label><input type="radio" name="amount" value="200"/>200 EUR</label>
-          <label><input type="radio" name="amount" value="100"/>100 EUR</label>
-          <label><input type="radio" name="amount" value="50"/>50 EUR</label>
-          <label><input type="radio" name="amount" value="20"/>20 EUR</label>
-          <label><input type="radio" name="amount" value="5"/>5 EUR</label>
-      </td>
-    </tr>
-    <tr>
-      <td></td>
-      <td>
-          <input type="radio" name="amount"
-                              value="other"/><!--CHECKOTHER-->other:
-          <input type="text"  size="6" name="amountother"
-                              value=""/><!--AMOUNT-->
-          <select name="currency" size="1">
-            <option value="EUR" selected="selected"><!--SEL_EUR-->Euro</option>
-            <option value="USD" ><!--SEL_USD-->US Dollar</option>
-            <option value="GBP" ><!--SEL_GBP-->British Pound</option>
-            <option value="JPY" ><!--SEL_JPY-->Yen</option>
-          </select>
-          <!--ERR_AMOUNT-->
-      </td>
-    </tr>
-    <tr>
-      <td align="right">Recurring:</td>
-      <td>
-          <select name="recurring" size="1">
-            <option value="0"
-            selected="selected"><!--RECUR_NONE-->Just once</option>
-            <option value="12" ><!--RECUR_MONTH-->Monthly</option>
-            <option value="4" ><!--RECUR_QUARTER-->Quarterly</option>
-            <option value="1" ><!--RECUR_YEAR-->Yearly</option>
-          </select>
-      </td>
-    </tr>
-   <tr><td> </td></tr>
-    <tr>
-      <td align="right">Pay using:</td>
-      <td>
-        <label><input type="radio" name="paytype"
-                      value="cc" /><!--CHECK_CC-->Credit Card</label>
-        <!--ERR_PAYTYPE-->
-      </td>
-   </tr>
-   <tr>
-     <td></td>
-     <td>
-       <label><input type="radio" name="paytype"
-                     value="pp" /><!--CHECK_PP-->PayPal</label>
-     </td>
-   </tr>
-   <tr>
-     <td></td>
-     <td>
-       <label><input type="radio" name="paytype"
-                     value="se" /><!--CHECK_SE-->SEPA (European bank transfer)</label>
-     </td>
-   </tr>
-   <tr><td> </td></tr>
-   <tr>
-      <td></td>
-      <td>
-          If you want to be listed on the
-          <a href="/donate/kudos.html">list of donors</a>,
-          please enter your name as it shall appear there.
-      </td>
-    </tr>
-    <tr>
-      <td align="right"><label for="f_name">Name:</label></td>
-      <td>
-          <input id="f_name" type="text"
-                 size="40" style="width:200px" name="name"
-                 value=""/><!--NAME--> (optional)
-          <!--ERR_NAME-->
-      </td>
-    </tr>
-    <tr>
-      <td></td>
-      <td>
-          In case of payment problems we may want to contact you, thus please
-          enter your e-mail address.
-      </td>
-    </tr>
-    <tr>
-      <td align="right"><label for="f_mail">E-mail:</label></td>
-      <td>
-          <input id="f_mail" type="text" size="40" style="width:200px"
-                 name="mail"
-                 value=""/><!--MAIL--> (optional)
-           <!--ERR_MAIL-->
-      </td>
-    </tr>
-    <tr>
-      <td></td>
-      <td>
-          If you want to leave a message for us, please enter it here:
-      </td>
-    </tr>
-    <tr>
-      <td></td>
-      <td>
-          <textarea cols="40" rows="4" style="width:500px" name="message"
-                    ></textarea><!--MESSAGE-->
-      </td>
-    </tr>
-    <tr>
-      <td></td>
-      <td>
-        <div class="buttonbox">
-          <input type="submit" class="donate-button-low"
-                 value="Proceed to checkout" />
-         </div>
-      </td>
-    </tr>
-   </table>
-  </form>
-
+<p>
+Please <a href="/cgi-bin/procdonate.cgi">donate</a>".
+</p>
 
 <p>Recent donors</p>
 

-----------------------------------------------------------------------

Summary of changes:
 cgi/procdonate.cgi                   |  31 +++++++-
 web/donate/{index.org => donate.org} |  16 +---
 web/donate/index.org                 | 145 +++--------------------------------
 3 files changed, 40 insertions(+), 152 deletions(-)
 copy web/donate/{index.org => donate.org} (93%)


hooks/post-receive
-- 
The GnuPG website and other docs
http://git.gnupg.org




More information about the Gnupg-commits mailing list