summaryrefslogtreecommitdiff
path: root/talerdonations/donations/templates
diff options
context:
space:
mode:
authorng0 <ng0@n0.is>2019-09-25 19:27:38 +0000
committerng0 <ng0@n0.is>2019-09-25 19:27:38 +0000
commit6a346edfe7fad92abbf6d7f6fc2e04602eff3d10 (patch)
tree0584b8949ae7e7b382914ea9155f31a959030b73 /talerdonations/donations/templates
parent3aeaaa760a4bc00d35b1faa0c7bde47e9a00b9b3 (diff)
parent38acb9f039fb01a7bc0aef8b93a277e919899ae9 (diff)
downloaddonations-6a346edfe7fad92abbf6d7f6fc2e04602eff3d10.tar.gz
donations-6a346edfe7fad92abbf6d7f6fc2e04602eff3d10.tar.bz2
donations-6a346edfe7fad92abbf6d7f6fc2e04602eff3d10.zip
Merge branch 'master' of git.taler.net:donations
Diffstat (limited to 'talerdonations/donations/templates')
-rw-r--r--talerdonations/donations/templates/index.html17
-rw-r--r--talerdonations/donations/templates/request_payment.html69
2 files changed, 70 insertions, 16 deletions
diff --git a/talerdonations/donations/templates/index.html b/talerdonations/donations/templates/index.html
index fc956e5..68a0cb2 100644
--- a/talerdonations/donations/templates/index.html
+++ b/talerdonations/donations/templates/index.html
@@ -7,22 +7,7 @@
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">
+<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>
diff --git a/talerdonations/donations/templates/request_payment.html b/talerdonations/donations/templates/request_payment.html
new file mode 100644
index 0000000..6e050d0
--- /dev/null
+++ b/talerdonations/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 %}