src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/cards/agb-detail-card.html.twig line 1

Open in your IDE?
  1. {% set conditions = demi_getTradeConditions(type, organisationInfo, cart, standardInformation is defined ? standardInformation : null) %}
  2. {% set modalId = 0 %}
  3. <div class="js-payment-details__conditions-loading" hidden>
  4.     <div class="text-center my-3">
  5.         {{ include('@ElementsDemiFrontend/Includes/elements/spinner/loading-spinner.html.twig') }}
  6.     </div>
  7. </div>
  8. <div class="js-payment-details__conditions-result">
  9.     <div>
  10.         {% for condition in conditions %}
  11.             {% if 'link' not in condition['type'] %}
  12.                 {{ include('@ElementsDemiFrontend/Includes/modals/modal.html.twig', {
  13.                     'type': condition['type'],
  14.                     'modalId': modalId,
  15.                     'text': condition['text'],
  16.                     'title': condition['title'],
  17.                     'item': null,
  18.                     'occupancyString':  null,
  19.                     'giftItem': null,
  20.                     'cancelInfoTexts': null,
  21.                     'showPdfLink': condition['type'] != "pp" and condition['type'] != constant("\\Elements\\Bundle\\DemiFrontendBundle\\Service\\Condition::TYPE_GROUP_REQUEST") and condition['type'] != constant("\\Elements\\Bundle\\DemiFrontendBundle\\Service\\Condition::TYPE_POOL_REQUEST"),
  22.                     'id': condition['id']
  23.                 }) }}
  24.                 <input type="hidden" name="{{ condition['type']}}-text" value="{{ (condition['text']|replace({'"':  '\''}))|escape }}" />
  25.             {% endif %}
  26.         {% endfor %}
  27.     </div>
  28.     {% set conditionCount = (conditions is iterable and conditions['privacyStatement'] is defined) ? 1 : 0 %}
  29.     {% if conditions is iterable and conditions|length > conditionCount %}
  30.         <div class="js-form-group">
  31.             <div class="custom-checkbox">
  32.                 <label>
  33.                     <input id="conditions" class="custom-checkbox__input" type="checkbox" name="conditions"
  34.                            required> <span class="custom-checkbox__box mr-2 demi-icon demi-icon-check"></span>
  35.                 </label>
  36.                 <div class="custom-checkbox__text">
  37.                     <label for="conditions" class="font-medium d-inline">{{ 'demi.booking.checkout.condition-check'|trans }}</label>
  38.                     <ul class="list-default mt-2">
  39.                         {% for key, condition in conditions %}
  40.                             {% if key != 'privacyStatement' and key != 'insuranceCondition' %}
  41.                                 <li>
  42.                                     {% if 'link' in condition['type'] %}
  43.                                         <a href="{{ condition['text'] }}" target="_blank" class="text-primary text-underline py-1">
  44.                                             {{ condition['translation'] }}
  45.                                         </a>
  46.                                         <input type="hidden" name="{{ condition['type'] }}-text" value="{{ (condition['translation']|escape)|replace({'"': '\''}) }}" />
  47.                                     {% else %}
  48.                                         <button type="button" class="btn-no-styling text-primary text-underline py-1" data-toggle="modal" data-target="#{{ condition['type'] }}-{{ modalId }}">
  49.                                             {{ condition['translation'] }}
  50.                                         </button>
  51.                                     {% endif %}
  52.                                 </li>
  53.                             {% endif %}
  54.                         {% endfor %}
  55.                     </ul>
  56.                 </div>
  57.             </div>
  58.             <div class="form-errors mt-1"></div>
  59.         </div>
  60.     {% endif %}
  61.     {% if conditions is iterable and conditions['privacyStatement'] is defined %}
  62.         <div class="form-group mb-0{{ conditions|length > 1 ? ' mt-3' : ''}}">
  63.             <div class="custom-checkbox">
  64.                 <div class="custom-checkbox__text">
  65.                     <label class="font-medium d-inline wysiwyg">
  66.                         {% set button = '<button type="button" class="font-default btn-no-styling text-primary text-underline" data-toggle="modal" data-target="#' ~ conditions['privacyStatement']['type'] ~ '-' ~ modalId ~ '">' ~ conditions['privacyStatement']['translation'] ~ '</button>' %}
  67.                         {{ demi_fillTranslation({"[PRIVACY_POLICY]": button}, "demi.booking.checkout.title-privacy-statement-text") }}
  68.                     </label>
  69.                 </div>
  70.             </div>
  71.             <div class="form-errors mt-1"></div>
  72.         </div>
  73.     {% endif %}
  74.     {% if conditions is iterable and conditions['insuranceCondition'] is defined %}
  75.         <div class="form-group mb-0{{ conditions|length > 1 ? ' mt-3' : ''}}">
  76.             <div class="custom-checkbox">
  77.                 <label>
  78.                     <input id="{{ conditions['insuranceCondition']['type'] }}"
  79.                            class="custom-checkbox__input" type="checkbox" name="{{ conditions['insuranceCondition']['type'] }}"
  80.                            data-parsley-required-message="{{ 'demi.booking.checkout.insurance-conditions-error'|trans }}"
  81.                            required> <span class="custom-checkbox__box mr-2 demi-icon demi-icon-check"></span>
  82.                 </label>
  83.                 <div class="custom-checkbox__text">
  84.                     <label for="{{ conditions['insuranceCondition']['type'] }}" class="font-medium d-inline wysiwyg">
  85.                         {% set href = '<a href="' ~ conditions['insuranceCondition']['text'] ~ '" target="_blank" class="text-primary font-default text-underline">' ~ conditions['insuranceCondition']['translation'] ~ '</a>' %}
  86.                         {{ demi_fillTranslation({"[INSURANCE_CONDITIONS]": href}, "demi.booking.checkout.insurance-conditions-text") }}
  87.                     </label>
  88.                     <input type="hidden" name="{{ conditions['insuranceCondition']['type'] }}-text" value="{{ (demi_fillTranslation({"[INSURANCE_CONDITIONS]": href}, "demi.booking.checkout.insurance-conditions-text")|escape)|replace({'"': '\''}) }}" />
  89.                 </div>
  90.             </div>
  91.             <div class="form-errors mt-1"></div>
  92.         </div>
  93.     {% endif %}
  94. </div>