templates/articles/agenda.html.twig line 1
{% extends "base.html.twig" %}{# extension.excerpt #}{% block style %}{{ parent() }}{% include "articles/styles/base-css-logic.html.twig" %}{% if content.form is defined and content.form is not empty %}{% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'agenda_form_css'} %}{% include "pages/headers/encore-entry-css-files.html.twig" with {file: 'loader_css'} %}{% endif %}{% endblock %}{% block content %}{% set values = "" %}{% set values = ['Actualités', 'Agenda'] %}{% include "articles-blocks/breadcrumb.html.twig" with {titles : values} %}<section class="single-article-container mb-20px" id="agenda"><article><section><div class="mlr-1em">{% include "articles-blocks/header.html.twig" %}<div class="dflex jcsb lh28 fwwrap"><div>{% include "articles-blocks/contributors.html.twig" %}{% include "articles-blocks/publish-date.html.twig" %}</div><div class="taright">{% include "articles-blocks/readtime.html.twig" %}{% include "articles-blocks/share-buttons.html.twig" %}</div></div>{% if extension.excerpt.categories is defined and extension.excerpt.categories is not empty %}{% set categories = extension.excerpt.categories %}{% include "blocks/previews-from-controller/blocks/categories.html.twig" %}{% endif %}{% if content.chapo is defined and content.chapo is not empty %}<div class="fw500 lh28 fs20 text cgrey mt-40px mb-20px">{{ content.chapo|raw }}</div>{% endif %}</div></section>{% if content.title is defined and content.title is not empty %}<div class="mb-3em mt-40px"><div class="mlr-1em fs18"><div class="pb1em"><h2>Informations pratiques</h2></div>{% if content.organisator is defined and content.organisator is not empty %}<div class="container-infos-pratiques"><div class="icon-ctnr"><img src="/resources/img/user-offre-icon.svg" alt="Profil" class="mr-1em"></div><span>Organisateur :{{ (content.organisator | raw) == "pqna" ? "PQN-A" : "Externe - " ~ content.organisator_attendants | raw }}</span></div>{% endif %}{% if content.date is defined and content.date is not empty %}<div class="container-infos-pratiques"><div class="icon-ctnr"><img src="/resources/img/calendar-icon.svg" alt="Calendrier" class="mr-1em"></div><span>{% if content.endDate is defined and content.endDate is not empty and content.endDate != content.date %}Du{% endif %}{{ content.date|format_datetime('full', 'none', locale='fr')|split(' ', 2)[1] }}{% if content.endDate is defined and content.endDate is not empty and content.endDate != content.date %}au{{ content.endDate|format_datetime('full', 'none', locale='fr')|split(' ', 2)[1] }}{% endif %}</span><div class="icon-ctnr ml-1em"><img src="/resources/img/clock-icon.svg" alt="Calendrier" class="mr-1em"></div><span>{% if content.time is defined and content.time is not empty %}{{ content.time }}{% endif %}</span></div>{% endif %}{% if content.place_text is defined and content.place_text is not empty orcontent.place_link is defined and content.place_link is not empty %}<div class="container-infos-pratiques"><div class="icon-ctnr"><img src="/resources/img/pin-icon.svg" alt="Structure" class="mr-1em"></div><span>{% if content.place_select == "texte" %}{{ content.place_text }}{% else %}<a href="{{ content.place_link }}" target="_blank">{{ content.place_link }}</a>{% endif %}</span></div>{% endif %}<div class="container-infos-pratiques"><div class="icon-ctnr"><img src="/resources/img/cash-icon.svg" alt="Location" class="mr-1em"></div>{% if content.prices is defined and content.prices is not empty %}<span>{% if content.prices|length > 0 %}{% set finalPrice = 0 %}{% for price in content.prices %}{% if price.price is defined and price.price is not empty %}{% set finalPrice = finalPrice + price.price %}{% endif %}{% endfor %}{% if finalPrice > 0 %}De 0€ à{{ finalPrice|format_number(locale='fr') }}€{% else %}Gratuit{% endif %}{% endif %}</span>{% else %}Gratuit{% endif %}</div>{% if content.form %}<div id="form-info-container">{% include "articles/blocks/noscript.html.twig" %}{% if app.request.get('Erreur') is not null and app.request.get('Erreur') == 00000 or app.request.get('send') == true %}<p class="primary mt-1em">Vous êtes inscrit.e à cet événement. Pour vous désinscrire, veuillez contacter l'administrateur du site.</p>{% elseif app.request.get('Erreur') is not null and app.request.get('Erreur') == 00001 %}<p class="danger mt-1em">Vous avez annulé votre paiement. Veuillez patienter quelques secondes.</p><meta http-equiv="refresh" content="15;URL={{sulu_content_root_path() ~ content.routePath}}">{% else %}{% if app.user and app.user.contact in content.participants and check_dynamic_entry(uuid, app.user.contact.id) is not null %}<p class="danger mt-1em">Une erreur s'est produite lors de la validation de votre inscription. Veuillez contacter l'administrateur du site.</p>{% elseif app.user and app.user.contact in content.participants %}<p class="primary mt-1em">Vous êtes inscrit.e à cet événement. Pour vous désinscrire, veuillez contacter l'administrateur du site.</p>{% endif %}{% endif %}</div>{% if not (app.user and app.user.contact in content.participants) or app.user is empty %}{% set referer = app.request.server.get('HTTP_REFERER') %}{% set PBX_SITE = app.request.server.get('PBX_SITE') %}{% set PBX_RANG = app.request.server.get('PBX_RANG') %}{% set PBX_IDENTIFIANT = app.request.server.get('PBX_IDENTIFIANT') %}{% set PBX_TOTAL = "%p%" %}{% set PBX_DEVISE = "978" %}{% if app.user %}{% set PBX_CMD = uuid ~ "_" ~ app.user.contact.id ~ "_" ~ "now"|date("U") %}{% set PBX_PORTEUR = app.user.email %}{% else %}{% set PBX_CMD = uuid ~ "_" ~ "now"|date("U") %}{% set PBX_PORTEUR = "%r%" %}{% endif %}{% set PBX_RETOUR = "Mt:M;Ref:R;Auto:A;Erreur:E;" %}{% set PBX_EFFECTUE = sulu_content_root_path() ~ content.routePath %}{% set PBX_REFUSE = sulu_content_root_path() ~ content.routePath %}{% set PBX_ANNULE = sulu_content_root_path() ~ content.routePath %}{% set PBX_ATTENTE = sulu_content_root_path() ~ content.routePath %}{% set PBX_HASH = "SHA512" %}{% set PBX_TIME = "now"|date("Y-m-d\\TH:i:sP") %}{% set PBX_REPONDRE_A = sulu_content_root_path() ~ "/paybox/payment/events" %}{% set hmac = app.request.server.get('HMAC_SITE') %}{% set msg = "PBX_SITE=" ~ PBX_SITE ~"&PBX_RANG=" ~ PBX_RANG ~"&PBX_IDENTIFIANT=" ~ PBX_IDENTIFIANT ~"&PBX_TOTAL=" ~ PBX_TOTAL ~"&PBX_DEVISE=" ~ PBX_DEVISE ~"&PBX_CMD=" ~ PBX_CMD ~"&PBX_PORTEUR=" ~ PBX_PORTEUR ~"&PBX_RETOUR=" ~ PBX_RETOUR ~"&PBX_EFFECTUE=" ~ PBX_EFFECTUE ~"&PBX_REFUSE=" ~ PBX_REFUSE ~"&PBX_ANNULE=" ~ PBX_ANNULE ~"&PBX_ATTENTE=" ~ PBX_ATTENTE ~"&PBX_HASH=" ~ PBX_HASH ~"&PBX_TIME=" ~ PBX_TIME ~"&PBX_REPONDRE_A=" ~ PBX_REPONDRE_A %}{% set form_id = content.form.vars['id'] %}{% set form_type = content.form.vars['value'].type %}{% set form_type_id = content.form.vars['value'].typeId %}{% set form_locale = content.form.vars['value'].locale %}{% set form_formId = content.form.children['formId'].vars['value'] %}{% set form_formName = content.form.children['formName'].vars['value'] %}{% set form_checksum = content.form.children['checksum'].vars['value'] %}{% if not app.user %}<button class="mt-1em CTA" id="show-registration-links">Je m'inscris</button><p class="mt-2em dnone" id="registration-links"><a href="{{ path('sulu_community.registration') }}" class="cblue fw600">Créez vous un compte</a>ou<a href="{{ path('sulu_community.login') }}" class="cblue fw600">connectez-vous</a>afin de faciliter votre inscription{% if content.form_visible %}ou<span id="show-event-form" class="cblue fw600" tabindex="0">poursuivez sans compte</span>{% endif %}.</p>{% endif %}{% if (not app.user and content.form_visible) or (app.user is defined and app.user is not empty) %}<div {% if not app.user %} class="hidden" {% endif %} id="event-form-container">{{ form_start(content.form, {"attr": {"id": "sulu-agenda-form", "class": "dflex fdc prelative", "data-id": form_type_id}}) }}<div class="w100 h100 pabsolute with-loader"><div class="lds-dual-ring pabsolute form-loader" id="loader"></div></div>{% set excludedValues = ['firstName', 'lastName', 'email', 'locale', 'type', 'typeId', 'formId', 'formName', 'checksum', 'text', 'text1', 'text2'] %}{% if app.user %}<input type="hidden" id="{{form_id ~ "_firstName" }}" name="{{form_id ~ "[firstName]"}}" value="{{ app.user.firstName }}"><input type="hidden" id="{{form_id ~ "_lastName" }}" name="{{form_id ~ "[lastName]"}}" value="{{ app.user.lastName }}"><input type="hidden" id="{{form_id ~ "_email" }}" name="{{form_id ~ "[email]"}}" value="{{ app.user.email }}"><input type="hidden" id="{{form_id ~ "_text2" }}" name="{{form_id ~ "[text2]"}}" value="{{ app.user.contact.structure }}">{% else %}{% if content.form.firstName is defined and content.form.firstName is not null %}<label for="{{form_id ~ "_firstName" }}" class="fw400 fs16 lh20 mb-8px mt-1em">Prénom *</label><input type="text" id="{{form_id ~ "_firstName" }}" name="{{form_id ~ "[firstName]"}}" required="">{% endif %}{% if content.form.lastName is defined and content.form.lastName is not null %}<label for="{{form_id ~ "_lastName" }}" class="fw400 fs16 lh20 mb-8px mt-1em">Nom *</label><input type="text" id="{{form_id ~ "_lastName" }}" name="{{form_id ~ "[lastName]" }}" required="">{% endif %}{% if content.form.email is defined and content.form.email is not null %}<label for="{{form_id ~ "_email" }}" class="fw400 fs16 lh20 mb-8px mt-1em">Email *</label><input type="text" id="{{form_id ~ "_email" }}" name="{{form_id ~ "[email]" }}" required="">{% endif %}{% if content.form.text2 is defined and content.form.text2 is not null %}<label for="{{form_id ~ "_text2" }}" class="fw400 fs16 lh20 mb-8px mt-1em">Structure *</label><input type="text" id="{{form_id ~ "_text2" }}" name="{{form_id ~ "[text2]" }}" required="">{% endif %}{% endif %}<input type="hidden" id="{{form_id ~ "_locale" }}" name="{{form_id ~ "[locale]"}}" value="{{ form_locale }}"><input type="hidden" id="{{form_id ~ "_type" }}" name="{{form_id ~ "[type]"}}" value="{{ form_type }}"><input type="hidden" id="{{form_id ~ "_typeId" }}" name="{{form_id ~ "[typeId]"}}" value="{{ form_type_id }}"><input type="hidden" id="{{form_id ~ "_formId" }}" name="{{form_id ~ "[formId]"}}" value="{{ form_formId }}"><input type="hidden" id="{{form_id ~ "_formName" }}" name="{{form_id ~ "[formName]"}}" value="{{ form_formName }}"><input type="hidden" id="{{form_id ~ "_checksum" }}" name="{{form_id ~ "[checksum]"}}" value="{{ form_checksum }}"><input type="hidden" id="{{form_id ~ "_text" }}" name="{{form_id ~ "[text]"}}" value="{{ PBX_CMD }}"><input type="hidden" id="{{form_id ~ "_text1" }}" name="{{form_id ~ "[text1]"}}" value="">{% for i, child in content.form.children|keys %}{% if child not in excludedValues %}{% set newChild = attribute(content.form, child) %}{% if "textarea" in child and "pqna description" in newChild.vars.label %}<input type="hidden" id="{{form_id ~ "_" ~ child }}" name="{{form_id ~ "[" ~ child ~ "]"}}">{% elseif "dropdown" in child and "Département" in newChild.vars.label %}{% if app.user.contact.departement is defined and app.user.contact.departement is not null %}{% set contact_dpmt = app.user.contact.departement.translations[0].translation %}{% else %}{% set contact_dpmt = "" %}{% endif %}<div class="mt-1em dflex fdc"><label class="fw400 fs16 lh20" for="{{ form_id ~ "_" ~ child }}" label_html="true">{{ field_label(content.form.children[child]) }}</label><select name="{{ field_name(content.form.children[child]) }}" class="form-control" id="{{ form_id ~ "_" ~ child }}" {% if content.form.children[child].vars.required %} required {% endif %}><option value=""></option>{% for label, value in field_choices(content.form.children[child]) %}{% set selected = (value == contact_dpmt) ? 'selected' : '' %}<option value="{{ value }}" {{ selected }}>{{ label }}</option>{% endfor %}</select></div>{% elseif "dropdown" in child and "Fonction" in newChild.vars.label %}{% set contact_dpmt = "" %}{% if app.user %}{% if app.user.fonction is defined and app.user.fonction is not null %}{% set contact_dpmt = app.user.fonction %}{% elseif 'opérateur' in app.user.typologieActeurValue|lower or 'partenaires' in app.user.typologieActeurValue|lower or app.user.typologieActeurValue|lower == 'autres' %}{% set contact_dpmt = app.user.typologieActeurValue %}{% if app.user.typologieActeurValue|lower == 'partenaires' %}{% set contact_dpmt = 'Partenaire' %}{% endif %}{% if app.user.typologieActeurValue|lower == 'opérateurs' %}{% set contact_dpmt = 'Opérateur' %}{% endif %}{% else %}{% set contact_dpmt = "" %}{% endif %}{% endif %}<div class="mt-1em dflex fdc"><label class="fw400 fs16 lh20" for="{{ form_id ~ "_" ~ child }}" label_html="true">{{ field_label(content.form.children[child]) }}</label><select name="{{ field_name(content.form.children[child]) }}" class="form-control" id="{{ form_id ~ "_" ~ child }}" {% if content.form.children[child].vars.required %} required {% endif %}><option value=""></option>{% for label, value in field_choices(content.form.children[child]) %}{% set selected = (value == contact_dpmt) ? 'selected' : '' %}<option value="{{ value }}" {{ selected }}>{{ label }}</option>{% endfor %}</select>{# {% if contact_dpmt is not empty %}<input type="hidden" name="{{ field_name(content.form.children[child]) }}" value="{{ contact_dpmt }}">{% endif %} #}</div>{% elseif "salutation" in child %}<div class="mt-1em dflex fdc"><label class="fw400 fs16 lh20" for="{{ form_id ~ "_" ~ child }}" label_html="true">{{ field_label(content.form.children[child]) }}</label><select name="{{ field_name(content.form.children[child]) }}" class="form-control" id="{{ form_id ~ "_" ~ child }}" {% if content.form.children[child].vars.required %} required {% endif %}><option value=""></option>{% for label, value in field_choices(content.form.children[child]) %}<option value="{{ value }}">{{ label }}</option>{% endfor %}</select></div>{% elseif child == "submit" %}{% if content.prices|length > 0 %}<div class="mt-1em dflex fdc" id="prices_checkbox_container">{% for i, price in content.prices %}{% set true_price = price.price %}{% if true_price is null %}{% set true_price = 0 %}{% endif %}{% set id = true_price ~ "_" ~ i %}<div class="dflex mt-8px"><input type="checkbox" class="price_checkboxes" id="{{id}}" value="{{ true_price }}">{# NE PAS TOUCHER A LA LIGNE EN DESSOUS SOUS PEINE DE NE PLUS FAIRE FONCTIONNE LE CODE JS ASSOCIER A CE DERNIER #}<label for="{{ id }}" class="fw400 fs16 lh20">{{ price.label }} - {{ true_price|format_number(locale='fr') }}€</label></div>{% endfor %}</div>{% endif %}<div class="mt-1em dflex fdc">{{ form_label(newChild, {'attr': {'class': 'fw400 fs16 lh20'}, 'label_html': true}) }}{{ form_widget(newChild, {'attr': {'class': 'CTA nodeco diblock mt-1em lh28'}}) }}</div>{% elseif "checkbox" in child and "checkboxMultiple" not in child %}<div class="mt-1em checkbox dflex mb-8px">{{ form_widget(newChild, {'attr': {'class': 'mr-0p5em'}}) }}{{ form_label(newChild, '', {'label_attr': {'class': 'fw400 fs16 lh20'}, 'label_html': true}) }}</div>{% elseif "checkboxMultiple" in child or "radio" in child %}<div class="mt-1em{% if " checkboxmultiple" in child %} checkboxmultiple{% endif %}{% if " radio" in child %} radio{% endif %} mb-8px">{{form_label(newChild, '', {'label_attr': {'class': 'fw400 fs16 lh20 mb-1em dblock'}, 'label_html': true}) }}{% for subChild in newChild %}{% set margin = ' mb-8px' %}{% if "radio" in child %}{% set margin = '' %}{% endif %}<div class="mt-0p5em dflex{{ margin }}">{{ form_widget(subChild, {'attr': {'class': 'fw400 fs16 lh20 mr-0p5em' ~ margin}}) }}{{ form_label(subChild, '', {'label_attr': {'class': 'fw400 fs16 lh20' ~ margin}, 'label_html': true}) }}</div>{% endfor %}</div>{% elseif "please_fill_me" in child %}{%- block honeypot_row -%}<div class="dnone">{{ form_widget(newChild) }}</div>{%- endblock -%}{% elseif "dropdownMultiple" in child %}<div class="mt-1em dflex fdc checkboxMultiple">{{ form_label(newChild, '', {'label_attr': {'class': 'fw400 fs16 lh20 mb-8px'}, 'label_html': true}) }}<ul>{% for choice in newChild.vars.choices %}<li class="dflex jcsb aic"><div class="mt-0p5em dflex aic mb-8px"><input type="checkbox" id="{{ choice.value }}" value="{{ choice.value }}" name="{{ form_id ~ "[" ~ child ~ "]" }}[]" class="fw400 fs16 lh20 mr-0p5em mb-8px"><label for="{{ choice.value }}" class="fw400 fs16 lh20 mr-0p5em mb-8px">{{ choice.label|raw|trim }}</label></div></li>{% endfor %}</ul></div>{% else %}<div class="mt-1em dflex fdc">{{ form_label(newChild, '', {'label_attr': {'class': 'fw400 fs16 lh20 mb-8px'}, 'label_html': true}) }}{{ form_widget(newChild) }}</div>{% endif %}{% endif %}{% endfor %}{{ form_end(content.form, {render_rest: false}) }}</div><form id="paybox-form" action="{{ app.request.server.get('PBX_URL') }}" method="POST"><input type="hidden" name="PBX_SITE" value="{{ PBX_SITE }}"><input type="hidden" name="PBX_RANG" value="{{ PBX_RANG }}"><input type="hidden" name="PBX_IDENTIFIANT" value="{{ PBX_IDENTIFIANT }}"><input type="hidden" name="PBX_TOTAL" value="{{ PBX_TOTAL }}"><input type="hidden" name="PBX_DEVISE" value="{{ PBX_DEVISE }}"><input type="hidden" name="PBX_CMD" value="{{ PBX_CMD }}"><input type="hidden" name="PBX_PORTEUR" value="{{ PBX_PORTEUR }}"><input type="hidden" name="PBX_RETOUR" value="{{ PBX_RETOUR }}"><input type="hidden" name="PBX_EFFECTUE" value="{{ PBX_EFFECTUE }}"><input type="hidden" name="PBX_REFUSE" value="{{ PBX_REFUSE }}"><input type="hidden" name="PBX_ANNULE" value="{{ PBX_ANNULE }}"><input type="hidden" name="PBX_ATTENTE" value="{{ PBX_ATTENTE }}"><input type="hidden" name="PBX_HASH" value="{{ PBX_HASH }}"><input type="hidden" name="PBX_TIME" value="{{ PBX_TIME }}"><input type="hidden" name="PBX_REPONDRE_A" value="{{ PBX_REPONDRE_A }}"><input type="hidden" name="PBX_HMAC" value="{{ hash_hmac('sha512', msg, hmac)}}"></form>{% endif %}{% endif %}{% endif %}</div></div>{% endif %}{% if content.main_content is defined and content.main_content is not empty and content.main_content|length > 0 %}{% for data in content.main_content %}{% if data.type == "sub_content" %}{% include "articles-blocks/articles-content.html.twig" %}{% endif %}{% if data.type == "linked_with" %}{% include "articles-blocks/linked-with.html.twig" %}{% endif %}{% if data.type == "iframe" %}{% include "blocks/iframe.html.twig" with {block: data} %}{% endif %}{% if data.type == "see_more" %}{% include "articles-blocks/see-more.html.twig" %}{% endif %}{% endfor %}{% endif %}</article></section>{% endblock %}{% block javascripts %}{% include "articles/javascripts/base-article-js.html.twig" %}{{ encore_entry_script_tags('paybox') }}{{ parent() }}{% endblock %}