Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
SRCT
roomlist
Commits
4567b3b5
Commit
4567b3b5
authored
Oct 15, 2016
by
Daniel W Bond
Browse files
I got customized inline form errors for daaaaaaaaaaaays
parent
8b781001
Changes
4
Hide whitespace changes
Inline
Side-by-side
roomlist/accounts/templates/delete_student.html
View file @
4567b3b5
...
@@ -41,7 +41,7 @@
...
@@ -41,7 +41,7 @@
<hr
/>
<hr
/>
<ul
class=
"text-center"
>
<ul
class=
"text-center"
>
{% for error in form.non_field_errors %}
{% 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 %}
{% endfor %}
</ul>
</ul>
<hr
/>
<hr
/>
...
...
roomlist/welcome/templates/welcome_major.html
View file @
4567b3b5
...
@@ -44,6 +44,15 @@
...
@@ -44,6 +44,15 @@
</div>
</div>
<div
class=
"panel-body"
>
<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 %}
<form
action=
""
method=
"post"
>
{% csrf_token %}
{{ my_form.as_p }}
{{ my_form.as_p }}
<hr/>
<hr/>
...
...
roomlist/welcome/templates/welcome_name.html
View file @
4567b3b5
...
@@ -40,13 +40,23 @@
...
@@ -40,13 +40,23 @@
{% if error in my_form.non_field_errors %}
{% if error in my_form.non_field_errors %}
<ul
class=
"text-center"
>
<ul
class=
"text-center"
>
{% for error in my_form.non_field_errors %}
{% 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 %}
{% endfor %}
</ul>
</ul>
{% endif %}
{% endif %}
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
<form
class=
"form-horizontal"
autocomplete=
"off"
action=
""
method=
"post"
>
{% csrf_token %}
<form
class=
"form-horizontal"
autocomplete=
"off"
action=
""
method=
"post"
>
{% csrf_token %}
<fieldset>
<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"
>
<div
class=
"form-group"
>
<label
for=
"{{ my_form.first_name.id_for_label }}"
class=
"col-md-2"
>
First Name
</label>
<label
for=
"{{ my_form.first_name.id_for_label }}"
class=
"col-md-2"
>
First Name
</label>
<div
class=
"col-md-4"
>
<div
class=
"col-md-4"
>
...
@@ -72,6 +82,11 @@
...
@@ -72,6 +82,11 @@
</div>
</div>
</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"
>
<div
class=
"form-group"
>
<label
for=
"{{ my_form.gender.id_for_label }}"
class=
"col-md-3"
>
<label
for=
"{{ my_form.gender.id_for_label }}"
class=
"col-md-3"
>
Gender Identity
<br
/>
(choose all that apply)
Gender Identity
<br
/>
(choose all that apply)
...
@@ -85,6 +100,11 @@
...
@@ -85,6 +100,11 @@
{% endfor %}
{% endfor %}
</div>
</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"
>
<div
class=
"form-group"
>
<label
for
"{{
my_form.show_gender.id_for_label
}}"
class=
"col-md-3"
>
<label
for
"{{
my_form.show_gender.id_for_label
}}"
class=
"col-md-3"
>
Show Gender on Profile?
Show Gender on Profile?
...
...
roomlist/welcome/templates/welcome_privacy.html
View file @
4567b3b5
...
@@ -55,17 +55,22 @@
...
@@ -55,17 +55,22 @@
<div
class=
"panel-body"
>
<div
class=
"panel-body"
>
{% if not request.user.student.recent_changes > 2 %}
{% if not request.user.student.recent_changes > 2 %}
{% spaceless %}
{% spaceless %}
{% if my_form.non_field_errors %}
<hr
/>
<hr
/>
{% if my_form.non_field_errors %}
<ul
class=
"text-center"
>
<ul
class=
"text-center"
>
{% for error in form.non_field_errors %}
{% 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 %}
{% endfor %}
</ul>
</ul>
<hr
/>
<hr
/>
{% endif %}
{% endif %}
<form
class=
"form-horizontal"
autocomplete=
"off"
action=
""
method=
"post"
>
{% csrf_token %}
<form
class=
"form-horizontal"
autocomplete=
"off"
action=
""
method=
"post"
>
{% csrf_token %}
<fieldset>
<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"
>
<div
class=
"form-group"
>
<label
for=
"{{ my_form.on_campus.id_for_label }}"
class=
"col-md-3"
>
<label
for=
"{{ my_form.on_campus.id_for_label }}"
class=
"col-md-3"
>
Do You Live on Campus?
Do You Live on Campus?
...
@@ -80,11 +85,21 @@
...
@@ -80,11 +85,21 @@
We'll let everyone know when we add them. Until then, if you live there, you're
We'll let everyone know when we add them. Until then, if you live there, you're
still welcome to browse around.
still welcome to browse around.
</small></p>
</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=
"form-group"
>
<div
class=
"col-md-12"
>
<div
class=
"col-md-12"
>
{{ my_form.room }}
{{ my_form.room }}
</div>
</div>
</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"
>
<div
class=
"form-group"
>
<label
for=
"{{ my_form.privacy.id_for_label }}"
class=
"col-md-2"
>
<label
for=
"{{ my_form.privacy.id_for_label }}"
class=
"col-md-2"
>
Privacy
Privacy
...
...
Write
Preview
Markdown
is supported
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