templates/app/pages/contact.html.twig line 1

Open in your IDE?
  1. {% form_theme form  'app/_inc/fields.html.twig' %}
  2. {% import 'app/_inc/macros.html.twig' as m %}
  3. {% block css %}{{ encore_entry_link_tags('app-contact-css') }}{% endblock %}
  4. {% extends 'base.html.twig' %}
  5. {% block content %}
  6. {{ m.title('Nous contacter', 'nav.contact', asset('img/planete-sablage-a-lyon-batiments-typiques.jpg')) }}
  7.     <main class="main-default contact-page">
  8.         <div class="container container-narrow">
  9.             <div class="contact-left">
  10.                 <address>
  11.                     <p>{{ website_name }}</p>
  12.                     {{ coord.address|raw }}
  13.                     <a class="tel" href="Tel:0778385352">{{ coord.phone }}</a> <br>
  14.                     <a href="{{ coord.google }}" target="_blank">Plan d'accès</a>
  15.                 </address>
  16.             </div>
  17.             <div class="contact-right">
  18.                 <h2 class="h2">Nous contacter</h2>
  19.                 {% for msg in app.flashes('contact.success') %}
  20.                     <div class="alert alert-success">
  21.                         {{ msg|trans }} <i class="fas fa-times"></i></a>
  22.                     </div>
  23.                 {% endfor %}
  24.                 {% for msg in app.flashes('contact.error') %}
  25.                     <div class="alert alert-danger">
  26.                         {{ msg|trans }} <i class="fas fa-times"></i></a>
  27.                     </div>
  28.                 {% endfor %}
  29.                 {{ form_start(form, {attr:{class:'form'}}) }}
  30.                 {{ form_row(form.name) }}
  31.                 {{ form_row(form.phone) }}
  32.                 {{ form_row(form.email) }}
  33.                 {{ form_row(form.message) }}
  34.                 <br>
  35.                 <input type="hidden" id="g-recaptcha-response" name="g-recaptcha-response">
  36.                 <button aria-label="{{ 'all.send'|trans }}" title="{{ 'all.send'|trans }}" class="link">
  37.                     <span>{{ 'all.send'|trans }}</span>
  38.                 </button>
  39.                 {{ form_end(form) }}
  40.             </div>
  41.         </div>
  42.     </main>
  43.     <script src="https://www.google.com/recaptcha/api.js?render={{ captcha_site_key }}"></script>
  44.     <script>
  45.         grecaptcha.ready(function () {
  46.             grecaptcha.execute('{{ captcha_site_key }}', {action: 'validate_captcha'})
  47.                 .then(function (token) {
  48.                     document.getElementById('g-recaptcha-response').value = token;
  49.                 });
  50.         });
  51.     </script>
  52. {% endblock %}