Skip to content

Commit 7037011

Browse files
committed
Add button if user reaches level 15
1 parent 60a9b54 commit 7037011

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

templates/index.html

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,15 @@ <h1>Flask User Level XP System</h1>
5959
<input type="hidden" name="amount" value="10" />
6060
<button type="submit">Add 10 XP</button>
6161
</form>
62+
{% endif %} {% if user.level >= 15 %}<!--show if user has reached level 15-->
63+
<form
64+
action="{{ url_for('add_xp', user_id=user.id, amount=15) }}"
65+
method="post"
66+
>
67+
<!--form to add XP-->
68+
<input type="hidden" name="amount" value="15" />
69+
<button type="submit">Add 15 XP</button>
70+
</form>
6271
{% endif %} {% if user.level >= 20 %}<!--show if user has reached level 20-->
6372
<form
6473
action="{{ url_for('add_xp', user_id=user.id, amount=20) }}"

0 commit comments

Comments
 (0)