{% extends "base.html" %}

{% load bootstrap4 %}

{% block main_content %}
<div class="container">
    <div class="row">
        <div class="col-md-10 mx-auto">
            <h1 class="text-center">Contact Us</h1>
            <div class="col-md-7 mx-auto">
                <p>
                    <b>Found something you want to discuss with other volunteers and Community Managers?</b>
                    <a href="https://historyhub.history.gov/community/crowd-loc">Join the conversation on History Hub.</a>
                </p>
                <p>Experiencing a technical issue? Send us a message using the form below.</p>
            </div>
            <form method="post" action="{% url 'contact' %}" id="contact-form" class="col-10 mx-auto">
                {% csrf_token %}

                {% bootstrap_form form %}

                {% buttons %}
                    <button type="submit" class="btn btn-primary">
                        Send Message
                    </button>
                {% endbuttons %}
            </form>
        </div>
    </div>
</div>
{% endblock main_content %}

{% block body_scripts %}
<script>
    var $contactForm = $("#contact-form");
    $contactForm.on("submit", function () {
        $contactForm.addClass("was-validated");
    });
</script>
{% endblock body_scripts %}
