aboutsummaryrefslogtreecommitdiffstats
path: root/views/users/wallet.html
blob: c8af3cd1431b10e93a39b467b9167aaba8fa6daf (plain) (blame)
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
82
83
84
85
86
87
88
89
90
{{#yield-scripts}}
  <script src="/bootstrap3-dialog/dist/js/bootstrap-dialog.min.js"></script>
  <script src="/jquery-serialize-object/dist/jquery.serialize-object.min.js"></script>
  <script src="/js/wallet.js"></script>
{{/yield-scripts}}

<div class="wallet" style="display: none">
  <h1>Wallet</h1>

  <input type="hidden" id="username" name="username" value="{{user}}" />
  <input type="hidden" id="email" name="email" />

  <div class="form-group">
    <label>Balance:</label>
    <b id="balance" class="lead">0</b> <b id="unit" class="lead"></b> 
    <b class="lead">(<b id="fiat" class="lead">0 CAD</b>)</b>
  </div>

  <div>
    <ul class="nav nav-tabs" role="tablist">
      <li role="presentation" class="active"><a href="#withdraw" aria-controls="withdraw" role="tab" data-toggle="tab">Withdraw</a></li>
      <li role="presentation"><a href="#settings" aria-controls="settings" role="tab" data-toggle="tab">Settings</a></li>
    </ul>

    <div class="tab-content">
      <div role="tabpanel" class="tab-pane active" id="withdraw">
        <form>
          <div class="form-group">
            <label for="amount">Amount:</label>
            <div class="input-group">
              <input type="number" id="amount" name="amount" class="form-control" min="0" />
              <span class="input-group-btn">
                <button id="currency_toggle" type="button" class="btn"></button>
              </span>
              <span class="input-group-btn">
                <button id="max" type="button" class="btn">Max</button>
              </span>
            </div>
          </div>

          <div class="form-group">
            <label for="amount">Receiving Address:</label>
            <div class="input-group" style="width: 100%">
              <input type="text" id="recipient" name="recipient" class="form-control" />
            </div>
          </div>  
          
          <div class="form-group">
            <label for="priority">Fee Priority for Confirmation Time:</label>
            <div class="input-group" style="width: 100%">
              <select id="priority" name="priority" class="form-control">
                <option value="low">Low</option>
                <option value="medium">Medium</option>
                <option value="high">High</option>
              </select>
            </div>
          </div>

          <input id="gsend" class="btn btn-primary" type="button" value="Calculate Fee and Confirm Transaction" />
        </form>
        <div class="alert alert-success" style="display: none">Transaction sent</div>
        <div class="alert alert-danger" style="display: none">Need private key</div>
      </div>
      <div role="tabpanel" class="tab-pane" id="settings">
        <form>
          <div class="form-group">
            <label for="pubkey">Bitcoin Receiving Address or HD Wallet Pubkey:</label>
              <textarea id="pubkey" name="pubkey" class="form-control" placeholder="xpub..." rows="3"></textarea>
              <textarea id="privkey" name="privkey" class="form-control" placeholder="xpriv..." rows="3"></textarea>
          </div>
          <input class="btn btn-primary" type="button" value="Save" />
        </form>
        <div class="alert alert-success" style="display: none">Settings updated</div>
      </div>
    </div>
  </div>
</div>

<div id="transaction" style="display: none">
  <div style="margin-bottom: 10px">
    <label>Amount:</label> <span class="amount"></span><br />
    <label>To:</label> <span class="address"></span>
  </div>
  <div>
    <span id="change" style="display: none">
      <label>Change:</label> <span class="change"></span><br />
    </span>
    <label>Fee:</label> <span class="fee"></span><br />
  </div>
</div>