summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPiotr Dobrowolski <admin@tastycode.pl>2017-04-05 20:36:19 +0200
committerPiotr Dobrowolski <admin@tastycode.pl>2017-04-05 20:37:38 +0200
commit0543a74223e5e0d0b6fb7e7b0773a67c66237301 (patch)
tree19b0229619bd947a911e4653a2cbc522213c5006
parent3c4fb99f19df5d4377b36aa4442ae91810669be2 (diff)
downloadbitvend-0543a74223e5e0d0b6fb7e7b0773a67c66237301.tar.gz
bitvend-0543a74223e5e0d0b6fb7e7b0773a67c66237301.tar.bz2
bitvend-0543a74223e5e0d0b6fb7e7b0773a67c66237301.tar.xz
bitvend-0543a74223e5e0d0b6fb7e7b0773a67c66237301.zip
Fix formatting
-rw-r--r--bitvend/templates/index.html12
-rw-r--r--bitvend/views.py1
2 files changed, 7 insertions, 6 deletions
diff --git a/bitvend/templates/index.html b/bitvend/templates/index.html
index b7e9840..639e1e8 100644
--- a/bitvend/templates/index.html
+++ b/bitvend/templates/index.html
@@ -20,7 +20,8 @@
<div class="well text-right">
<h3><small class="pull-left">Transactions</small> {{ current_user.transactions.count() }}</h3>
</div>
- <div class="well">
+
+ <div class="well">
{% if current_transaction %}
<a href="{{ url_for('.cancel') }}" class="btn btn-danger btn-block btn-lg">Cancel transaction
{% if current_transaction.user != current_user %}
@@ -28,9 +29,10 @@
{% endif %}
</a>
{% else %}
- <a href="{{ url_for('.begin') }}" class="btn btn-primary btn-block btn-lg">Begin transaction</a>
- {% endif %}
- </div>
+ <a href="{{ url_for('.begin') }}" class="btn btn-primary btn-block btn-lg">Begin transaction</a>
+ {% endif %}
+ </div>
+
<form action="{{ url_for('.transfer') }}" method="POST" class="well">
{{ transfer_form.hidden_tag() }}
<div class="form-group">
@@ -38,7 +40,7 @@
</div>
<div class="form-group">
<div class="input-group">
- <input type="number" class="form-control" min="0" name="amount" placeholder="0.00" />
+ <input type="number" class="form-control" min="0" name="amount" placeholder="0.00" step="any" />
<span class="input-group-btn">
<button class="btn btn-info">Transfer</button>
</span>
diff --git a/bitvend/views.py b/bitvend/views.py
index 2ce73a5..95b5dfe 100644
--- a/bitvend/views.py
+++ b/bitvend/views.py
@@ -33,7 +33,6 @@ def transfer():
transfer_form = TransferForm()
if transfer_form.validate_on_submit():
- print(transfer_form.amount)
try:
current_user.transfer(User.query.get(transfer_form.target.data), transfer_form.amount.data)
db.session.commit()