Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
The Tor Project
TPA
Anonymous Ticket Portal
Commits
a68be594
Commit
a68be594
authored
Feb 16, 2021
by
ViolanteCodes
Browse files
added an alert block displaying form errors
parent
fcd20dca
Changes
1
Hide whitespace changes
Inline
Side-by-side
anonticket/templates/anonticket/user_login.html
View file @
a68be594
...
...
@@ -17,6 +17,7 @@
{% endblock %}
<!-- block content block is where page contents go -->
{% block content %}
<!-- Explanation block -->
<div
class=
"row"
>
<div
class=
"col-12"
>
<p
class=
"pr-5"
>
...
...
@@ -26,10 +27,31 @@
</p>
</div>
</div>
<!-- End Explanation block -->
<!-- Start rendering form -->
<form
method=
"get"
class=
"p-5"
>
<!-- Determine if there are form validation errors. If so, render them here. -->
{% if form.non_field_errors %}
<div
class=
"row"
>
<div
class=
"col-12"
>
{% for error in form.non_field_errors %}
<div
class=
"list-unstyled alert alert-primary"
role=
"alert"
>
{{error}}
</div>
{% endfor %}
</div>
</div>
{% endif %}
<!-- Render form -->
<div
class=
"row"
>
<div
class=
"col-12"
>
<form
method=
"get"
class=
"p-5"
>
<ul
class=
"bg-light p-5 flex-form"
>
{{ form.as_ul }}
</ul>
<ul
class=
"bg-light p-5 flex-form"
>
{{ form.as_ul }}
</ul>
<button
type=
"submit"
class=
"btn btn-lg btn-primary mr-2 mt-3 new-line"
>
Login With This Identifier
</button>
</form>
</div>
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment