Commit a68be594 authored by ViolanteCodes's avatar ViolanteCodes
Browse files

added an alert block displaying form errors

parent fcd20dca
......@@ -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>
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment