templates/contact/index.html.twig line 1
{% extends 'basev2.html.twig' %}{% block stylesheets %}{% for r in referencements %}<meta name="description" content="{{ r.description }}">{% endfor %}<link href="{{ asset('assets/images/favicon.ico') }}" rel="icon">{% endblock %}{% block body %}<div class="header"><div class="inner-header flex" id="free-quote"><center><div class="section-heading wow fadeIn" data-wow-duration="1s" data-wow-delay="0.3s"><br><br><br><br><h4 style="color: white;" class="center">Je veux en savoir plus, recontactez-moi !</h4><br><br></div></center></div><div><svg class="waves" xmlns="http://www.w3.org/2000/svg" viewBox="0 24 150 28" preserveAspectRatio="none" shape-rendering="auto"><defs><path id="gentle-wave" d="M-160 44c30 0 58-18 88-18s 58 18 88 18 58-18 88-18 58 18 88 18 v44h-352z" /></defs><g class="parallax"><use xlink:href="#gentle-wave" x="48" y="0" fill="rgba(255,255,255,0.7)" /><use xlink:href="#gentle-wave" x="48" y="3" fill="rgba(255,255,255,0.5)" /><use xlink:href="#gentle-wave" x="48" y="5" fill="rgba(255,255,255,0.3)" /><use xlink:href="#gentle-wave" x="48" y="7" fill="#fff" /></g></svg></div></div>{% for message in app.flashes('success') %}<div class="alert me-4 mt-4 colororange"><center class="center">{{ message }}</center></div>{% endfor %}<div id="contact" class="contact-us section mb-150"><div class="container"><div class="row"><div class="col-lg-12 wow fadeInUp" data-wow-duration="0.5s" data-wow-delay="0.25s">{{ form_start(form, {'attr': {'id': 'contact-form', 'enctype': 'multipart/form-data'}}) }}<div class="row"><div class="col-lg-12"><div class="contact-dec"><img src="{{ asset('assets/images/nvimage/contact-FERGUSS.png') }}" alt=""></div></div><div class="col-lg-5"><div id="map"><iframe src="https://maps.google.com/maps?width=100%25&height=600&hl=fr&q=8%20zac%20la%20donniere+(Nom%20de%20votre%20%C3%A9tablissement)&t=&z=14&ie=UTF8&iwloc=B&output=embed" width="100%" height="1000px" frameborder="0" style="border:0" allowfullscreen></iframe></div></div><div class="col-lg-7"><div class="fill-form"><div class="row"><div class="col-lg-12"><fieldset>{{ form_row(form.email) }}</fieldset></div><div class="col-lg-6"><fieldset>{{ form_row(form.Nom) }}</fieldset></div><div class="col-lg-6"><fieldset>{{ form_row(form.prenom, {'label': 'Prénom'}) }}</fieldset></div><div class="col-lg-12"><fieldset>{{ form_row(form.sujet) }}</fieldset></div><div class="col-lg-12"><fieldset>{{ form_row(form.message) }}</fieldset></div><div class="row"><div class="col-lg-2"></div><div class="col-lg-8">{{ form_row(form.extension) }}</div></div>{# Champ reCAPTCHA hidden #}{{ form_widget(form.recaptchaToken) }}<fieldset>{{ form_row(form.submit) }}</fieldset></div></div></div></div>{{ form_end(form) }}</div></div></div></div>{% endblock %}{% block js_scripts %}{{ parent() }}<script src="https://www.google.com/recaptcha/enterprise.js?render={{ google_sitekey }}"></script><script>document.addEventListener('DOMContentLoaded', function () {const form = document.getElementById('contact-form');if (!form) return;form.addEventListener('submit', function (e) {e.preventDefault();const hiddenInput = document.querySelector('input[name="{{ form.recaptchaToken.vars.full_name }}"]');if (!hiddenInput) {console.error('[reCAPTCHA] Champ recaptchaToken introuvable.');alert('Erreur : reCAPTCHA non initialisé.');return;}if (typeof grecaptcha === 'undefined' || typeof grecaptcha.enterprise === 'undefined') {console.error('[reCAPTCHA] grecaptcha.enterprise non chargé.');alert('Erreur : reCAPTCHA non chargé.');return;}grecaptcha.enterprise.ready(function () {grecaptcha.enterprise.execute('{{ google_sitekey }}', { action: 'LOGIN' }).then(function (token) {hiddenInput.value = token; // ✅ token injectéform.submit(); // submit réel après token}).catch(function (error) {console.error('[reCAPTCHA] Erreur lors de l’exécution :', error);alert('Erreur lors de la validation reCAPTCHA.');});});});});</script>{% endblock %}