forked from bton/matekasse
max and min value in user
This commit is contained in:
parent
14624a4f6e
commit
a31337f0f2
2 changed files with 2 additions and 2 deletions
|
@ -123,7 +123,7 @@ def create_app(test_config=None):
|
||||||
if user != None :
|
if user != None :
|
||||||
c.execute(f"SELECT * FROM tags WHERE userid={user[0]}")
|
c.execute(f"SELECT * FROM tags WHERE userid={user[0]}")
|
||||||
tags = c.fetchall()
|
tags = c.fetchall()
|
||||||
return render_template("user.html", user=user, tags=tags)
|
return render_template("user.html", user=user, tags=tags, min_value=-50000)
|
||||||
|
|
||||||
else:
|
else:
|
||||||
return render_template("error.html", error_code="043")
|
return render_template("error.html", error_code="043")
|
||||||
|
|
|
@ -23,7 +23,7 @@
|
||||||
</p>
|
</p>
|
||||||
<form action="/change" method="post">
|
<form action="/change" method="post">
|
||||||
<input name="id" type="hidden" value="{{user[0]}}">
|
<input name="id" type="hidden" value="{{user[0]}}">
|
||||||
<input name="change" type="number" lang="nb" step="0.01" max="50000" min="-50000" placeholder="add to balance">
|
<input name="change" type="number" lang="nb" step="0.01" max={{50000-user[2]/100}} min={{min_value-user[2]/100}} placeholder="add to balance">
|
||||||
</form>
|
</form>
|
||||||
</p>
|
</p>
|
||||||
<br></br>
|
<br></br>
|
||||||
|
|
Loading…
Reference in a new issue