diff options
author | MS <ms@taler.net> | 2020-07-22 16:11:30 +0200 |
---|---|---|
committer | MS <ms@taler.net> | 2020-07-22 16:11:30 +0200 |
commit | 3ca29bf465d0419c0915924910b4e81a73ec8cef (patch) | |
tree | 66a221ee0116abceb0179ddabc03040b0b3c7c1c /talermerchantdemos/donations/templates | |
parent | 147658b30dfbce61f6f4e087a0c81e85899dda15 (diff) | |
download | taler-merchant-demos-3ca29bf465d0419c0915924910b4e81a73ec8cef.tar.gz taler-merchant-demos-3ca29bf465d0419c0915924910b4e81a73ec8cef.tar.bz2 taler-merchant-demos-3ca29bf465d0419c0915924910b4e81a73ec8cef.zip |
import static files
Diffstat (limited to 'talermerchantdemos/donations/templates')
8 files changed, 295 insertions, 0 deletions
diff --git a/talermerchantdemos/donations/templates/base.html b/talermerchantdemos/donations/templates/base.html new file mode 100644 index 0000000..86f81a9 --- /dev/null +++ b/talermerchantdemos/donations/templates/base.html @@ -0,0 +1,55 @@ +<!DOCTYPE html> +<!-- + This file is part of GNU TALER. + Copyright (C) 2014, 2015, 2016 INRIA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU Lesser General Public License as published by the Free Software + Foundation; either version 2.1, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. + + You should have received a copy of the GNU Lesser General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> +--> + +<html data-taler-nojs="true"> +<head> + <title>Taler Donation Demo</title> + <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='web-common/pure.css') }}" /> + <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='web-common/demo.css') }}" /> + <link rel="stylesheet" type="text/css" href="{{ url_for('static', filename='web-common/taler-fallback.css') }}" id="taler-presence-stylesheet" /> + {% block styles %}{% endblock %} + {% block scripts %}{% endblock %} +</head> + +<body> + <div class="demobar"> + <h1><span class="tt adorn-brackets">Taler Demo</span></h1> + <h1><span class="it"><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS') }}">Donations</a></span></h1> + <p>This is the donation page, you can make donations (with an imaginary currency for now) to free software projects.</p> + <ul> + <li><a href="{{ env('TALER_ENV_URL_INTRO', '#') }}">Introduction</a></li> + <li><a href="{{ env('TALER_ENV_URL_BANK', '#') }}">Bank</a></li> + <li><a href="{{ env('TALER_ENV_URL_MERCHANT_BLOG', '#') }}">Essay Shop</a></li> + <li><a href="{{ env('TALER_ENV_URL_MERCHANT_DONATIONS', '#') }}">Donations</a></li> + <li><a href="{{ env('TALER_ENV_URL_MERCHANT_SURVEY', '#') }}">Tipping/Survey</a></li> + <li><a href="{{ env('TALER_ENV_URL_BACKOFFICE', '#') }}">Back-office</a></li> + </ul> + <p>You can learn more about Taler on our main <a href="https://taler.net">website</a>.</p> + </div> + + <section id="main" class="content"> + {% block main %} + This is the main content of the page. + {% endblock %} + <hr /> + <div class="copyright"> + <p>Copyright © 2014—2017 INRIA</p> + <a href="/javascript" data-jslicense="1" class="jslicenseinfo">JavaScript license information</a> + </div> + </section> +</body> +</html> diff --git a/talermerchantdemos/donations/templates/checkout.html b/talermerchantdemos/donations/templates/checkout.html new file mode 100644 index 0000000..5c3e116 --- /dev/null +++ b/talermerchantdemos/donations/templates/checkout.html @@ -0,0 +1,59 @@ +{% extends "templates/base.html" %} + +{% block main %} +<article> + <h1>Select your payment method</h1> + + <p> + This is an example for a "checkout" page of a Web shop. + On the previous page, you have created the shopping cart + and decided which product to buy (i.e. which project to + donate KUDOS to). Now in this page, you are asked to + select a payment option. As Taler is not yet universally + used, we expect merchants will offer various payment options. + </p> + <p> + The page also demonstrates how to only enable (or show) the Taler + option if Taler is actually supported by the browser. For example, + if you disable the Taler extension now, the Taler payment option + will be disabled in the page. Naturally, you could also trivially + hide the Taler option entirely by changing the visibility instead. + </p> + <p> + Note that you MUST select Taler here for the demo to continue, + as the other payment options are just placeholders and not + really working in the demonstration. Also, it is of course + possible to ask the user to make this choice already on the + previous page (with the shopping cart), we just separated the + two steps to keep each step as simple as possible. + </p> + + <form name="tform" action="{{ url_for('donate') }}" method="get"> + <div id="opt-form" align="left"><br> + <input type="hidden" name="donation_receiver" value="{{ donation_receiver }}"> + <input type="hidden" name="donation_amount" value="{{ donation_amount }}"> + <input type="hidden" name="donation_donor" value="{{ donation_donor }}"> + + <input type="radio" name="payment_system" value="lisa" id="radio-lisa"> + <label for="radio-lisa">Lisa</input> + <br/> + + <input type="radio" name="payment_system" value="ycard" id="radio-ycard"> + <label for="radio-ycard">You Card</label> + <br/> + + <input type="radio" name="payment_system" value="cardme" id="radio-cardme"> + <label for="radio-cardme">Card Me</label> + <br/> + + <input type="radio" name="payment_system" value="taler" checked id="radio-taler"> + <label for=radio-taler">Taler</label> + <br/> + + <input id="select-payment-method" type="submit" value="Ok"></input> + </div> + </form> + +</article> + +{% endblock main %} diff --git a/talermerchantdemos/donations/templates/error.html b/talermerchantdemos/donations/templates/error.html new file mode 100644 index 0000000..0d4bd02 --- /dev/null +++ b/talermerchantdemos/donations/templates/error.html @@ -0,0 +1,22 @@ +{% extends "templates/base.html" %} +{% block main %} + <h1>An Error Occurred</h1> + + <p>{{ message }}</p> + + {% if status_code %} + <p>The backend returned status code {{ status_code }}.</p> + {% endif %} + + {% if json %} + <p>Backend Response:</p> + <pre>{{ json }}</pre> + {% endif %} + + {% if stack %} + <p>Stack trace:</p> + <pre> + {{ stack }} + </pre> + {% endif %} +{% endblock main %} diff --git a/talermerchantdemos/donations/templates/fulfillment.html b/talermerchantdemos/donations/templates/fulfillment.html new file mode 100644 index 0000000..17d8cd8 --- /dev/null +++ b/talermerchantdemos/donations/templates/fulfillment.html @@ -0,0 +1,11 @@ +{% extends "templates/base.html" %} + +{% block main %} +<h1>Donation Receipt</h1> +<p> Thank you, <strong>{{ donation_donor }}</strong>, for donating <strong>{{ donation_amount }}</strong> to <strong>{{ donation_receiver }}</strong>.</p> + +<p>Please keep the order identifier <strong>{{ order_id }}</strong> as a receipt for your donation. You can show other people that you donated +by sharing <a href={{ request.url }}>this link</a> with them.</p> + +<p>You can always make <a href="{{ url_for('index') }}">another donation</a></p> +{% endblock main %} diff --git a/talermerchantdemos/donations/templates/index.html b/talermerchantdemos/donations/templates/index.html new file mode 100644 index 0000000..cbb3c35 --- /dev/null +++ b/talermerchantdemos/donations/templates/index.html @@ -0,0 +1,42 @@ +{% extends "templates/base.html" %} + +{% block main %} +<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 ({{ merchant_currency }}). +</p> + +<div> + <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"> + <div class="participation" id="fake-shop"> + <select name="donation_receiver"> + <option value="GNUnet">GNUnet</option> + <option value="Taler">GNU Taler</option> + <option value="Tor">Tor</option> + </select> + <select id="taler-donation" name="donation_amount"> + <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 {{ merchant_currency }} option is + deliberately implemented with a fault: the merchant will try to make 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 + incorrect contract. + </p> +</div> + +{% endblock %} diff --git a/talermerchantdemos/donations/templates/javascript.html b/talermerchantdemos/donations/templates/javascript.html new file mode 100644 index 0000000..436c186 --- /dev/null +++ b/talermerchantdemos/donations/templates/javascript.html @@ -0,0 +1,31 @@ +<!-- This file is in the public domain --> + +<html> + <head> + <title>JavaScript disclaimer.</title> + </head> + <body> + <h3>This site does not use JavaScript.</h3> + </body> +</html> + +<!-- The following lines are kept as a template for future inclusion of JavaScript files. --> + +<!-- + <html> + <body> + <table id="jslicense-labels1"> + <tr> + <td><a href="/static/path/to/example0.js">example0.js</a></td> + <td><a href="https://www.gnu.org/licenses/lgpl-2.1.html">LGPL</a></td> + <td><a href="/static/path/to/example0.js.tar.gz">example0.js.tar.gz</a></td> + </tr> + <tr> + <td><a href="/static/path/to/example1.js">example1.js</a></td> + <td><a href="https://www.gnu.org/licenses/lgpl-2.1.html">LGPL</a></td> + <td><a href="/static/path/to/example1.js.tar.gz">example1.js.tar.gz</a></td> + </tr> + </table> + </body> + </html> +--> diff --git a/talermerchantdemos/donations/templates/provider-not-supported.html b/talermerchantdemos/donations/templates/provider-not-supported.html new file mode 100644 index 0000000..88f2000 --- /dev/null +++ b/talermerchantdemos/donations/templates/provider-not-supported.html @@ -0,0 +1,6 @@ +{% extends "templates/base.html" %} + +{% block main %} +<h1>Payment Provider Not Supported</h1> +<p>Unfortunately the selected payment provider is not supported in this demo. Please go back and select "Taler".</p> +{% endblock main %} diff --git a/talermerchantdemos/donations/templates/request_payment.html b/talermerchantdemos/donations/templates/request_payment.html new file mode 100644 index 0000000..6e050d0 --- /dev/null +++ b/talermerchantdemos/donations/templates/request_payment.html @@ -0,0 +1,69 @@ +{% extends "templates/base.html" %} + + +{% block meta %} +<noscript> + <meta http-equiv="refresh" content="1"> +</noscript> +{% endblock meta %} + + +{% block scripts %} +<script> + let checkUrl = decodeURIComponent("{{ check_status_url_enc }}"); + let delayMs = 500; + function check() { + let req = new XMLHttpRequest(); + req.onreadystatechange = function () { + if (req.readyState === XMLHttpRequest.DONE) { + if (req.status === 200) { + try { + let resp = JSON.parse(req.responseText); + if (resp.paid) { + document.location.reload(true); + } + } catch (e) { + console.error("could not parse response:", e); + } + } + setTimeout(check, delayMs); + } + }; + req.onerror = function () { + setTimeout(check, delayMs); + } + req.open("GET", checkUrl); + req.send(); + } + + setTimeout(check, delayMs); +</script> +{% endblock scripts %} + + +{% block main %} + +<h1>Payment Required</h1> + +<div class="taler-installed-hide"> + <p> + Looks like your browser doesn't support GNU Taler payments. You can try + installing a <a href="https://taler.net/en/wallet.html">wallet browser extension</a>. + </p> +</div> + +<div> + + <p> + You can use this QR code to pay with your mobile wallet: + </p> + + {{ qrcode_svg | safe }} + + <p> + Click <a href="{{ taler_pay_uri }}">this link</a> to open your system's Taler wallet if it exists. + </p> + +</div> + +{% endblock main %} |