summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2017-11-24 20:23:06 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2017-11-24 20:23:06 +0100
commit3e5536174253a11bb214d766d7377347265fcf6a (patch)
treee86905326dc242437ecf72603b2bfb23f9cb7373
parent672ac93130ae7548accebfc13754285f15dfec17 (diff)
downloaddonations-3e5536174253a11bb214d766d7377347265fcf6a.tar.gz
donations-3e5536174253a11bb214d766d7377347265fcf6a.tar.bz2
donations-3e5536174253a11bb214d766d7377347265fcf6a.zip
missing templates
-rw-r--r--talerdonations/donations/templates/backoffice.html46
-rw-r--r--talerdonations/donations/templates/checkout.html56
-rw-r--r--talerdonations/donations/templates/execute-payment.html12
-rw-r--r--talerdonations/donations/templates/fallback.html23
-rw-r--r--talerdonations/donations/templates/fulfillment.html7
-rw-r--r--talerdonations/donations/templates/index.html62
-rw-r--r--talerdonations/donations/templates/javascript.html22
7 files changed, 228 insertions, 0 deletions
diff --git a/talerdonations/donations/templates/backoffice.html b/talerdonations/donations/templates/backoffice.html
new file mode 100644
index 0000000..719d4b6
--- /dev/null
+++ b/talerdonations/donations/templates/backoffice.html
@@ -0,0 +1,46 @@
+{% extends "templates/base.html" %}
+{% block main %}
+ <h1>Backoffice</h1>
+ <p>This page simulates a backoffice facility. Through it,
+ the user can see the money flow from Taler transactions to
+ wire transfers and viceversa.</p>
+ <table id="history" width="60%" style="visibility: hidden;">
+ <tbody>
+ <tr>
+ <th>Order ID</th>
+ <th>Summary</th>
+ <th>Amount</th>
+ <th>Date</th>
+ </tr>
+ </tbody>
+ </table>
+ <div class="loader"></div>
+ <div id="popup1" class="overlay">
+ <div class="popup">
+ <h2>
+ <a class="close" href="/backoffice">&times;</a>
+ </h2>
+ <div class="track-content">
+ <table>
+ <tbody>
+ <tr>
+ <th>WTID</th>
+ <th>Amount</th>
+ <th>Coin</th>
+ <th>Date</th>
+ </tr>
+ </tbody>
+ </table>
+ </div>
+ </div>
+ </div>
+ <a href="#" onclick="get_history(true);" style="margin-left: 90%;">Fake scroll</a>
+{% endblock main %}
+
+{% block styles %}
+ <link rel="stylesheet" type="text/css" href="{{ url("/static/popup.css") }}">
+{% endblock styles %}
+
+{% block scripts %}
+ <script src="{{ url('/static/backoffice.js') }}" type="application/javascript"></script>
+{% endblock scripts %}
diff --git a/talerdonations/donations/templates/checkout.html b/talerdonations/donations/templates/checkout.html
new file mode 100644
index 0000000..a7d009c
--- /dev/null
+++ b/talerdonations/donations/templates/checkout.html
@@ -0,0 +1,56 @@
+{% 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>
+
+ <p {% if not display_alert %} style="display: none;" {% endif %} class="informational-fail">
+ Only Taler system available in this demo!
+ </p>
+
+ <form name="tform" action="{{ url('/donate') }}" method="get">
+ <div id="opt-form" align="left"><br>
+ <input type="hidden" name="donation_receiver" value="{{ donation_receiver }}"></input>
+ <input type="hidden" name="donation_amount" value="{{ donation_amount }}"></input>
+ <input type="radio" name="payment_system" value="lisa"
+ id="lisa-radio-button-id">Lisa</input>
+ <br/>
+ <input type="radio" name="payment_system" value="ycard">You Card</input>
+ <br/>
+ <input type="radio" name="payment_system" value="cardme">Card Me</input>
+ <br/>
+ <input type="radio" name="payment_system" value="taler"
+ checked
+ id="taler-radio-button-id" class="taler-installed-enable">Taler</input>
+ <br/>
+ <input id="select-payment-method" type="submit" value="Ok"></input>
+ </div>
+ </form>
+
+</article>
+
+{% endblock main %}
diff --git a/talerdonations/donations/templates/execute-payment.html b/talerdonations/donations/templates/execute-payment.html
new file mode 100644
index 0000000..e1283ce
--- /dev/null
+++ b/talerdonations/donations/templates/execute-payment.html
@@ -0,0 +1,12 @@
+{% extends "templates/base.html" %}
+
+{% block scripts %}
+<meta name="contract-hash" value="{{ hc }}">
+<meta name="pay-url" value="{{ pay_url|safe }}">
+<meta name="offering-url" value="{{ offering_url|safe }}">
+<script src="static/execute-payment.js" type="application/javascript"></script>
+{% endblock scripts %}
+
+{% block main %}
+<div id="msg">Executing payment <span id="action-indicator"></span></div>
+{% endblock main %}
diff --git a/talerdonations/donations/templates/fallback.html b/talerdonations/donations/templates/fallback.html
new file mode 100644
index 0000000..448af2b
--- /dev/null
+++ b/talerdonations/donations/templates/fallback.html
@@ -0,0 +1,23 @@
+{% extends "templates/base.html" %}
+{% block main %}
+<div id="ccfakeform" class="fade">
+ <p>
+ Oops, it looks like you don't have a Taler wallet installed. Why don't you enter
+ all your credit card details before reading the article? <em>You can also
+ use GNU Taler to complete the purchase at any time.</em>
+ </p>
+
+ <form>
+ First name<br> <input type="text"></input><br>
+ Family name<br> <input type="text"></input><br>
+ Age<br> <input type="text"></input><br>
+ Nationality<br> <input type="text"></input><br>
+ Gender<br> <input type="radio" name"gender">Male</input>
+ CC number<br> <input type="text"></input><br>
+ <input type="radio" name="gender">Female</input><br>
+ </form>
+ <form method="get" action="/cc-payment/{{ article_name }}">
+ <input type="submit"></input>
+ </form>
+</div>
+{% endblock main %}
diff --git a/talerdonations/donations/templates/fulfillment.html b/talerdonations/donations/templates/fulfillment.html
new file mode 100644
index 0000000..67e56ff
--- /dev/null
+++ b/talerdonations/donations/templates/fulfillment.html
@@ -0,0 +1,7 @@
+{% extends "templates/base.html" %}
+
+{% block main %}
+<p> Thanks for donating <strong>{{ donation_amount }} {{ currency }}</strong> to <strong>{{ donation_receiver }}</strong>.</p>
+
+<p>Please keep the order identifier <strong>{{ order_id }}</strong> as a receipt for your donation.</p>
+{% endblock main %}
diff --git a/talerdonations/donations/templates/index.html b/talerdonations/donations/templates/index.html
new file mode 100644
index 0000000..0dc72a4
--- /dev/null
+++ b/talerdonations/donations/templates/index.html
@@ -0,0 +1,62 @@
+{% 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 class="taler-installed-hide">
+ <h2>Installing the Taler wallet</h2>
+ First, you need to install the Taler wallet browser extension.
+ Install the wallet
+ <span id="install-done" style="visibility: hidden">(done)</span>
+ <ul>
+ <li>from the app store for <a href="https://chrome.google.com/webstore/detail/gnu-taler-wallet/millncjiddlpgdmkklmhfadpacifaonc">Google
+ Chrome and Chromium</a>
+ </li>
+ <li>By visiting our <a href="https://taler.net/wallet">installation page</a> for other platforms.
+ </li>
+ </ul>
+ Wallets for other browsers will be provided in the near future.
+</div>
+
+<div class="taler-installed-show">
+ <p>Please choose a project and the amount (*) of {{ merchant_currency }} you
+ wish to donate:</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>
+ <!-- options are added dynamically -->
+ </select>
+ <select id="taler-donation" name="donation_amount">
+ <option value="0.1">0.1 {{ merchant_currency }}</option>
+ <option value="1">1 {{ merchant_currency }}</option>
+ <option value="6">5 {{ merchant_currency }}</option>
+ <option value="10">10 {{ merchant_currency }}</option>
+ </select>
+ <input type="submit" class="pure-button pure-button-primary" value="Donate!"/>
+ </div>
+ </form>
+ <p>
+ (*) To make it a bit more fun, the 5 KUDOS option
+ is deliberately implemented with a fault: the merchant will try to
+ make you donate 6 KUDOS instead of the 5 KUDOS 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>
+
+<h2>Back-office interface</h2>
+<!--p>Try the <a href="backoffice">back-office</a>, in order to track
+orders and corresponding deposits.
+</p Depends on #4992 -->
+
+{% endblock %}
diff --git a/talerdonations/donations/templates/javascript.html b/talerdonations/donations/templates/javascript.html
new file mode 100644
index 0000000..fa94218
--- /dev/null
+++ b/talerdonations/donations/templates/javascript.html
@@ -0,0 +1,22 @@
+<!-- This file is in the public domain -->
+<html>
+<body>
+<table id="jslicense-labels1">
+<tr>
+ <td><a href="/static/web-common/taler-wallet-lib.js">taler-wallet-lib.js</a></td>
+ <td><a href="https://www.gnu.org/licenses/lgpl-2.1.html">LGPL</a></td>
+ <td><a href="/static/web-common/taler-wallet-lib.js.tar.gz">taler-wallet-lib.js.tar.gz</a></td>
+</tr>
+<tr>
+ <td><a href="/static/web-common/dropdown-navbar_script.js">dropdown-navbar_script.js</a></td>
+ <td><a href="https://www.gnu.org/licenses/lgpl-2.1.html">LGPL</a></td>
+ <td><a href="/static/web-common/dropdown-navbar_script.js">dropdown-navbar_script.js</a></td>
+</tr>
+<tr>
+ <td><a href="/static/web-common/index.js">dropdown-navbar_script.js</a></td>
+ <td><a href="https://www.gnu.org/licenses/lgpl-2.1.html">LGPL</a></td>
+ <td><a href="/static/web-common/index.js">dropdown-navbar_script.js</a></td>
+</tr>
+</table>
+</body>
+</html>