gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-donations] branch master updated (24adbec -> a190a40


From: gnunet
Subject: [GNUnet-SVN] [taler-donations] branch master updated (24adbec -> a190a40)
Date: Mon, 22 Jan 2018 21:09:03 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a change to branch master
in repository donations.

    from 24adbec  put currency in all templates
     new 4cc9281  Revert "put currency in all templates"
     new a190a40  fulfillment text

The 2 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 talerdonations/donations/donations.py         | 11 +++++------
 talerdonations/donations/templates/index.html | 16 ++++++++--------
 2 files changed, 13 insertions(+), 14 deletions(-)

diff --git a/talerdonations/donations/donations.py 
b/talerdonations/donations/donations.py
index dc0657b..5ba4628 100644
--- a/talerdonations/donations/donations.py
+++ b/talerdonations/donations/donations.py
@@ -40,9 +40,6 @@ CURRENCY = TC["taler"]["currency"].value_string(required=True)
 
 app.config.from_object(__name__)
 
-# Will be available in templates
-flask.g.currency = CURRENCY
-
 @app.context_processor
 def utility_processor():
     def env(name, default=None):
@@ -102,7 +99,7 @@ def internal_error(e):
 
 @app.route("/")
 def index():
-    return flask.render_template("templates/index.html")
+    return flask.render_template("templates/index.html", 
merchant_currency=CURRENCY)
 
 @app.route("/javascript")
 def javascript_licensing():
@@ -118,7 +115,8 @@ def checkout():
         "templates/checkout.html",
         donation_amount=amount,
         donation_receiver=donation_receiver,
-        donation_donor=donation_donor)
+        donation_donor=donation_donor,
+        merchant_currency=CURRENCY)
 
 
 @app.route("/provider-not-supported")
@@ -167,7 +165,8 @@ def fulfillment(receiver):
             donation_receiver=extra["receiver"],
             donation_amount=extra["amount"],
             donation_donor=extra["donor"],
-            order_id=order_id)
+            order_id=order_id,
+            currency=CURRENCY)
 
     # no pay_redirect but article not paid, this should never happen!
     err_abort(500, message="Internal error, invariant failed", json=pay_status)
diff --git a/talerdonations/donations/templates/index.html 
b/talerdonations/donations/templates/index.html
index a8a05dc..b384362 100644
--- a/talerdonations/donations/templates/index.html
+++ b/talerdonations/donations/templates/index.html
@@ -4,7 +4,7 @@
 <h1 lang="en">Welcome to the Taler Donation "Shop" Demo</h1>
 
 <p>This toy donations website shows the user experience for donations with 
Taler.
-You are paying with an imaginary currency ({{ g.merchant_currency }}).
+You are paying with an imaginary currency ({{ merchant_currency }}).
 </p>
 
 <div class="taler-installed-hide">
@@ -23,7 +23,7 @@ You are paying with an imaginary currency ({{ 
g.merchant_currency }}).
 </div>
 
 <div class="taler-installed-show">
-  <p>Please select a project, the amount (*) of {{ g.merchant_currency }} you
+  <p>Please select a project, the amount (*) of {{ merchant_currency }} you
     wish to donate, and enter the name that will appear on your receipt:</p>
 
   <form name="tform" action="checkout" method="GET" class="pure-form">
@@ -34,19 +34,19 @@ You are paying with an imaginary currency ({{ 
g.merchant_currency }}).
         <option value="Tor">Tor</option>
       </select>
       <select id="taler-donation" name="donation_amount">
-        <option value="{{ g.merchant_currency }}:0.1">0.1 {{ 
g.merchant_currency }}</option>
-        <option value="{{ g.merchant_currency }}:1">1 {{ g.merchant_currency 
}}</option>
-        <option value="{{ g.merchant_currency }}:6">5 {{ g.merchant_currency 
}}</option>
-        <option value="{{ g.merchant_currency }}:10">10 {{ g.merchant_currency 
}}</option>
+        <option value="{{ merchant_currency }}:0.1">0.1 {{ merchant_currency 
}}</option>
+        <option value="{{ merchant_currency }}:1">1 {{ merchant_currency 
}}</option>
+        <option value="{{ merchant_currency }}:6">5 {{ merchant_currency 
}}</option>
+        <option value="{{ merchant_currency }}:10">10 {{ merchant_currency 
}}</option>
       </select>
       <input type="text" name="donation_donor" value="Anonymous Donor" />
       <input type="submit" class="pure-button pure-button-primary" 
value="Donate!" />
     </div>
   </form>
   <p>
-    (*) To make it a bit more fun, the 5 {{ g.merchant_currency }} option is
+    (*) To make it a bit more fun, the 5 {{ merchant_currency }} option is
     deliberately implemented with a fault: the merchant will try to make you
-    donate 6 {{ g.merchant_currency }} instead of the 5 {{ g.merchant_currency 
}} you
+    donate 6 {{ merchant_currency }} instead of the 5 {{ merchant_currency }} 
you
     got to see.  But do not worry, you will be given the opportunity to review
     the final offer from the merchant in a window secured by the Taler
     extension.  That way, you can spot the error before committing to an

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]