src/Elements/Bundle/DemiFrontendBundle/Resources/views/Includes/cards/personal-data-form-card.html.twig line 1

Open in your IDE?
  1. {% set accountInfoId = 'create-account' ~ random()  %}
  2. {% set accountInfoType = 'account-info' %}
  3. {% set isBrochure = isBrochure is defined ? isBrochure : false %}
  4. {% set loginAndUserHandling = (showLogin and demi_core_configuration("getUserHandling",[])) %}
  5. <fieldset class="card box-shadow {{ styleModifier is defined ? styleModifier : '' }}">
  6.     <div class="card-body">
  7.         {% if loginAndUserHandling and not isUser %}
  8.             <h3 class="{{ headlineStyle is defined ? headlineStyle : '' }}">{{ 'demi.booking.checkout.provide-data-suggest-account-headline'|trans }}</h3>
  9.             <div class="row row--gutter-width-20">
  10.                 <div class="col-12 col-md-6">
  11.                     {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/mail.html.twig', {'customer': customer, 'isUser': isUser}) }}
  12.                 </div>
  13.                 <div class="col-12 col-md-6">
  14.                     <div class="row">
  15.                         <div class="col mb-2">
  16.                             {{ include('@ElementsDemiFrontend/Includes/elements/checkboxes/checkbox.html.twig', {
  17.                                 'name': 'createAccount',
  18.                                 'label': 'demi.booking.create-account'|trans,
  19.                                 'isChecked': optionalData is not null ? optionalData.createAccount : false,
  20.                                 'value': "on",
  21.                                 'styleModifier': 'strong js-checkbox-collapse-toggle',
  22.                                 'dataAttributes': {
  23.                                     "target": "#personal-data-account-collapse"
  24.                                 }
  25.                             }) }}
  26.                             <script data-cookieconsent="ignore">_config.checkboxCollapseToggle = true;</script>
  27.                             <div class="mt-2">
  28.                                 {{ 'demi.booking.checkout.account-advantages'|trans }}
  29.                                 <div class="text-right mt-3">
  30.                                     {% if isMobile %}
  31.                                         <button type="button"
  32.                                                 class="btn-no-styling increased-click-area text-primary js-overlay__toggle"
  33.                                                 data-target="#{{ accountInfoType }}-{{ accountInfoId }}">
  34.                                             <span class="demi-icon demi-icon-info-circle icon-in-text"></span> <span
  35.                                                     class="text-underline">{{ 'demi.booking.cart.additional-information'|trans }}</span>
  36.                                         </button>
  37.                                         {{ include('@ElementsDemiFrontend/Includes/overlays/ajax-overlay.html.twig',  {
  38.                                             'title': 'demi.booking.account-information'|trans,
  39.                                             'id': accountInfoType ~ "-" ~ accountInfoId,
  40.                                             'ajaxUrl': demi_core_configuration("getAccountInformationSnippet",[]),
  41.                                         }) }}
  42.                                     {% else %}
  43.                                         <button type="button"
  44.                                                 class="btn-no-styling increased-click-area text-primary"
  45.                                                 data-toggle="modal"
  46.                                                 data-target="#{{ accountInfoType }}-{{ accountInfoId }}">
  47.                                             <span class="demi-icon demi-icon-info-circle icon-in-text"></span> <span
  48.                                                     class="text-underline">{{ 'demi.booking.cart.additional-information'|trans }}</span>
  49.                                         </button>
  50.                                         {{ include('@ElementsDemiFrontend/Includes/modals/ajax-modal.html.twig', {
  51.                                             'ajaxUrl': demi_core_configuration("getAccountInformationSnippet",[]),
  52.                                             'ariaLabel': 'account-info',
  53.                                             'id': accountInfoType ~ '-' ~ accountInfoId
  54.                                         }) }}
  55.                                     {% endif %}
  56.                                 </div>
  57.                             </div>
  58.                         </div>
  59.                     </div>
  60.                 </div>
  61.             </div>
  62.             <div id="personal-data-account-collapse" class="collapse shows overflow-hidden">
  63.                 <div class="row row--gutter-width-20 mb-4">
  64.                     <div class="col-12 col-md-6">
  65.                         {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/password.html.twig', {'id': 'personal-data-password-input'}) }}
  66.                         {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/password.html.twig', {
  67.                             'id': 'personal-data-password-input-repeat',
  68.                             'equalToId': 'personal-data-password-input',
  69.                             'isRepeat': true
  70.                         }) }}
  71.                     </div>
  72.                     <div class="col-12 col-md-6">
  73.                         {% if demi_profilingConsentExists() %}
  74.                             <div class="mt-2 js-form-group">
  75.                                 {{ include('@ElementsDemiFrontend/Includes/elements/checkboxes/checkbox.html.twig', {
  76.                                     'name': 'profilingConsent',
  77.                                     'label': 'demi.booking.checkout.profiling-consent-label'|trans,
  78.                                     'isChecked': optionalData is not null ?  optionalData.profilingConsent : false,
  79.                                     'isRequired': true,
  80.                                     'value': "on",
  81.                                     'styleModifier': 'strong',
  82.                                 }) }}
  83.                                 <div class="form-errors"></div>
  84.                                 <div class="mt-2">
  85.                                     {{ 'demi.booking.checkout.profiling-consent-text'|trans }}
  86.                                     <input type="hidden" name="profilingConsentText" value="{{ ('demi.booking.checkout.profiling-consent-text'|trans)|replace({'"': '\''}) }}" />
  87.                                 </div>
  88.                             </div>
  89.                         {% endif %}
  90.                     </div>
  91.                 </div>
  92.             </div>
  93.         {% else %}
  94.             <h3 class="{{ headlineStyle is defined ? headlineStyle : '' }}">{{ isUser ? 'demi.booking.checkout.edit-data'|trans : 'demi.booking.checkout.provide-data'|trans }}</h3>
  95.             {% if demi_core_configuration("getUserHandling",[]) and isUser %}
  96.             <div class="row row--gutter-width-20 mb-3">
  97.                 <div class="col-12 col-md-6">
  98.                     {{ include('@ElementsDemiFrontend/Includes/elements/checkboxes/checkbox.html.twig', {
  99.                     'name': 'mergeToAccount' ,
  100.                     'label': 'demi.booking.checkout.changes-affect-customer-account'|trans,
  101.                     'isChecked': optionalData.mergeToAccount ,
  102.                     'value': "on",
  103.                     'styleModifier': 'strong js-checkbox-collapse-toggle'
  104.                 }) }}
  105.                 </div>
  106.             </div>
  107.             {% endif %}
  108.         {% endif %}
  109.         <div class="row row--gutter-width-20">
  110.             <div class="col-8 col-lg-4">
  111.                 {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/salutation.html.twig', {'customer': customer}) }}
  112.             </div>
  113.         </div>
  114.         <div class="row row--gutter-width-20">
  115.             <div class="col-12 col-md-6">
  116.                 {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/firstname.html.twig', {'customer': customer}) }}
  117.             </div>
  118.             <div class="col-12 col-md-6">
  119.                 {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/lastname.html.twig', {'customer': customer}) }}
  120.             </div>
  121.             {% if showAddress %}
  122.                 <div class="col-12 col-md-6">
  123.                     {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/street-and-nr.html.twig', {
  124.                         'optionalData': optionalData,
  125.                         'customer': customer,
  126.                         'isRequired': addressRequired}) }}
  127.                 </div>
  128.                 <div class="col-12 col-md-6">
  129.                     <div class="row row--gutter-width-10">
  130.                         <div class="col-4">
  131.                             {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/plz.html.twig', {
  132.                                 'class': 'js-zip-validation',
  133.                                 'optionalData': optionalData,
  134.                                 'customer': customer,
  135.                                 'isRequired': addressRequired,
  136.                                 'zipValidation': true}) }}
  137.                         </div>
  138.                         <div class="col-8">
  139.                             {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/city.html.twig', {
  140.                                 'optionalData': optionalData,
  141.                                 'customer': customer,
  142.                                 'isRequired': addressRequired}) }}
  143.                         </div>
  144.                     </div>
  145.                 </div>
  146.             {% endif %}
  147.             <div class="col-12 col-md-6">
  148.                 {% if isMerchandise %}
  149.                     {% set class = 'js-zip-validation js-shipping-cost' %}
  150.                     <script data-cookieconsent="ignore">
  151.                         _config.merchShipping = true;
  152.                         _config.merchShippingAjaxUrl = '{{ demi_demiUrl([], 'demi_merchandieseshop_update_shipping', true) }}';
  153.                     </script>
  154.                 {% else %}
  155.                     {% set class = 'js-zip-validation' %}
  156.                 {% endif %}
  157.                 {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/country.html.twig', {'customer': customer, 'class': class is defined ? class : ''}) }}
  158.             </div>
  159.             {% if not loginAndUserHandling or isUser %}
  160.             <div class="col-12 col-md-6">
  161.                 {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/mail.html.twig', {'customer': customer, 'isUser': isUser}) }}
  162.             </div>
  163.             {% endif %}
  164.             {% if (showPhone is defined and showPhone == true) or demi_core_configuration("getShowPhoneNumber",[]) == "required" or demi_core_configuration("getShowPhoneNumber",[]) == "optionalInRequiredSection" %}
  165.                 <div class="col-12 col-md-6">
  166.                     {{ include('@ElementsDemiFrontend/Includes/cards/phonenumber.html.twig', {'required': demi_core_configuration("getShowPhoneNumber",[]) == "required" ? "required" : ""}) }}
  167.                 </div>
  168.             {% endif %}
  169.             {% if showCompany is defined and showCompany == true%}
  170.                 <div class="col-12 col-md-6">
  171.                     <div class="form-group">
  172.                         <label class="form-box form-box--gray">
  173.                             <span class="form-box__label">{{ 'demi.saving-request.company'|trans }}</span>
  174.                             <input type="text" name="company" class="form-box__content form-control"
  175.                                    autocomplete="org">
  176.                         </label>
  177.                         <div class="form-errors"></div>
  178.                     </div>
  179.                 </div>
  180.             {% endif %}
  181.             {% if showNumberOfOffers is defined and showNumberOfOffers == true%}
  182.                 <div class="col-12 col-md-6">
  183.                     <div class="form-group">
  184.                         <label class="form-box form-box--gray">
  185.                             <span class="form-box__label">{{ 'demi.saving-request.number-of-offers'|trans }} *</span>
  186.                             <input name="maxTickets" type="number" min="1" value="10" max="{{ demi_core_configuration("getPoolRequestMaxTickets",[]) ? demi_core_configuration("getPoolRequestMaxTickets",[]) : 20 }}" class="form-box__content form-control" required>
  187.                         </label>
  188.                     </div>
  189.                 </div>
  190.             {% endif %}
  191.             {% if showContactType is defined and showContactType == true%}
  192.                 <div class="col-12 col-md-6">
  193.                     <div class="form-group">
  194.                         <label class="form-box form-box--gray">
  195.                             <span class="form-box__label">{{ 'demi.saving-request.contact-type-label'|trans }} *</span>
  196.                             <select name="contactType" class="form-box__content form-control" required>
  197.                                 <option value="EMail">{{ 'demi.saving-request.email'|trans }}</option>
  198.                                 <option value="Phone">{{ 'demi.saving-request.telephone'|trans }}</option>
  199.                             </select>
  200.                             <span class="demi-icon demi-icon-chevron-down form-box__select-icon"></span>
  201.                         </label>
  202.                     </div>
  203.                 </div>
  204.             {% endif %}
  205.         </div>
  206.         <div class="row row--gutter-width-10">
  207.             <div class="col col-auto text-success icon-in-text">
  208.                 <span class="demi-icon demi-icon-info-circle-outline" aria-label="{{ 'demi.booking.info'|trans }}" title="{{ 'demi.booking.info'|trans }}"></span>
  209.             </div>
  210.             <div class="col">
  211.                 {{ 'demi.booking.checkout.fill-all-in'|trans }}
  212.             </div>
  213.         </div>
  214.     </div>
  215.     {% if not isBrochure and showAllowRating %}
  216.         <hr class="m-0">
  217.         {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/acco-rating.html.twig', {'optionalData': optionalData}) }}
  218.     {% endif %}
  219.     {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/form-additions1.html.twig') }}
  220.     {% if showComment is defined and showComment == true %}
  221.         <hr class="m-0">
  222.         {{ include('@ElementsDemiFrontend/Includes/cards/form-groups/wish.html.twig', {'optionalData': optionalData}) }}
  223.     {% endif %}
  224. </fieldset>