templates/includes/blocks/calendly-form.html.twig line 1
{% set contact = content.calendlyFormContact %}
{% set socials = sulu_resolve_contact(contact.Id).socialMediaProfiles %}
{% set widgetUniqueId = 'calendly_form_' ~ random(1000000000, 9999999999) %}
{% for key, name in socials %}
{% if 'calendly' in name.username %}
{% set calendlyLink = name.username %}
<div class="contact-form {{ content.top }} {{ content.bottom }}" data-widget-id="{{ widgetUniqueId }}" x-data="calendlyform(
'{{ calendlyLink }}', '{{ widgetUniqueId }}')" id="calendlyForm_{{ widgetUniqueId }}">
<div class="contact-form__container">
<div class="contact-form__title" x-ref="title">
{% if content.calendlyFormPagina %}
{% if content.calendlyFormSeoHeadlinePagina %}<{{ content.calendlyFormSeoHeadlinePagina }}>{% endif %}
<div class="pagina" >
{{ content.calendlyFormPagina }}
</div>
{% if content.calendlyFormSeoHeadlinePagina %}</{{ content.calendlyFormSeoHeadlinePagina }}>{% endif %}
{% endif %}
<div {% if content.calendlyFormTitleMobile %} class="desktop-only"{% endif %}>
{{ content.calendlyFormHeadline|raw }}
</div>
</div>
{% if content.calendlyFormTitleMobile %}
<div class="contact-form__title mobile-only"
x-ref="mobiletitle">
{{ content.calendlyFormHeadline|raw }}
</div>
{% endif %}
<div class="contact-form__text" x-ref="text">
{{ content.calendlyFormText | raw }}
</div>
{% if content.calendlyFormContact %}
{% set contact = content.calendlyFormContact %}
<div class="contact-form__person" x-ref="person">
{% if contact.avatar %}
{% set image = sulu_resolve_media(contact.avatar, app.request.locale) %}
<div class="contact-form__person-media">
<img class="contact-form__person-image" src ="{{ image|thumbnailUrl('320x') }}" alt="{{ contact.fullName|default(image.description|striptags) }}" sizes="200px">
</div>
{% endif %}
<div class="contact-form__person-info">
<div class="contact-form__person-name">{{ contact.firstName }} {{ contact.lastName }}</div>
<div class="contact-form__person-text">
{{ contact.position.position }}<br>
<a href="tel:{{ contact.mainPhone }}">{{ contact.mainPhone }}</a><br>
<a href="mailto:{{ contact.mainEmail }}">{{ contact.mainEmail }}</a>
</div>
</div>
</div>
{% endif %}
<div class="contact-form__form" x-ref="form" x-show="formTabActive">
{{ include('/includes/calendlyForm.html.twig', {
idSuffix: widgetUniqueId
}) }}
</div>
<div
class="contact-form__calendly-form modal__modal"
x-ref="calendlyWidget"
x-show="calendlyTabActive"
data-calendly-url="{{ calendlyLink ~ ( '?' in calendlyLink ? '&' : '?') ~ 'hide_gdpr_banner=1' }}"
data-asset-url="https://assets.calendly.com/assets/external/widget.js"
@calendlyassetsloaded.window="initCalendlyWidget"
@message.window="messageReceived"
>
<div class="modal-card modal-card--transparent">
<!-- Calendly Inline-Widget Beginn -->
<div class="calendly-widget-inline" :class="calendlyWidgetLoaded && 'calendly-widget-loaded'" style="min-width:320px;height:700px;" x-ref="calendlyWidgetAnchor"></div>
<!-- Calendly Inline-Widget Ende -->
</div>
<div class="modal__close" @click="closeCalendly">
<svg viewBox="0 0 16 16" fill="none" xmlns="http://www.w3.org/2000/svg">
<path d="M13.5 2.5L2.5 13.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"
stroke-linejoin="round"/>
<path d="M2.5 2.5L13.5 13.5" stroke="currentColor" stroke-miterlimit="10" stroke-linecap="round"
stroke-linejoin="round"/>
</svg>
</div>
</div>
</div>
</div>
{% endif %}
{% endfor %}