templates/includes/blocks/person-contact-form.html.twig line 1
{% set contact = content.contact %}
{% set socials = sulu_resolve_contact(contact.Id).socialMediaProfiles %}
{% if contact.avatar %}
{% set image = sulu_resolve_media(contact.avatar, app.request.locale) %}
{% endif %}
<div class="person-contact-form {{ content.top }} {{ content.bottom }}" id="personContactForm"
x-data="personcontactform">
<div class="person-contact-form__container pb-m">
<div class="person-contact-form__content">
<div class="person-contact-form__info" x-ref="info">
{% if contact.avatar %}
<div class="person-contact-form__media">
<img class="person-contact-form__image" src ="{{ image|thumbnailUrl('2880x') }}"
srcset ="{{ image|thumbnailUrl('320x') }} 320w, {{ image|thumbnailUrl('640x') }} 640w, {{ image|thumbnailUrl('1280x') }} 1280w, {{ image|thumbnailUrl('1440x') }} 1440w, {{ image|thumbnailUrl('2048x') }} 2048w" alt="{{ contact.fullName|default(image.description|striptags) }}"
x-ref="image" sizes="(min-width: 768px) 200px, 50vw">
</div>
{% endif %}
<div class="person-contact-form__lead">
{{ content.personLabel }}
</div>
<div class="person-contact-form__name" id="contact-person">
{{ contact.fullName }}
</div>
<div class="person-contact-form__position">
{% if contact.position %}
{{ contact.position.position }}
{% endif %}
</div>
{% for key, name in socials %}
{% if 'linkedin' in name.username %}
<a href="{{ name.username }}" class="person-contact-form__linkedin">
<svg fill="none" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 44 44">
<circle cx="22" cy="22" r="22" fill="#E0E0E0"/>
<path fill-rule="evenodd" clip-rule="evenodd"
d="M17.211 30.025h-3.346V19.03h3.442v10.995h-.096zm-1.72-12.524c-1.053 0-2.009-.861-2.009-2.008 0-1.052.86-2.008 2.008-2.008 1.052 0 2.008.86 2.008 2.008 0 1.147-.86 2.007-2.008 2.007zm14.532 12.524H26.58v-5.354c0-1.243 0-2.868-1.721-2.868-1.817 0-2.008 1.338-2.008 2.773v5.45H19.41V19.03h3.25v1.53c.479-.86 1.53-1.721 3.252-1.721 3.442 0 4.11 2.295 4.11 5.259v5.927z"
fill="#000"/>
</svg>
</a>
{% endif %}
{% endfor %}
<a href="mailto:{{ contact.getMainEmail }}"
class="person-contact-form__email" id="contact-person-email">{{ contact.getMainEmail }}</a>
<a href="tel:{{ contact.getMainPhone }} "
class="person-contact-form__tel">{{ contact.getMainPhone }}</a>
<div class="person-contact-form__actions">
{% for key, name in socials %}
{% if 'calendly' in name.username and content.calendlyLabel != null %}
{% if content.personContactFormCalendlyFormBlock is defined and content.personContactFormCalendlyFormBlock.calendlyModalContact is defined and content.personContactFormCalendlyFormBlock.calendlyModalContact %}
<div class="modal" :class="{'modal--show': show}" x-data="modal">
<button @click="open"
class="button button--default">
<span class="button__inner">
{{ content.calendlyLabel }}
</span>
</button>
{% include('/includes/blocks/' ~ content.personContactFormCalendlyFormBlock.type ~ '.html.twig') with { content: content.personContactFormCalendlyFormBlock, view: view.personContactFormCalendlyFormBlock } %}
</div>
{% else %}
<a href="{{ name.username }}" class="button button--default" target="_blank">
<span class="button__inner">
{{ content.calendlyLabel }}
</span>
</a>
{% endif %}
{% endif %}
{% endfor %}
<button class="button button--default" @click.prevent="openForm()">
<span class="button__inner">
{{ content.contactFormButtonLabel }}
</span>
</button>
</div>
</div>
<div x-ref="formcontainer">
<div class="person-contact-form__form" x-show="open" x-ref="form" x-transition>
<div class="person-contact-form__title {% if content.personContactFormTitleMobile %}desktop-only {% endif %}">
{{ content.headline|raw }}
</div>
{% if content.personContactFormTitleMobile %}
<div class="person-contact-form__title mobile-only">
{{ content.personContactFormTitleMobile }}
</div>
{% endif %}
<div class="person-contact-form__text">
{{ content.text|raw }}
</div>
{{ include('/includes/form.html.twig', {
'formName': 'person_contact_form',
'id': 'person-contactform',
'firstName': content.personContactFormFirstname,
'lastName': content.personContactFormLastName,
'unternehmen': content.personContactFormUnternehmen,
'email': content.personContactFormEmail,
'message': content.personContactFormMessage,
'subscription': content.personContactFormSubscribe,
'terms': content.personContactFormTerms,
'referrer': content.personContactFormReferrer,
'send': content.personContactFormButtonSend,
'sended': content.personContactFormButtonSended,
'success': content.personContactFormSuccess,
'error': content.personContactFormError
}) }}
</div>
</div>
</div>
</div>
</div>