summaryrefslogtreecommitdiff
path: root/talerbank/app/templates/withdraw_show.html
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2019-08-27 03:56:54 +0200
committerFlorian Dold <florian.dold@gmail.com>2019-08-28 21:28:59 +0200
commit97835ef689b538cb3e4bee294bd0fb2b3f0a9df2 (patch)
treef0ef076bfcc45285a818c75faf07a2351d20cb6e /talerbank/app/templates/withdraw_show.html
parent11a193449e291c240f3cac96fe21e6c21a2a2649 (diff)
downloadbank-97835ef689b538cb3e4bee294bd0fb2b3f0a9df2.tar.gz
bank-97835ef689b538cb3e4bee294bd0fb2b3f0a9df2.tar.bz2
bank-97835ef689b538cb3e4bee294bd0fb2b3f0a9df2.zip
implement new withdraw API and support taler://withdraw
Diffstat (limited to 'talerbank/app/templates/withdraw_show.html')
-rw-r--r--talerbank/app/templates/withdraw_show.html76
1 files changed, 76 insertions, 0 deletions
diff --git a/talerbank/app/templates/withdraw_show.html b/talerbank/app/templates/withdraw_show.html
new file mode 100644
index 0000000..3c66732
--- /dev/null
+++ b/talerbank/app/templates/withdraw_show.html
@@ -0,0 +1,76 @@
+<!--
+ This file is part of GNU Taler.
+ Copyright (C) 2019 GNUnet e.V.
+
+ GNU 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.
+
+ GNU 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
+ GNU Taler; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
+
+ @author Florian Dold
+-->
+
+{% extends "base.html" %}
+
+{% block headermsg %}
+<h1 class="nav">Withdraw to a Taler Wallet</h1>
+{% endblock %}
+
+{% block head %}
+<script>
+ // prettier-ignore
+ let checkUrl = JSON.parse('{{ withdraw_check_url | tojson }}');
+ 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.selection_done) {
+ 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 head %}
+
+{% block content %}
+<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>
+
+<p>
+ You can use this QR code to withdraw to your mobile wallet:
+</p>
+{{ qrcode_svg | safe }}
+<p>
+ Click <a href="{{ taler_withdraw_uri }}">this link</a> to open your system's Taler wallet if it exists.
+</p>
+
+
+{% endblock content %} \ No newline at end of file