{% extends "base_glarus.html" %}
{% load cms_tags %}
{% block title %}Contact{% endblock %}

{% block content %}
<div class="row">
  <div class="box">
    <div class="col-lg-12">
      	{% for message in messages %}
			<div class="alert alert-success alert-dismissible" role="alert">
				<button type="button" class="close" data-dismiss="alert" aria-label="Close"><span aria-hidden="true">&times;</span></button>
				<strong>{{ message }}</strong>
			</div>
		{% endfor %}
	  <hr>
      <h2 class="intro-text text-center">
			{% static_placeholder "digital_glarus_contact_title" %}
      </h2>
      <hr>
    </div>
    <div class="col-md-8">
      <p>
      	{% static_placeholder "digital_glarus_contact_location" %}
      </p>
    </div>
    <div class="col-md-4">
    	{% static_placeholder "digital_glarus_contact_information" %}
		<div class="clearfix">&nbsp;</div>
    </div>
    <div class="clearfix"></div>
  </div>
</div>

<div class="row">
  <div class="box">
    <div class="col-lg-12">
		<hr>
		<h2 class="intro-text text-center">
			{% static_placeholder "digital_glarus_contact_form_title" %}
		</h2>
		<hr>
      	<p>{% static_placeholder "digital_glarus_contact_form_text" %}</p>
		<form action="{% url 'digitalglarus:contact' %}" method="post" >
			{% csrf_token %}
			<div class="row">
			  <div autofocus class="form-group col-lg-4 {% if form.name.errors %}has-error text-danger{% endif %}">
			     {{ form.name.label_tag }}
			     {{ form.name }}
			     {{ form.name.errors|striptags}}
			  </div>
			  <div class="form-group col-lg-4 {% if form.email.errors %}has-error text-danger {% endif %}">
			     {{ form.email.label_tag }}
			     {{ form.email }}
			     {{ form.email.errors|striptags}}
			  </div>
			  <div class="form-group col-lg-4 {% if form.phone_number.errors %}has-error text-danger {% endif %}">
			     {{ form.phone_number.label_tag }}
			     {{ form.phone_number }}
			     {{ form.phone_number.errors|striptags}}
			  </div>
			  <div class="clearfix"></div>
			  <div class="form-group col-lg-12 {% if form.message.errors %}has-error text-danger {% endif %}">
	  		     {{ form.message.label_tag }}
			     {{ form.message }}
			     {{ form.message.errors|striptags}}
			  </div>
			  {{ form.non_field_errors }}
			  <div class="form-group col-lg-12">
			    <input type="hidden" name="save" value="contact">
			    <button type="submit" class="btn btn-default" {% if form.name.errors %} autofocus {% endif %}>Submit</button>
			  </div>
			</div>
		</form>
<!--  -->
    </div>
  </div>
</div>
<!-- /.container -->
{% endblock %}