Commit 4567b3b5 authored by Daniel W Bond's avatar Daniel W Bond
Browse files

I got customized inline form errors for daaaaaaaaaaaays

parent 8b781001
......@@ -41,7 +41,7 @@
<hr />
<ul class="text-center">
{% for error in form.non_field_errors %}
<li class="text-danger">{{ error }}</li>
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %}
</ul>
<hr />
......
......@@ -44,6 +44,15 @@
</div>
<div class="panel-body">
{% if my_form.non_field_errors %}
<hr />
<ul class="text-center">
{% for error in my_form.non_field_errors %}
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %}
</ul>
<hr />
{% endif %}
<form action="" method="post">{% csrf_token %}
{{ my_form.as_p }}
<hr/>
......
......@@ -40,13 +40,23 @@
{% if error in my_form.non_field_errors %}
<ul class="text-center">
{% for error in my_form.non_field_errors %}
<li>{{ error }}</li>
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %}
</ul>
{% endif %}
<div class="panel-body">
<form class="form-horizontal" autocomplete="off" action="" method="post">{% csrf_token %}
<fieldset>
{% if my_form.first_name.errors %}
{% for error in my_form.first_name.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
{% if my_form.last_name.errors %}
{% for error in my_form.last_name.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
<div class="form-group">
<label for="{{ my_form.first_name.id_for_label }}" class="col-md-2">First Name</label>
<div class="col-md-4">
......@@ -72,6 +82,11 @@
</div>
</div>
{% if my_form.gender.errors %}
{% for error in my_form.gender.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
<div class="form-group">
<label for="{{ my_form.gender.id_for_label }}" class="col-md-3">
Gender Identity<br />(choose all that apply)
......@@ -85,6 +100,11 @@
{% endfor %}
</div>
{% if my_form.show_gender.errors %}
{% for error in my_form.show_gender.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
<div class="form-group">
<label for "{{ my_form.show_gender.id_for_label }}" class="col-md-3">
Show Gender on Profile?
......
......@@ -55,17 +55,22 @@
<div class="panel-body">
{% if not request.user.student.recent_changes > 2 %}
{% spaceless %}
{% if my_form.non_field_errors %}
<hr />
{% if my_form.non_field_errors %}
<ul class="text-center">
{% for error in form.non_field_errors %}
<li>{{ error }}</li>
{% for error in my_form.non_field_errors %}
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %}
</ul>
<hr />
{% endif %}
<form class="form-horizontal" autocomplete="off" action="" method="post">{% csrf_token %}
<fieldset>
{% if my_form.on_campus.errors %}
{% for error in form.on_campus.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
<div class="form-group">
<label for="{{ my_form.on_campus.id_for_label }}" class="col-md-3">
Do You Live on Campus?
......@@ -80,11 +85,21 @@
We'll let everyone know when we add them. Until then, if you live there, you're
still welcome to browse around.
</small></p>
{% if my_form.room.errors %}
{% for error in form.room.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
<div class="form-group">
<div class="col-md-12">
{{ my_form.room }}
</div>
</div>
{% if my_form.privacy.errors %}
{% for error in form.privacy.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %}
{% endif %}
<div class="form-group">
<label for="{{ my_form.privacy.id_for_label }}" class="col-md-2">
Privacy
......
Markdown is supported
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