templates/contact/index.html.twig line 1
{% extends 'base.html.twig' %}
{% block title %}
{{ 'contact.title'|trans }}
{% endblock %}
{% block body %}
<div class="container px-4 sm:px-8 md:px-16 lg:px-32 xl:px-48 3xl:px-96 flex flex-wrap mx-auto justify-center items-center text-black">
<div>
<div class="content-center">
<a href="{{ app.request.headers.get('referer') }}"
class="bg-gray-300 text-nowrap hover:bg-gray-400 focus:ring-4 focus:outline-none focus:ring-gray-300 text-black w-full font-medium rounded-md text-sm px-3 py-2.5">
<i class="fa-solid fa-arrow-left text-black"></i>
<span>{{ 'button.back'|trans }}</span>
</a>
</div>
<form method="post">
<div class="flex items-center justify-center">
<div class="max-w-md w-full my-54 space-y-8">
<div>
<h2 class="mt-6 text-center text-3xl font-extrabold text-gray-900">{{ 'allform.contact.contactus'|trans }}</h2>
</div>
{{ form_start(form) }}
{{ form_row(form.firstName) }}
{{ form_row(form.lastName) }}
{{ form_row(form.email) }}
{{ form_row(form.phone) }}
{{ form_row(form.requestType) }}
<div id="problemType-container" style="display: none;">
{{ form_row(form.problemType) }}
</div>
{{ form_row(form.message) }}
<div>
<button type="submit"
class="group relative w-full flex justify-center py-2 px-4 border border-transparent text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500">
{{ 'allform.contact.envoyer'|trans }}
</button>
</div> <br/>
{{ form_end(form) }}
</div> <br/>
</div>
<p>{{ 'contact.info'|trans }} <a href="{{ path('privacy') }}"><strong>{{ 'register.privacy'|trans }}</strong></a> {{ 'contact.info2'|trans }}</p>
</form>
</div> <br/>
</div>
<script>
document.addEventListener("DOMContentLoaded", function () {
const requestType = document.getElementById("contact_form_requestType");
const problemTypeContainer = document.getElementById("problemType-container");
function toggleProblemType() {
if (requestType.value === "problem") {
problemTypeContainer.style.display = "block";
} else {
problemTypeContainer.style.display = "none";
}
}
// Initial check
toggleProblemType();
// When value changes
requestType.addEventListener("change", toggleProblemType);
});
</script>
{% endblock %}