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

by Werner Koch cvs at cvs.gnupg.org
Thu May 11 18:11:40 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  d4eead11e4e3341a7e6bf6cfaabfd7feeb4d1842 (commit)
      from  f2c61e993ac595e7b9736d229b2219f3e37f9571 (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 d4eead11e4e3341a7e6bf6cfaabfd7feeb4d1842
Author: Werner Koch <wk at gnupg.org>
Date:   Thu May 11 18:04:42 2017 +0200

    cgi: Provide presets for the campaign page.
    
    This also inserts the server side variables for the progress bar.
    Thus do not wonder that there are no values currently.

diff --git a/cgi/procdonate.cgi b/cgi/procdonate.cgi
index f2860c6..fda31c1 100755
--- a/cgi/procdonate.cgi
+++ b/cgi/procdonate.cgi
@@ -776,6 +776,23 @@ elsif ($mode eq '') {
     # No mode: Show empty template.
     write_main_page();
 }
+elsif ($mode eq 'preset') {
+    # Show a a template with certain preset values.
+    $currency = 'EUR';
+    $recur = '12';
+    $paytype = 'cc';
+    if ($q->param('plan') eq '12-5-eur' ) {
+        $amount = '5';
+    }
+    elsif ($q->param('plan') eq '12-10-eur' ) {
+        $amount = '10';
+    }
+    elsif ($q->param('plan') eq '12-20-eur' ) {
+        $amount = '20';
+    }
+
+    write_main_page();
+}
 elsif ($mode eq 'ping') {
     # Check aliveness
     ping_pong();
diff --git a/tools/append-to-donors.sh b/tools/append-to-donors.sh
index cd87f43..bb17894 100755
--- a/tools/append-to-donors.sh
+++ b/tools/append-to-donors.sh
@@ -2,6 +2,12 @@
 # append-to-donors.sh
 # Append new names from the payproc journal to the donors file
 # and send a Thank You mail.
+#
+# Note that this script does not yet handle subscriptions.  Because we
+# want to verify the mail address anyway, it makes sense to move mai
+# sending to payprocd.  The final plan is to use webhooks to create
+# charge records and use them to add a Donor reulary to the list of
+# donors (but may be limited to once a year)
 
 pgm="append-to-donors.sh"
 set -e
diff --git a/web/donate/index.org b/web/donate/index.org
index fd8a78d..06109f5 100644
--- a/web/donate/index.org
+++ b/web/donate/index.org
@@ -70,29 +70,51 @@
 	  <div class="row">
 	    <div class="col-xs-12">
 	      <div class="progress">
-		<div class="progress-bar progress-bar-striped active" role="progressbar" aria-valuenow="1337" aria-valuemin="0" aria-valuemax="15000" style="width: 9%">
-		  <span class="sr-only">1,337 € a month</span>
+		<div class="progress-bar progress-bar-striped active"
+                     role="progressbar"
+                     aria-valuenow="<!--CMPGN-RECUR-EURO-->"
+                     aria-valuemin="0"
+                     aria-valuemax="<!--CMPGN-RECUR-EURO-GOAL-->"
+                     style="width: 9%">
+		  <span class="sr-only"><!--CMPGN-RECUR-EURO--> €
+                    a month</span>
 		</div>
 	      </div>
 	    </div>
 	    <div class="col-xs-12 col-sm-6 col-lg-12 camp-progress-info">
-	      <h3>1,337 € a month <small>of 15,000 € needed</small></h3>
-	      <h4>+ 10,000 € <small>in one-time donations</small></h4>
-	      <h4>42 <small>Supporters</small></h4>
+	      <h3><!--CMPGN-RECUR-EURO--> €
+                  a month <small>of
+                  <!--CMPGN-RECUR-EURO-GOAL--> €
+                  needed</small>
+              </h3>
+	      <h4>+
+                <!--CMPGN-ONCE-EURO--> €
+                <small>in one-time donations</small>
+              </h4>
+	      <h4><!--CMPGN-RECUR-COUNT-->
+                <small>Supporters</small>
+              </h4>
 	    </div>
 	    <div class="col-xs-12 col-sm-6 col-lg-12">
-	      <a class="btn btn-primary btn-lg btn-block" href="/donate/donate.html" role="button">Donate 10 € a month</a>
+	      <a class="btn btn-primary btn-lg btn-block" role="button"
+                 href="/cgi-bin/procdonate.cig?mode=preset;plan=12-10-eur"
+                 >Donate 10 € a month</a>
 	      <div class="row" style="margin-top: 1em;">
 		<div class="col-xs-6">
-		  <a class="btn btn-default btn-md btn-block" href="/donate/donate.html" role="button">5 € a month</a>
+		  <a class="btn btn-default btn-md btn-block" role="button"
+                     href="/cgi-bin/procdonate.cig?mode=preset;plan=12-5-eur"
+                     >5 € a month</a>
 		</div>
 		<div class="col-xs-6">
-		  <a class="btn btn-default btn-md btn-block" href="/donate/donate.html" role="button">20 € a month</a>
+		  <a class="btn btn-default btn-md btn-block" role="button"
+                     href="/cgi-bin/procdonate.cig?mode=preset;plan=12-20-eur"
+                     >20 € a month</a>
 		</div>
 	      </div>
 	      <div class="row text-center" style="margin-top: 1em;">
-		<a style="margin-top: 1em;" href="/donate/donate.html">Donate a
-		  different amount</a>
+		<a style="margin-top: 1em;"
+                   href="/cgi-bin/procdonate.cig?mode=preset"
+                   >Donate a different amount</a>
 	      </div>
 	    </div>
 	  </div>

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

Summary of changes:
 cgi/procdonate.cgi        | 17 +++++++++++++++++
 tools/append-to-donors.sh |  6 ++++++
 web/donate/index.org      | 42 ++++++++++++++++++++++++++++++++----------
 3 files changed, 55 insertions(+), 10 deletions(-)


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




More information about the Gnupg-commits mailing list