summaryrefslogtreecommitdiff
path: root/talerbank/app/templates/withdraw_show.html
blob: 05fea9b3f8ee3a81e15b0fc9c5c58c7105b7401c (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<!-- 
  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>
<style>
  
</style>
{% endblock head %}

{% block content %}
<div class="taler-installed-hide">
  <p>
    {% autoescape off %}
    {{ _("Looks like your browser doesn't support GNU Taler payments. You can try installing a <a href=\"{wallet_link}\">wallet browser extension</a>.").format(wallet_link="https://taler.net/en/wallet.html")
    {% endautoescape %}
  </p>
</div>

<p>
  {{ _("You can use this QR code to withdraw to your mobile wallet:") }}
</p>
{{ qrcode_svg | safe }}
<p>
  {% autoescape off %}
  {{ _("Click <a href="{taler_withdraw_uri}">this link</a> to open your system's Taler wallet if it exists.").format(taler_withdraw_uri=taler_withdraw_uri) }}
  {% endautoescape %}
</p>

{% endblock content %}