limit quantity to 7 for now

master
Aevann 2024-04-15 22:41:59 +02:00
parent 84ea20d6fc
commit 87504f2937
2 changed files with 2 additions and 2 deletions

View File

@ -181,7 +181,7 @@ def award_thing(v, thing_type, id):
abort(403, f'Long posts are protected from the {award_title} award!') abort(403, f'Long posts are protected from the {award_title} award!')
award_quantity = int(request.values.get("award_quantity", "1").strip()) award_quantity = int(request.values.get("award_quantity", "1").strip())
if award_quantity < 1 or award_quantity > 30: if award_quantity < 1 or award_quantity > 7:
award_quantity = 1 award_quantity = 1
for x in range(award_quantity): for x in range(award_quantity):

View File

@ -97,7 +97,7 @@
<button type="button" id="buyandgiveaward" class="awardbtn btn btn-primary fl-r d-none" data-nonce="{{g.nonce}}" data-areyousure="giveaward(this)" data-onclick="areyousure(this)" data-dismiss="modal">Give Award</button> <button type="button" id="buyandgiveaward" class="awardbtn btn btn-primary fl-r d-none" data-nonce="{{g.nonce}}" data-areyousure="giveaward(this)" data-onclick="areyousure(this)" data-dismiss="modal">Give Award</button>
<input autocomplete="off" type="number" step="any" min="1" max="30" inputmode="numeric" id="award_quantity" class="form-control d-inline-block mr-1 fl-r text-center" style="width:40px" value="1" required> <input autocomplete="off" type="number" step="any" min="1" max="7" inputmode="numeric" id="award_quantity" class="form-control d-inline-block mr-1 fl-r text-center" style="width:40px" value="1" required>
<span id="award_price" class="fl-r mt-2 mr-3 text-small-sm"></span> <span id="award_price" class="fl-r mt-2 mr-3 text-small-sm"></span>
</div> </div>