aboutsummaryrefslogtreecommitdiffstats
path: root/views/users
diff options
context:
space:
mode:
authorAdam Soltys <[email protected]>2014-08-08 11:33:43 -0700
committerAdam Soltys <[email protected]>2014-08-08 11:33:43 -0700
commit2cc86381a6f79cd729048b34a72b70562a7b0ace (patch)
treec42dda997719ce544a4dea2bf15937d293ebfd59 /views/users
parent3082e274b70a93fdac8a9a63934252ed914fe406 (diff)
parent6d5c3a56067b96bb5d97cca4a80bacbf78395b2c (diff)
downloadcoinos-server-2cc86381a6f79cd729048b34a72b70562a7b0ace.tar.gz
coinos-server-2cc86381a6f79cd729048b34a72b70562a7b0ace.zip
Merge branch 'code_reorg'
Diffstat (limited to 'views/users')
-rw-r--r--views/users/edit.html54
-rw-r--r--views/users/new.html69
-rw-r--r--views/users/show.html49
3 files changed, 132 insertions, 40 deletions
diff --git a/views/users/edit.html b/views/users/edit.html
new file mode 100644
index 00000000..72399187
--- /dev/null
+++ b/views/users/edit.html
@@ -0,0 +1,54 @@
+{{#yield-scripts}}
+ {{#js}}js/setup{{/js}}
+{{/yield-scripts}}
+
+<form id="setup" action="/{{user}}" method="post">
+ <h1>Settings</h1>
+
+ <input type="hidden" id="username" name="username" value="{{user}}" />
+
+ <div class="form-group">
+ <label for="title">Store Name:</label>
+ <input type="text" id="title" name="title" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="logo">Logo <small>(optional URL)</small>:</label>
+ <input type="text" id="logo" name="logo" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="address">Bitcoin Address:</label>
+ <input type="text" id="address" name="address" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="currency">Currency:</label>
+ <select id="currency" name="currency" class="form-control">
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="symbol">Exchange Rate:</label>
+ <select id="symbol" name="symbol" class="form-control">
+ </select>
+ </div>
+
+ <div class="form-group">
+ <label for="commission">Commission/Discount <small>(optional %)</small>:</label>
+ <input type="text" id="commission" name="commission" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="password">New Password <small>(blank = no change)</small>:</label>
+ <input type="password" id="password" name="password" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="confirm">Confirm New Password:</label>
+ <input type="password" id="confirm" name="confirm" class="form-control" />
+ </div>
+
+ <br />
+ <input class="btn btn-primary" type="submit" value="Done" />
+</form>
diff --git a/views/users/new.html b/views/users/new.html
index e9874217..9d2a7aa3 100644
--- a/views/users/new.html
+++ b/views/users/new.html
@@ -1,41 +1,30 @@
-<!DOCTYPE html>
-<html>
- <head>
- <meta charset="utf-8" />
- <meta name="viewport" content="width=480, height=752, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0" />
- <title>Bitcoin Payment Calculator</title>
- <link href="img/favicon.ico" rel="shortcut icon" />
- {{#css}}calculator{{/css}}
- {{#js}}register{{/js}}
- </head>
- <body>
- <div class="container-fluid">
- <form id="register" action="/users" method="post">
- <h1>Register</h1>
- {{#error}}
- <div class="alert alert-danger">{{error}}</div>
- {{/error}}
- <div class="form-group">
- <label for="username">Username:</label>
- <input type="text" id="username" name="username" class="form-control" />
- </div>
-
- <div class="form-group">
- <label for="password">Password:</label>
- <input type="password" id="password" name="password" class="form-control" />
- </div>
+{{#yield-scripts}}
+ {{#js}}js/register{{/js}}
+{{/yield-scripts}}
- <div class="form-group">
- <label for="confirm">Confirm Password:</label>
- <input type="password" id="confirm" name="confirm" class="form-control" />
- </div>
-
- <div class="form-group">
- <label for="email">Email:</label>
- <input type="email" id="email" name="email" class="form-control" />
- </div>
- <input class="btn btn-primary" type="submit" value="Register" />
- </form>
- </div>
- </body>
-</html>
+<form id="register" action="/users" method="post">
+ <h1>Register</h1>
+ {{#error}}
+ <div class="alert alert-danger">{{error}}</div>
+ {{/error}}
+ <div class="form-group">
+ <label for="username">Username:</label>
+ <input type="text" id="username" name="username" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="password">Password:</label>
+ <input type="password" id="password" name="password" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="confirm">Confirm Password:</label>
+ <input type="password" id="confirm" name="confirm" class="form-control" />
+ </div>
+
+ <div class="form-group">
+ <label for="email">Email:</label>
+ <input type="email" id="email" name="email" class="form-control" />
+ </div>
+ <input class="btn btn-primary" type="submit" value="Register" />
+</form>
diff --git a/views/users/show.html b/views/users/show.html
new file mode 100644
index 00000000..608246e0
--- /dev/null
+++ b/views/users/show.html
@@ -0,0 +1,49 @@
+{{#yield-scripts}}
+ {{#js}}js/calculator{{/js}}
+{{/yield-scripts}}
+
+<div id="calculator" style="display: none">
+ <input id="user" type="hidden" value="{{user}}" />
+
+ <h1 id="title"></h1>
+ <img id="logo" src="img/bitcoin.png" alt="Logo" />
+
+ <form role="form">
+ <div class="form-group">
+ <label for="exchange">Exchange Rate:</label>
+ <input type="text" id="exchange" value="0" disabled="disabled" class="form-control" />
+ <span id="symbol"></span>
+ </div>
+
+ <div class="form-group">
+ <label for="amount">Amount:</label>
+ <input type="text" id="amount" class="form-control" />
+ <span id="currency"></span>
+ </div>
+
+ <div class="form-group">
+ <label for="tip">Tip:</label>
+ <div class="btn-toolbar">
+ <div class="btn-group" id="tip">
+ <button type="button" class="active btn btn-default">0%</button>
+ <button type="button" class="btn btn-default">10%</button>
+ <button type="button" class="btn btn-default">15%</button>
+ <button type="button" class="btn btn-default">20%</button>
+ </div>
+ </div>
+ </div>
+
+ <br />
+
+ <div id="payment">
+ <p>Please send <strong id="total">0.0</strong> BTC to</p>
+ <div id="qr"></div>
+ <p id="address"></p>
+ </div>
+
+ <span id="received" class="btn btn-success">Payment Received. Thank you!</span>
+ <audio id="chaching" src="/cash_register.wav" hidden="true" enablejavascript="true">
+ </div>
+</form>
+
+<span id="error" class="btn btn-danger" style="display: none"></span>