mirror of
https://github.com/TitanEmbeds/Titan.git
synced 2024-11-14 10:01:21 +01:00
Donate impose min and max 00
This commit is contained in:
parent
28d5436f99
commit
0a0be1a83b
@ -440,8 +440,12 @@ def donate_post():
|
|||||||
donation_amount = request.form.get('amount')
|
donation_amount = request.form.get('amount')
|
||||||
if not donation_amount:
|
if not donation_amount:
|
||||||
abort(402)
|
abort(402)
|
||||||
|
|
||||||
|
donation_amount = float(donation_amount)
|
||||||
|
if donation_amount < 5 or donation_amount > 100:
|
||||||
|
abort(412)
|
||||||
|
|
||||||
donation_amount = "{0:.2f}".format(float(donation_amount))
|
donation_amount = "{0:.2f}".format(donation_amount)
|
||||||
payer = {"payment_method": "paypal"}
|
payer = {"payment_method": "paypal"}
|
||||||
items = [{"name": "TitanEmbeds Donation",
|
items = [{"name": "TitanEmbeds Donation",
|
||||||
"price": donation_amount,
|
"price": donation_amount,
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
<h4>The Name-Your-Price Tool</h4>
|
<h4>The Name-Your-Price Tool</h4>
|
||||||
<p class="flow-text">Donate to receive <strong>Titan Tokens™</strong> (to be spent on donator features below) and a <strong>supporter role</strong> on our support server.</p>
|
<p class="flow-text">Donate to receive <strong>Titan Tokens™</strong> (to be spent on donator features below) and a <strong>supporter role</strong> on our support server.</p>
|
||||||
<p class="range-field">
|
<p class="range-field">
|
||||||
<input type="range" id="token-slider" min="1" max="100" value="5" />
|
<input type="range" id="token-slider" min="5" max="100" value="10" />
|
||||||
</p>
|
</p>
|
||||||
<p class="flow-text">$<span id="money-display">5</span> for <strong><span id="token-display">500</span> tokens</strong>!</p>
|
<p class="flow-text">$<span id="money-display">10</span> for <strong><span id="token-display">1000</span> tokens</strong>!</p>
|
||||||
<a class="waves-effect waves-light btn" id="donate-btn">Donate</a>
|
<a class="waves-effect waves-light btn" id="donate-btn">Donate</a>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
Loading…
Reference in New Issue
Block a user