templates/includes/blocks/contact-form.html.twig line 1

  1. <div class="contact-form {{ content.top }} {{ content.bottom }}" id="contactForm" x-data="contactform">
  2.     <div class="contact-form__container">
  3.         <div class="contact-form__title" x-ref="title">
  4.             {% if content.contactFormPagina %}
  5.             {% if content.contactFormSeoHeadlinePagina %}<{{ content.contactFormSeoHeadlinePagina }}>{% endif %}
  6.                 <div class="pagina">
  7.                     {{ content.contactFormPagina }}
  8.                 </div>
  9.             {% if content.contactFormSeoHeadlinePagina %}</{{ content.contactFormSeoHeadlinePagina }}>{% endif %}
  10.             {% endif %}
  11.             {% if content.contactFormHeadline %}
  12.            <div {% if content.contactFormTitleMobile %} class="desktop-only" {% endif %}>
  13.                {{ content.contactFormHeadline|raw }}
  14.            </div>
  15.             {% endif %}
  16.         </div>
  17.         {% if content.contactFormTitleMobile %}
  18.             <div class="contact-form__title mobile-only" x-ref="mobiletitle">
  19.                 {{ content.contactFormTitleMobile|raw }}
  20.             </div>
  21.         {% endif %}
  22.         <div class="contact-form__text" x-ref="text">
  23.             {{ content.contactFormText|raw }}
  24.         </div>
  25.         {% if content.contactFormAppointmentLabel and content.contactFormContact %}
  26.             {% set contact = content.contactFormContact %}
  27.             {% set socials = sulu_resolve_contact(contact.Id).socialMediaProfiles %}
  28.             {% for key, name in socials %}
  29.                 {% if 'calendly' in name.username %}
  30.                     {% set calendlyLink = name.username %}
  31.                     {% if content.contactFormCalendlyFormBlock is defined and content.contactFormCalendlyFormBlock.calendlyModalContact is defined and content.contactFormCalendlyFormBlock.calendlyModalContact %}
  32.                         <div class="modal" :class="{'modal--show': show}" x-data="modal">
  33.                             <div class="contact-form__appointment" x-ref="appointment">
  34.                                 <button @click="open" type="submit" target="_blank"
  35.                                         class="button button--default">
  36.                                                     <span class="button__inner">
  37.                                                         {{ content.contactFormAppointmentLabel }}
  38.                                                     </span>
  39.                                 </button>
  40.                             </div>
  41.                             {% include('/includes/blocks/' ~ content.contactFormCalendlyFormBlock.type ~ '.html.twig') with { content: content.contactFormCalendlyFormBlock, view: view.contactFormCalendlyFormBlock } %}
  42.                         </div>
  43.                     {% else %}
  44.                         <div class="contact-form__appointment" x-ref="appointment">
  45.                             <a href="{{ calendlyLink }}" type="submit" target="_blank" class="button button--default">
  46.                                 <span class="button__inner">
  47.                                     {{ content.contactFormAppointmentLabel }}
  48.                                 </span>
  49.                             </a>
  50.                         </div>
  51.                     {% endif %}
  52.                 {% endif %}
  53.             {% endfor %}
  54.         {% endif %}
  55.         <div class="contact-form__form" x-ref="form">
  56.             {{ include('/includes/form.html.twig', {
  57.                 'formName': 'contact_form',
  58.                 'id': 'contactform',
  59.                 'firstName': content.contactFormFirstname,
  60.                 'lastName': content.contactFormLastName,
  61.                 'unternehmen': content.contactFormUnternehmen,
  62.                 'email': content.contactFormEmail,
  63.                 'message': content.contactFormMessage,
  64.                 'subscription': content.contactFormSubscribe,
  65.                 'terms': content.contactFormTerms,
  66.                 'referrer': content.contactFormReferrer,
  67.                 'send': content.contactFormButtonSend,
  68.                 'sended': content.contactFormButtonSended,
  69.                 'success': content.contactFormSuccess,
  70.                 'error': content.contactFormError
  71.             }) }}
  72.         </div>
  73.     </div>
  74. </div>