{% extends 'cccontact/base.html' %}

{% block title %}Contact Us {% endblock %}

{% block breadcrumbs %}
	<a href="{% url cccontact:contact %}">Contact Us</a>
{% endblock %}

{% block content %}
<form method="post" action="">
	{% csrf_token %}
	{% with field=form.name %}
		<fieldset class="name required {% if field.errors %} error {% endif %}">
			<label for="id_{{field.html_name}}">
				{{field.label|title}}
				{% for error in field.errors %}
					{% if forloop.first %} &ndash; {% endif %}
					{{error|lower}}
					{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</label>
			{{field}}
		</fieldset>
	{% endwith %}

	{% with field=form.email %}
		<fieldset class="email required {% if field.errors %} error {% endif %}">
			<label for="id_{{field.html_name}}">
				{{field.label|title}}
				{% for error in field.errors %}
					{% if forloop.first %} &ndash; {% endif %}
					{{error|lower}}
					{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</label>
			{{field}}
		</fieldset>
	{% endwith %}

	{% with field=form.subject %}
		<fieldset class="subject required {% if field.errors %} error {% endif %}">
			<label for="id_{{field.html_name}}">
				{{field.label|title}}
				{% for error in field.errors %}
					{% if forloop.first %} &ndash; {% endif %}
					{{error|lower}}
					{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</label>
			{{field}}
		</fieldset>
	{% endwith %}

	{% with field=form.phone %}
		<fieldset class="phone {% if field.errors %} error {% endif %}">
			<label for="id_{{field.html_name}}">
				{{field.label|title}}
				{% for error in field.errors %}
					{% if forloop.first %} &ndash; {% endif %}
					{{error|lower}}
					{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</label>
			{{field}}
		</fieldset>
	{% endwith %}
	{% with field=form.m %}
		<fieldset class="m required {% if field.errors %} error {% endif %}">
			<label for="id_{{field.html_name}}">
				{{field.label|title}}
				{% for error in field.errors %}
					{% if forloop.first %} &ndash; {% endif %}
					{{error|lower}}
					{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</label>
			{{field}}
		</fieldset>
	{% endwith %}

	{% with field=form.message %}
		<fieldset class="message required {% if field.errors %} error {% endif %}">
			<label for="id_{{field.html_name}}">
				{{field.label|title}}
				{% for error in field.errors %}
					{% if forloop.first %} &ndash; {% endif %}
					{{error|lower}}
					{% if not forloop.last %}, {% endif %}
				{% endfor %}
			</label>
			{{field}}
		</fieldset>
	{% endwith %}

	<fieldset class="button">
		<button type="submit">Submit</button>
	</fieldset>
</form>
{% endblock %}

{% block extra_js %}
	<script src="{{STATIC_URL}}cccontact/js/cccontact.js"></script>
{% endblock %}
