Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
Trezoid committed Apr 29, 2012
2 parents 9da1537 + b210a1d commit 20a3d46
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 6 deletions.
2 changes: 1 addition & 1 deletion handlers/gold.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ def post_withdraw(amount, name, address):
for job in session.user.jobs:
if not job.completed and not job.canceled:
outstanding += job.max_pay
if amount < 0 or amount > session.user.gold - outstanding:
if amount < 10 or amount > session.user.gold - outstanding:
redirect(get_withdraw)

price = amount * 10 # Put it into cents
Expand Down
3 changes: 3 additions & 0 deletions scripts/withdraw.coffee
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
$(document).ready ->
$('#next-1').click ->
if ~~$('#amount').val() < 10
alert('Minimum amount for withdrawal is 10 gold')
return false
$('#first').hide 'fast'
$('#second').show 'fast'
false
Expand Down
4 changes: 0 additions & 4 deletions templates/char/create.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,6 @@ <h3>Create a character</h3>
<label>Game:</label><span class="selector"> <select id="game">
<option disabled selected>---</option>
<option value="0">World of Warcraft</option>
<option value="1">Star Wars: The Old Republic</option>
</select></span>
<div id="game-0" class="game-pane">
<form id="wow-form"> <label>Server:</label><span class="selector"> <select id="server">
Expand All @@ -28,8 +27,5 @@ <h3>Create a character</h3>
<label>Character name:</label> <input type="text" id="charname"><br>
<button id="wow-add" class="" cover=true>Add</button></form>
</div>
<div id="game-1" class="game-pane">
SWTOR
</div>
</div>
{% endblock %}
2 changes: 1 addition & 1 deletion templates/gold/withdraw.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ <h1>Withdraw Gold</h1>
<form action="{{ handler.gold.post_withdraw }}" method="POST">$CSRF$
<div id="first">
<h3>Amount</h3>
Amount of gold to withdraw: <input type="text" id="amount" name="amount" value="{{ gold }}"><br>
Amount of gold to withdraw: <input type="text" id="amount" name="amount" value="{{ gold }}"> (Minimum is 10 gold)<br>
<br>
<button id="next-1" class="submit-button">Next</button>
</div>
Expand Down

0 comments on commit 20a3d46

Please sign in to comment.