-
Notifications
You must be signed in to change notification settings - Fork 21
/
wallet.html
55 lines (52 loc) · 1.6 KB
/
wallet.html
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
{% extends "layout.html" %}
{% from "_form_helpers.html" import render_error %}
{% block body %}
<script src="/js/wallet.js"></script>
<br>
<div class="well">
<h2>Wallet</h2>
<br />
Overall Balance: {{balance}}
<br />
{% if txs %}
{% for txj in txs %}
<br /><br />
<h3>Unspent Payments for Job <a href="/job/{{txj.ref}}">{{txj.ref}}</a></h3>
{% if txj.txs %}
<table class="table m-table table-bordered table-hover table-heading">
<thead>
<th class="col-md-5">txid</th>
<th>value</th>
</thead>
<tbody>
{% for tx in txj.txs %}
<tr>
<td class="col-md-5"><a href="{{explorer}}/tx/{{tx.txid}}">{{tx.txid}}</a></td>
<td>{{tx.value}}</td>
</tr>
{% endfor %}
</tbody>
</table>
<form onsubmit="withdraw_from_job('{{txj.ref}}'); return false;" class="form-inline">
<h4> Withdraw from this job's payments</h4>
<div class="form-group">
 <label for="withdraw_amount" class="control-label">Amount (BTC):</label>
<input type="text" name="withdraw_amount" id="withdraw_amount_{{txj.ref}}" pattern="[0-9.]{1,10}" value="" style="width:100px;">
</div>
<div class="form-group">
 <label for="withdraw_address" class="control-label">Address:</label>
<input type="text" name="withdraw_address" id="withdraw_address_{{txj.ref}}" value="{{withdraw_amount}}" style="width:300px;">
</div>
<div class="form-group">
 <input type="submit" value="Withdraw"/>
</div>
</form>
{% else %}
None found.
{% endif %}
{% endfor %}
{% else %}
<p>No transactions.</p>
{% endif %}
</div>
{% endblock %}