mirror of
https://github.com/StefBuwalda/WebTech.git
synced 2025-10-30 11:19:58 +00:00
changed feedback
This commit is contained in:
@@ -5,12 +5,11 @@ Login
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form class="bg-body-tertiary" method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
{% if feedback %}
|
||||
<p>{{feedback}}</p>
|
||||
{% endif %}
|
||||
|
||||
<form class="bg-body-tertiary" method="POST">
|
||||
{{ form.hidden_tag() }}
|
||||
<div>
|
||||
{{ form.username.label }} <br> {{ form.username() }}
|
||||
</div>
|
||||
|
||||
@@ -27,7 +27,7 @@ def login():
|
||||
login_user(user) # type: ignore
|
||||
return redirect("/")
|
||||
else:
|
||||
feedback = "Foutieve login."
|
||||
feedback = "Username or password is incorrect"
|
||||
|
||||
return render_template("login.html", form=login_form, feedback=feedback)
|
||||
|
||||
|
||||
@@ -42,3 +42,8 @@ form {
|
||||
.submit {
|
||||
padding-top: 10px;
|
||||
}
|
||||
|
||||
p {
|
||||
font-size: 16px;
|
||||
color: red;
|
||||
}
|
||||
Reference in New Issue
Block a user