
<div id="ContactPage">
	<div class="container">

		<div class="row">

			<div class="col-sm-10 col-md-offset-1">

                {% if email_sent %}
                    <div class="alert alert-success text-center">
                        <h2><i class="fa fa-check"></i></h2>
                        <h3>{{ _(success_message) }}!</h3>
                    </div>

                    <script>
                        setTimeout(function(){
                            window.location.href="{{ return_to }}";
                        }, 5000);
                    </script>

                {% else %}
                    <h2>{{ _(title or "Contact Us") }}</h2>

                    <hr>

                    <div id="contact-edit-form">

                        {% call forms.post(request.endpoint, class='contact-form') %}

                            <div class="row">
                                <div class="col-sm-6">
                                    {{ forms.input(label=_("Name"), name="name", data={"validation": "required"}) }}
                                </div>
                                <div class="col-sm-6">
                                    {{ forms.input(label=_("Email"), name="email", data={"validation": "email"}) }}
                                </div>
                                <div class="col-sm-12">
                                    {{ forms.input(label=_("Subject"), name="subject", data={"validation": "required"}) }}
                                </div>
                                <div class="col-sm-12">
                                    {{ forms.textarea(label=_("Message"), name="message", rows=8, data={"validation": "required"}) }}
                                </div>
                            </div>

                            <div class="form-group pull-right">
                                {{ recaptcha }}
                            </div>

                            <div class="form-group">
                                {{ forms.button(_("Send Message"), type=_("Submit"), class="btn btn-primary") }}
                            </div>

                        {% endcall %}

                    </div>
                {% endif %}
			</div>
		</div>
	</div>
</div>


