Commit 019961c3 authored by Daniel W Bond's avatar Daniel W Bond

templates now refer to form per modifications in views

parent b831ab73
...@@ -44,10 +44,10 @@ ...@@ -44,10 +44,10 @@
</div> </div>
<div class="panel-body"> <div class="panel-body">
{% if my_form.non_field_errors %} {% if form.non_field_errors %}
<hr /> <hr />
<ul class="text-center"> <ul class="text-center">
{% for error in my_form.non_field_errors %} {% for error in form.non_field_errors %}
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li> <li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -55,30 +55,30 @@ ...@@ -55,30 +55,30 @@
{% 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.major.errors %} {% if form.major.errors %}
{% for error in my_form.major.errors %} {% for error in form.major.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<div class="col-lg-9"> <div class="col-lg-9">
<label for="{{ my_form.major.id_for_label }}"> <label for="{{ form.major.id_for_label }}">
Major(s) Major(s)
</label><br /> </label><br />
{{ my_form.major }} {{ form.major }}
</div> </div>
</div> </div>
{% if my_form.graduating_year.errors %} {% if form.graduating_year.errors %}
{% for error in my_form.graduating_year.errors %} {% for error in form.graduating_year.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<div class="col-lg-3 col-md-3 col-sm-4 col-xs-6"> <div class="col-lg-3 col-md-3 col-sm-4 col-xs-6">
<label for="{{ my_form.graduating_year.id_for_label }}"> <label for="{{ form.graduating_year.id_for_label }}">
Graduating Year Graduating Year
</label> </label>
{{ my_form.graduating_year }} {{ form.graduating_year }}
</div> </div>
</div> </div>
<hr/> <hr/>
......
...@@ -37,9 +37,9 @@ ...@@ -37,9 +37,9 @@
<div class="panel-heading"> <div class="panel-heading">
<h1 class="panel-title text-center"><strong>Name & Gender</strong></h1> <h1 class="panel-title text-center"><strong>Name & Gender</strong></h1>
</div> </div>
{% if error in my_form.non_field_errors %} {% if error in form.non_field_errors %}
<ul class="text-center"> <ul class="text-center">
{% for error in my_form.non_field_errors %} {% for error in form.non_field_errors %}
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li> <li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -47,52 +47,52 @@ ...@@ -47,52 +47,52 @@
<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 %} {% if form.first_name.errors %}
{% for error in my_form.first_name.errors %} {% for error in form.first_name.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
{% if my_form.last_name.errors %} {% if form.last_name.errors %}
{% for error in my_form.last_name.errors %} {% for error in form.last_name.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<div class="col-md-6"> <div class="col-md-6">
<label for="{{ my_form.first_name.id_for_label }}">First Name</label> <label for="{{ form.first_name.id_for_label }}">First Name</label>
{% if not my_form.first_name.errors %} {% if not form.first_name.errors %}
{{ my_form.first_name }} {{ form.first_name }}
{% else %} {% else %}
<div class="has-error"> <div class="has-error">
{{ my_form.first_name }} {{ form.first_name }}
<p>{{ form.first_name.errors }}</p> <p>{{ form.first_name.errors }}</p>
</div> </div>
{% endif %} {% endif %}
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
<label for="{{ my_form.last_name.id_for_label }}">Last Name</label> <label for="{{ form.last_name.id_for_label }}">Last Name</label>
{% if not my_form.last_name.errors %} {% if not form.last_name.errors %}
{{ my_form.last_name }} {{ form.last_name }}
{% else %} {% else %}
<div class="has-error"> <div class="has-error">
{{ my_form.last_name }} {{ form.last_name }}
<p>{{ form.last_name.errors }}</p> <p>{{ form.last_name.errors }}</p>
</div> </div>
{% endif %} {% endif %}
</div> </div>
</div> </div>
{% if my_form.gender.errors %} {% if form.gender.errors %}
{% for error in my_form.gender.errors %} {% for error in form.gender.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<label for="{{ my_form.gender.id_for_label }}" class="col-xs-12"> <label for="{{ form.gender.id_for_label }}" class="col-xs-12">
Gender Identity Gender Identity
<p class="help-block">(choose all that apply)</p> <p class="help-block">(choose all that apply)</p>
</label> </label>
{% for checkbox in my_form.gender %} {% for checkbox in form.gender %}
<div class="checkbox col-md-3 col-sm-3 col-sm-offset-1 col-xs-5 col-xs-offset-1"> <div class="checkbox col-md-3 col-sm-3 col-sm-offset-1 col-xs-5 col-xs-offset-1">
<label for="{{ checkbox.id_for_label }}"> <label for="{{ checkbox.id_for_label }}">
{{ checkbox.choice_label|gender_icon }} {{ checkbox.choice_label|gender_icon }}
...@@ -101,17 +101,17 @@ ...@@ -101,17 +101,17 @@
{% endfor %} {% endfor %}
</div> </div>
{% if my_form.show_gender.errors %} {% if form.show_gender.errors %}
{% for error in my_form.show_gender.errors %} {% for error in form.show_gender.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<div class="col-md-6"> <div class="col-md-6">
<label for "{{ my_form.show_gender.id_for_label }}"> <label for "{{ form.show_gender.id_for_label }}">
Show Gender on Profile? Show Gender on Profile?
</label><br /> </label><br />
{% for radio in my_form.show_gender %} {% for radio in form.show_gender %}
<label class="radio-inline">{{ radio.choice_label }}{{ radio.tag }}</label> <label class="radio-inline">{{ radio.choice_label }}{{ radio.tag }}</label>
{% endfor %} {% endfor %}
</div> </div>
......
...@@ -55,9 +55,9 @@ ...@@ -55,9 +55,9 @@
<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 %} {% if form.non_field_errors %}
<ul class="text-center"> <ul class="text-center">
{% for error in my_form.non_field_errors %} {% for error in form.non_field_errors %}
<li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li> <li class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</li>
{% endfor %} {% endfor %}
</ul> </ul>
...@@ -65,17 +65,17 @@ ...@@ -65,17 +65,17 @@
{% 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 %} {% if form.on_campus.errors %}
{% for error in 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> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<div class="col-md-4"> <div class="col-md-4">
<label for="{{ my_form.on_campus.id_for_label }}"> <label for="{{ form.on_campus.id_for_label }}">
Do You Live on Campus? Do You Live on Campus?
</label><br/> </label><br/>
{% for option in my_form.on_campus %} {% for option in form.on_campus %}
<label class="radio-inline">{{ option.choice_label }}{{ option.tag }}</label> <label class="radio-inline">{{ option.choice_label }}{{ option.tag }}</label>
{% endfor %} {% endfor %}
</div> </div>
...@@ -87,25 +87,25 @@ ...@@ -87,25 +87,25 @@
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.
</p> </p>
{% if my_form.room.errors %} {% if form.room.errors %}
{% for error in form.room.errors %} {% for error in form.room.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
{{ my_form.room }} {{ form.room }}
</div> </div>
{% if my_form.privacy.errors %} {% if form.privacy.errors %}
{% for error in form.privacy.errors %} {% for error in form.privacy.errors %}
<p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p> <p class="text-danger"><i class="fa fa-exclamation-triangle fa-fw"></i> {{ error }}</p>
{% endfor %} {% endfor %}
{% endif %} {% endif %}
<div class="form-group"> <div class="form-group">
<div class="col-md-3 col-sm-6"> <div class="col-md-3 col-sm-6">
<label for="{{ my_form.privacy.id_for_label }}"> <label for="{{ form.privacy.id_for_label }}">
Privacy Privacy
</label><br/> </label><br/>
{{ my_form.privacy }} {{ form.privacy }}
</div> </div>
</div> </div>
</div> </div>
......
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