custom/plugins/Wingsacademy/src/Resources/views/storefront/component/address/address-form.html.twig line 1

Open in your IDE?
  1. {% sw_extends '@Storefront/storefront/component/address/address-form.html.twig' %}
  2. {% block component_address_form %}
  3.     {% block component_address_form_addressId %}
  4.         {% if data.get('id') %}
  5.             <input type="hidden"
  6.                    name="{{ prefix }}[id]"
  7.                    value="{{ data.get('id') }}">
  8.         {% endif %}
  9.     {% endblock %}
  10.     {# @deprecated tag:v6.5.0 - will be removed #}
  11.     {% if not feature('FEATURE_NEXT_15957') %}
  12.         {% set showVatIdField = false %}
  13.     {% endif %}
  14.     {% block component_address_form_company %}
  15.         {% if showFormCompany %}
  16.             {% if config('core.loginRegistration.showAccountTypeSelection') %}
  17.                 {% set accountTypeRequired = true %}
  18.             {% endif %}
  19.             {% if config('core.loginRegistration.showAccountTypeSelection') or prefix == "address" or prefix == "shippingAddress" or hasSelectedBusiness %}
  20.                 <div class="{% if prefix == "shippingAddress" or hasSelectedBusiness %}address-contact-type-company{% elseif prefix == "address" %}js-field-toggle-contact-type-company d-block{% else %}js-field-toggle-contact-type-company d-none{% endif %}">
  21.                     {% block component_address_form_company_fields %}
  22.                         <div class="{{ formRowClass }}">
  23.                             {% block component_address_form_company_name %}
  24.                                 <div class="form-group col-6">
  25.                                     {% if formViolations.getViolations("/company") is not empty %}
  26.                                         {% set violationPath = "/company" %}
  27.                                     {% elseif formViolations.getViolations("/#{prefix}/company") is not empty %}
  28.                                         {% set violationPath = "/#{prefix}/company" %}
  29.                                     {% endif %}
  30.                                     {% block component_address_form_company_name_label %}
  31.                                         <label class="form-label"
  32.                                                for="{{ idPrefix ~ prefix }}company">
  33.                                             {{ "address.companyNameLabel"|trans|sw_sanitize }}{% if prefix != "shippingAddress" and accountTypeRequired %}{{ "general.required"|trans|sw_sanitize }}{% endif %}
  34.                                         </label>
  35.                                     {% endblock %}
  36.                                     {% block component_address_form_company_name_input %}
  37.                                         <input type="text"
  38.                                                 class="form-control{% if violationPath %} is-invalid{% endif %} foobar"
  39.                                                 id="{{ idPrefix ~ prefix }}company"
  40.                                                 placeholder="{{ "address.companyNamePlaceholder"|trans|striptags }}"
  41.                                                 name="{{ prefix }}[company]"
  42.                                                 value="{{ data.get('company') }}"
  43.                                                required="required" 
  44.                                                oninvalid="this.setCustomValidity('Bitte füllen Sie dieses Feld aus.')" oninput="this.setCustomValidity('')">
  45.                                     {% endblock %}
  46.                                     {% block component_address_form_company_name_input_error %}
  47.                                         {% if violationPath %}
  48.                                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  49.                                         {% endif %}
  50.                                     {% endblock %}
  51.                                 </div>
  52.                             {% endblock %}
  53.                             {% block component_address_form_company_department %}
  54.                                 <div class="form-group col-md-6">
  55.                                     {% if formViolations.getViolations("/department") is not empty %}
  56.                                         {% set violationPath = "/department" %}
  57.                                     {% elseif formViolations.getViolations("/#{prefix}/department") is not empty %}
  58.                                         {% set violationPath = "/#{prefix}/department" %}
  59.                                     {% endif %}
  60.                                     {% block component_address_form_company_department_label %}
  61.                                         <label class="form-label"
  62.                                                for="{{ idPrefix ~ prefix }}department">
  63.                                             {{ "address.companyDepartmentLabel"|trans|sw_sanitize }}
  64.                                         </label>
  65.                                     {% endblock %}
  66.                                     {% block component_address_form_company_department_input %}
  67.                                         <input type="text"
  68.                                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  69.                                                id="{{ idPrefix ~ prefix }}department"
  70.                                                placeholder="{{ "address.companyDepartmentPlaceholder"|trans|striptags }}"
  71.                                                name="{{ prefix }}[department]"
  72.                                                value="{{ data.get('department') }}">
  73.                                     {% endblock %}
  74.                                     {% block component_address_form_company_department_input_error %}
  75.                                         {% if violationPath %}
  76.                                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  77.                                         {% endif %}
  78.                                     {% endblock %}
  79.                                 </div>
  80.                             {% endblock %}
  81.                             {% block component_address_form_company_vatId %}
  82.                                 {% if not feature('FEATURE_NEXT_15957') and showVatIdField %}
  83.                                     <div class="form-group col-md-6">
  84.                                         {% if formViolations.getViolations("/vatId") is not empty %}
  85.                                             {% set violationPath = "/vatId" %}
  86.                                         {% elseif formViolations.getViolations("/#{prefix}/vatId") is not empty %}
  87.                                             {% set violationPath = "/#{prefix}/vatId" %}
  88.                                         {% endif %}
  89.                                         {# @deprecated tag:v6.5.0 - will be removed, look into `@Storefront/storefront/component/address/address-personal-vat-id.html.twig` instead #}
  90.                                         {% block component_address_form_company_vatId_label %}
  91.                                             <label class="form-label"
  92.                                                    for="{{ idPrefix ~ prefix }}vatId">
  93.                                                 {{ "address.companyVatLabel"|trans|sw_sanitize }}
  94.                                             </label>
  95.                                         {% endblock %}
  96.                                         
  97.                                         {# @deprecated tag:v6.5.0 - will be removed, look into `@Storefront/storefront/component/address/address-personal-vat-id.html.twig` instead #}
  98.                                         {% block component_address_form_company_vatId_input %}
  99.                                             <input type="text"
  100.                                                    class="form-control{% if violationPath %} is-invalid{% endif %}"
  101.                                                    id="{{ idPrefix ~ prefix }}vatId"
  102.                                                    placeholder="{{ "address.companyVatPlaceholder"|trans|striptags }}"
  103.                                                    name="{{ prefix }}[vatId]"
  104.                                                    value="{{ data.get('vatId') }}">
  105.                                         {% endblock %}
  106.                                         {# @deprecated tag:v6.5.0 - will be removed, look into `@Storefront/storefront/component/address/address-personal-vat-id.html.twig` instead #}
  107.                                         {% block component_address_form_company_vatId_input_error %}
  108.                                             {% if violationPath %}
  109.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  110.                                             {% endif %}
  111.                                         {% endblock %}
  112.                                     </div>
  113.                                 {% elseif feature('FEATURE_NEXT_15957') and prefix == 'address' and showVatIdField %}
  114.                                     <div class="form-group col-md-6">
  115.                                         {% sw_include '@Storefront/storefront/component/address/address-personal-vat-id.html.twig' with {
  116.                                             'vatIds': context.customer.vatIds
  117.                                         } %}
  118.                                     </div>
  119.                                 {% endif %}
  120.                             {% endblock %}
  121.                         </div>
  122.                     {% endblock %}
  123.                 </div>
  124.             {% endif %}
  125.         {% endif %}
  126.     {% endblock %}
  127.     {% block component_address_form_address_fields %}
  128.         <div class="{{ formRowClass }}">
  129.             {% block component_address_form_street %}
  130.            
  131.                 <div class="form-group col-md-6">
  132.                     {% if formViolations.getViolations("/street") is not empty %}
  133.                         {% set violationPath = "/street" %}
  134.                     {% elseif formViolations.getViolations("/#{prefix}/street") is not empty %}
  135.                         {% set violationPath = "/#{prefix}/street" %}
  136.                     {% else %}
  137.                         {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.streetLabel"|trans|sw_sanitize }) %}
  138.                     {% endif %}
  139.                     {% block component_address_form_street_label %}
  140.                         <label class="form-label"
  141.                                for="{{ idPrefix ~ prefix }}AddressStreet">
  142.                             {{ "address.streetLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  143.                         </label>
  144.                     {% endblock %}
  145.                     {% block component_address_form_street_input %}
  146.                         <input type="text"
  147.                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  148.                                id="{{ idPrefix ~ prefix }}AddressStreet"
  149.                                placeholder="{{ "address.streetPlaceholder"|trans|striptags }}"
  150.                                 {% if isCustomInput %}
  151.                                     name="{{ prefix }}[customFields][custom_adress_street]"
  152.                                     value="{{ data.get('customFields')['custom_adress_street'] }}"
  153.                                     data-form-custom-field-exists="true"
  154.                                 {% else %}
  155.                                     name="{{ prefix }}[street]" 
  156.                                     value="{{ data.get('street') }}"
  157.                                 {% endif %}
  158.                                data-form-validation-required
  159.                                {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}
  160.                                required="required" oninvalid="this.setCustomValidity('Bitte füllen Sie dieses Feld aus.')" oninput="this.setCustomValidity('')">
  161.                     {% endblock %}
  162.                     {% block component_address_form_street_input_error %}
  163.                         {% if violationPath %}
  164.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  165.                         {% endif %}
  166.                     {% endblock %}
  167.                 </div>
  168.             {% endblock %}
  169.             {% block component_address_form_additional_field1 %}
  170.                 {% if config('core.loginRegistration.showAdditionalAddressField1') %}
  171.                     {% if formViolations.getViolations("/additionalAddressLine1") is not empty %}
  172.                         {% set violationPath = "/additionalAddressLine1" %}
  173.                     {% elseif formViolations.getViolations("/#{prefix}/additionalAddressLine1") is not empty %}
  174.                         {% set violationPath = "/#{prefix}/additionalAddressLine1" %}
  175.                     {% endif %}
  176.                     <div class="form-group col-md-6">
  177.                         {% block component_address_form_additional_field1_label %}
  178.                             <label class="form-label"
  179.                                    for="{{ idPrefix ~ prefix }}AdditionalField1">
  180.                                 {{ "address.additionalField1Label"|trans|sw_sanitize }}{{ config('core.loginRegistration.additionalAddressField1Required') ? "general.required"|trans|sw_sanitize }}
  181.                             </label>
  182.                         {% endblock %}
  183.                         {% block component_address_form_additional_field1_input %}
  184.                             <input type="text"
  185.                                    class="form-control {% if violationPath %} is-invalid{% endif %}"
  186.                                    id="{{ idPrefix ~ prefix }}AdditionalField1"
  187.                                    placeholder="{{ "address.additionalField1Placeholder"|trans|striptags }}"
  188.                                    {% if isCustomInput %}
  189.                                         name="{{ prefix }}[customFields][custom_adress_additionalAddressLine1]"
  190.                                         value="{{ data.get('customFields')['custom_adress_additionalAddressLine1'] }}"
  191.                                         data-form-custom-field-exists="true"
  192.                                     {% else %}
  193.                                         name="{{ prefix }}[additionalAddressLine1]"
  194.                                         value="{{ data.get('additionalAddressLine1') }}"
  195.                                     {% endif %}
  196.                                     {{ config('core.loginRegistration.additionalAddressField1Required') ? 'required="true"' }}>
  197.                         {% endblock %}
  198.                         {% block component_address_form_additional_field1_error %}
  199.                             {% if violationPath %}
  200.                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  201.                             {% endif %}
  202.                         {% endblock %}
  203.                     </div>
  204.                 {% endif %}
  205.             {% endblock %}
  206.             {% block component_address_form_zipcode_city %}
  207.                 {% set zipcodeField %}
  208.                 {% set zipcodeValue = formViolations.getInputData()['zipcode'] ?? data.get('zipcode') %}
  209.                     {% if formViolations.getViolations("/zipcode") is not empty %}
  210.                         {% set violationPath = "/zipcode" %}
  211.                     {% elseif formViolations.getViolations("/#{prefix}/zipcode") is not empty %}
  212.                         {% set violationPath = "/#{prefix}/zipcode" %}
  213.                     {% else %}
  214.                         {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.zipcodeLabel"|trans|sw_sanitize }) %}
  215.                     {% endif %}
  216.                     {% block component_address_form_zipcode_label %}
  217.                         <label class="form-label"
  218.                                for="{{ idPrefix ~ prefix }}AddressZipcode">
  219.                             {{ "address.zipcodeLabel"|trans|sw_sanitize }}<span {% if feature('v6.5.0.0') %}class="d-none"{% endif %} id="zipcodeLabel">{{ "general.required"|trans|sw_sanitize }}</span>
  220.                         </label>
  221.                     {% endblock %}
  222.                     {% block component_address_form_zipcode_input %}
  223.                         <input type="text"
  224.                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  225.                                id="{{ idPrefix ~ prefix }}AddressZipcode"
  226.                                placeholder="{{ "address.zipcodePlaceholder"|trans|striptags }}"
  227.                                 {% if isCustomInput %}
  228.                                     name="{{ prefix }}[customFields][custom_adress_plz]"
  229.                                     value="{{ data.get('customFields')['custom_adress_plz'] }}"
  230.                                     data-form-custom-field-exists="true"
  231.                                 {% else %}
  232.                                     name="{{ prefix }}[zipcode]"
  233.                                     value="{{ zipcodeValue }}"
  234.                                 {% endif %}
  235.                                data-input-name="zipcodeInput"
  236.                                {% if not feature('v6.5.0.0') %}required="required" oninvalid="this.setCustomValidity('Bitte füllen Sie dieses Feld aus.')" oninput="this.setCustomValidity('')"{% endif %}
  237.                         >
  238.                     {% endblock %}
  239.                     {% block component_address_form_zipcode_error %}
  240.                         {% if violationPath %}
  241.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  242.                         {% endif %}
  243.                     {% endblock %}
  244.                 {% endset %}
  245.                 {% set cityField %}
  246.                     {% if formViolations.getViolations("/city") is not empty %}
  247.                         {% set violationPath = "/city" %}
  248.                     {% elseif formViolations.getViolations("/#{prefix}/city") is not empty %}
  249.                         {% set violationPath = "/#{prefix}/city" %}
  250.                     {% else %}
  251.                         {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.cityLabel"|trans|sw_sanitize }) %}
  252.                         {% set violationPath = null %}
  253.                     {% endif %}
  254.                     {% block component_address_form_city_label %}
  255.                         <label class="form-label"
  256.                                for="{{ idPrefix ~ prefix }}AddressCity">
  257.                             {{ "address.cityLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  258.                         </label>
  259.                     {% endblock %}
  260.                     {% block component_address_form_city_input %}
  261.                         <input type="text"
  262.                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  263.                                id="{{ idPrefix ~ prefix }}AddressCity"
  264.                                placeholder="{{ "address.cityPlaceholder"|trans|striptags }}"
  265.                                {% if isCustomInput %}
  266.                                     name="{{ prefix }}[customFields][custom_adress_city]"
  267.                                     value="{{ data.get('customFields')['custom_adress_city'] }}"
  268.                                     data-form-custom-field-exists="true"
  269.                                 {% else %}
  270.                                     name="{{ prefix }}[city]"
  271.                                     value="{{ data.get('city') }}"
  272.                                 {% endif %}
  273.                                data-form-validation-required
  274.                                {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}
  275.                                required="required"
  276.                                oninvalid="this.setCustomValidity('Bitte füllen Sie dieses Feld aus.')" oninput="this.setCustomValidity('')"
  277.                                >
  278.                                
  279.                     {% endblock %}
  280.                     {% block component_address_form_city_error %}
  281.                         {% if violationPath %}
  282.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  283.                         {% endif %}
  284.                     {% endblock %}
  285.                 {% endset %}
  286.                 {% if config('core.address.showZipcodeInFrontOfCity') %}
  287.                     <div class="form-group col-md-2 col-4">
  288.                         {{ zipcodeField }}
  289.                     </div>
  290.                     <div class="form-group col-md-4 col-8">
  291.                         {{ cityField }}
  292.                     </div>
  293.                 {% else %}
  294.                     <div class="form-group col-md-4 col-8">
  295.                         {{ cityField }}
  296.                     </div>
  297.                     <div class="form-group col-md-2 col-4">
  298.                         {{ zipcodeField }}
  299.                     </div>
  300.                 {% endif %}
  301.             {% endblock %}
  302.             {% block component_address_form_country %}
  303.                 <div class="form-group col-md-6">
  304.                     {% set initialCountryId = null %}
  305.                     {% if data.get('countryId') %}
  306.                         {% set initialCountryId = data.get('countryId') %}
  307.                     {% elseif page.countries|length == 1 %}
  308.                         {% set initialCountryId = (page.countries|first).id %}
  309.                     {% endif %}
  310.                     {% if isCustomInput %}
  311.                         {% set initialCountryId = data.get('customFields')['custom_adress_countryId']  %}
  312.                     {% endif %}
  313.                     {% if formViolations.getViolations("/countryId") is not empty %}
  314.                         {% set violationPath = "/countryId" %}
  315.                     {% elseif formViolations.getViolations("/#{prefix}/countryId") is not empty %}
  316.                         {% set violationPath = "/#{prefix}/countryId" %}
  317.                     {% endif %}
  318.                     {% block component_address_form_country_label %}
  319.                         <label class="form-label"
  320.                                 for="{{ idPrefix ~ prefix }}AddressCountry">
  321.                             {{ "address.countryLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  322.                         </label>
  323.                     {% endblock %}
  324.                     {% block component_address_form_country_select %}
  325.                         {% set countrySelectionJsClass =  isCustomInput ? 'js-custom-country-select' : 'js-country-select' %}
  326.                         <select class="{{ countrySelectionJsClass }} country-select {{ formSelectClass }}{% if violationPath %} is-invalid{% endif %}"
  327.                                 id="{{ idPrefix ~ prefix }}AddressCountry"
  328.                                 {# name="{{ prefix }}[countryId]" #}
  329.                                 {% if isCustomInput %}
  330.                                     name="{{ prefix }}[customFields][custom_adress_countryId]"
  331.                                     data-form-custom-field-exists="true"
  332.                                 {% else %}
  333.                                     name="{{ prefix }}[countryId]"
  334.                                 {% endif %}
  335.                                 required="required"
  336.                                 oninvalid="this.setCustomValidity('Bitte wählen Sie einen Eintrag in der Liste.')" oninput="this.setCustomValidity('')"
  337.                                 data-initial-country-id="{{ initialCountryId }}">
  338.                             {% if not initialCountryId %}
  339.                                 <option disabled="disabled"
  340.                                         value=""
  341.                                         selected="selected">
  342.                                     {{ "address.countryPlaceholder"|trans|sw_sanitize }}
  343.                                 </option>
  344.                             {% endif %}
  345.                             {% for country in page.countries %}
  346.                                 <option {% if country.id == initialCountryId %}
  347.                                         selected="selected"
  348.                                         {% endif %}
  349.                                         {% if isCustomInput %}
  350.                                             value="{{ country.id }}"
  351.                                             data-vat-id-required="{{ country.vatIdRequired }}"
  352.                                             data-custom-vat-id-required="{{ country.vatIdRequired }}"
  353.                                         {% else %}
  354.                                             value="{{ country.id }}"
  355.                                             data-vat-id-required="{{ country.vatIdRequired }}"
  356.                                             data-custom-vat-id-required="0"
  357.                                         {% endif %}
  358.                                         {# data-vat-id-required="{{ country.vatIdRequired }}" #}
  359.                                         data-state-required="false"
  360.                                         {# data-state-required="{{ country.forceStateInRegistration }}" #}>
  361.                                         {% if feature('FEATURE_NEXT_15707') and  not country.shippingAvailable and disableNonShippableCountries %}
  362.                                             disabled="disabled"
  363.                                         {% endif %}
  364.                                     {{ country.translated.name }}{% if feature('FEATURE_NEXT_15707') and showNoShippingPostfix and not country.shippingAvailable %} {{ "address.countryPostfixNoShipping"|trans|sw_sanitize }}{% endif %}
  365.                                 </option>
  366.                             {% endfor %}
  367.                         </select>
  368.                     {% endblock %}
  369.                 </div>
  370.                 <div class="form-group col-md-6  d-none country-state-select-container">
  371.                     {% if formViolations.getViolations("/countryStateId") is not empty %}
  372.                         {% set violationPath = "/countryStateId" %}
  373.                     {% elseif formViolations.getViolations("/#{prefix}/countryStateId") is not empty %}
  374.                         {% set violationPath = "/#{prefix}/countryStateId" %}
  375.                     {% endif %}
  376.                     {% block component_address_form_country_state_label %}
  377.                         <label class="form-label"
  378.                                 for="{{ idPrefix ~ prefix }}AddressCountryState">
  379.                             {{ "address.countryStateLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  380.                         </label>
  381.                     {% endblock %}
  382.                     {% block component_address_form_country_state_select %}
  383.                         <select class="country-state-select {{ formSelectClass }}{% if violationPath %} is-invalid{% endif %} js-country-state-select"
  384.                                 id="{{ idPrefix ~ prefix }}AddressCountryState"
  385.                                 name="{{ prefix }}[countryStateId]"
  386.                                 data-initial-country-state-id="{{ data.get('countryStateId') }}">
  387.                             <option value=""
  388.                                     selected="selected"
  389.                                     data-placeholder-option="true">
  390.                                 {{ "address.countryStatePlaceholder"|trans|sw_sanitize }}
  391.                             </option>
  392.                         </select>
  393.                     {% endblock %}
  394.                     {% block component_address_form_country_error %}
  395.                         {% if violationPath %}
  396.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  397.                         {% endif %}
  398.                     {% endblock %}
  399.                 </div>
  400.             {% endblock %}
  401.             {% block component_address_form_additional_field2 %}
  402.                 {% if config('core.loginRegistration.showAdditionalAddressField2') %}
  403.                     {% if formViolations.getViolations("/additionalAddressLine2") is not empty %}
  404.                         {% set violationPath = "/additionalAddressLine2" %}
  405.                     {% elseif formViolations.getViolations("/#{prefix}/additionalAddressLine2") is not empty %}
  406.                         {% set violationPath = "/#{prefix}/additionalAddressLine2" %}
  407.                     {% endif %}
  408.                     <div class="form-group col-md-6">
  409.                         {% block component_address_form_additional_field2_label %}
  410.                             <label class="form-label"
  411.                                    for="{{ idPrefix ~ prefix }}AdditionalField2">
  412.                                 {{ "address.additionalField2Label"|trans|sw_sanitize }}{{ config('core.loginRegistration.additionalAddressField2Required') ? "general.required"|trans|sw_sanitize }}
  413.                             </label>
  414.                         {% endblock %}
  415.                         {% block component_address_form_additional_field2_input %}
  416.                             <input type="text"
  417.                                    class="form-control {% if violationPath %} is-invalid{% endif %}"
  418.                                    id="{{ idPrefix ~ prefix }}AdditionalField2"
  419.                                    placeholder="{{ "address.additionalField2Placeholder"|trans|striptags }}"
  420.                                    {% if isCustomInput %}
  421.                                         name="{{ prefix }}[custom_additionalAddressLine2]"
  422.                                         value="{{ data.get('custom_additionalAddressLine2') }}"
  423.                                         data-form-custom-field-exists="true"
  424.                                     {% else %}
  425.                                         name="{{ prefix }}[additionalAddressLine2]"
  426.                                         value="{{ data.get('additionalAddressLine2') }}"
  427.                                     {% endif %}
  428.                                     {{ config('core.loginRegistration.additionalAddressField2Required') ? 'required="true"' }}>
  429.                         {% endblock %}
  430.                         {% block component_address_form_additional_field2_error %}
  431.                             {% if violationPath %}
  432.                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  433.                             {% endif %}
  434.                         {% endblock %}
  435.                     </div>
  436.                 {% endif %}
  437.             {% endblock %}
  438.         </div>
  439.         {# <div class="{{ formRowClass }} country-and-state-form-elements" data-country-state-select="true">
  440.         </div> #}
  441.         <div class="{{ formRowClass }}">
  442.             {% block component_address_form_phone_number %}
  443.                 {% if config('core.loginRegistration.showPhoneNumberField') %}
  444.                     <div class="form-group col-md-6">
  445.                         {% if formViolations.getViolations("/phoneNumber") is not empty %}
  446.                             {% set violationPath = "/phoneNumber" %}
  447.                         {% elseif formViolations.getViolations("/#{prefix}/phoneNumber") is not empty %}
  448.                             {% set violationPath = "/#{prefix}/phoneNumber" %}
  449.                         {% endif %}
  450.                         {% block component_address_form_phone_number_label %}
  451.                             <label class="form-label"
  452.                                    for="{{ idPrefix ~ prefix }}AddressPhoneNumber">
  453.                                 {{ "address.phoneNumberLabel"|trans|sw_sanitize }}{{ config('core.loginRegistration.phoneNumberFieldRequired') ? "general.required"|trans|sw_sanitize }}
  454.                             </label>
  455.                         {% endblock %}
  456.                         {% block component_address_form_phone_number_input %}
  457.                             <input type="text"
  458.                                    class="form-control"
  459.                                    id="{{ idPrefix ~ prefix }}AddressPhoneNumber"
  460.                                    placeholder="{{ "address.phoneNumberPlaceholder"|trans|striptags }}"
  461.                                    {% if isCustomInput %}
  462.                                         name="{{ prefix }}[customFields][custom_adress_number]"
  463.                                         value="{{ data.get('customFields')['custom_adress_number'] }}"
  464.                                         data-form-custom-field-exists="true"
  465.                                     {% else %}
  466.                                         name="{{ prefix }}[phoneNumber]"
  467.                                         value="{{ data.get('phoneNumber') }}"
  468.                                     {% endif %}
  469.                                 {{ config('core.loginRegistration.phoneNumberFieldRequired') ? 'required="true"' }}>
  470.                         {% endblock %}
  471.                         {% block component_address_form_phone_error %}
  472.                             {% if violationPath %}
  473.                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  474.                             {% endif %}
  475.                         {% endblock %}
  476.                     </div>
  477.                     <div class="form-group col-md-6">
  478.                             <label class="form-label"
  479.                                    for="{{ idPrefix ~ prefix }}AddressMobilePhoneNumber">
  480.                                 {{ "address.mobilePhoneNumberLabel"|trans|sw_sanitize }}
  481.                             </label>
  482.                             <input type="text"
  483.                                 class="form-control"
  484.                                 id="{{ idPrefix ~ prefix }}AddressMobilePhoneNumber"
  485.                                 placeholder="{{ "address.mobilePhoneNumberPlaceholder"|trans|striptags }}"
  486.                                 {% if 
  487.                                     (isCustomInput and prefix == "billingAddress") or 
  488.                                     (isCustomInput and prefix == "address") or 
  489.                                     (isCustomInput != true and prefix == "shippingAddress" ) or 
  490.                                     (isCustomInput != true and  prefix == "address" and idPrefix == "shipping-") 
  491.                                 %}
  492.                                     name="{{ prefix }}[customFields][custom_adress_mobile_phone_billing]"
  493.                                     value="{{ data.get('customFields')['custom_adress_mobile_phone_billing'] }}"
  494.                                     data-form-custom-field-exists="true"
  495.                                 {% elseif (isCustomInput != true and  prefix == "billingAddress") or (isCustomInput != true and  prefix == "address") %}
  496.                                     name="{{ prefix }}[customFields][custom_adress_mobile_phone_registration]"
  497.                                     value="{{ data.get('customFields')['custom_adress_mobile_phone_registration'] }}"
  498.                                     data-form-custom-field-exists="true"
  499.                                 {% else %}
  500.                                     name="{{ prefix }}[customFields][custom_adress_mobile_phone_registration]"
  501.                                     value="{{ data.get('customFields')['custom_adress_mobile_phone_registration'] }}"
  502.                                     data-form-custom-field-exists="true"
  503.                                 {% endif %}
  504.                             >
  505.                     </div>
  506.                 {% endif %}
  507.             {% endblock %}
  508.         </div>
  509.          {% if hideEmailField != "hide" %}
  510.                 <div class="form-group">
  511.                     
  512.                     {% block component_address_form_email_label %}
  513.                         {% if prefix == "shippingAddress" %}
  514.                             <label class="form-label"
  515.                                     for="{{ prefix }}AddressEmail">
  516.                                 Versand-E-Mail-Adresse{{ "general.required"|trans|sw_sanitize }}
  517.                             </label>
  518.                         {% else %}
  519.                             <label class="form-label"
  520.                                     for="{{ prefix }}AddressEmail">
  521.                                 {% if isCustomInput %}
  522.                                     {{ "account.address.customEmailFieldLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  523.                                 {% else %}
  524.                                     {{ "account.address.abweichendeEmailfürRechnungLabel"|trans|sw_sanitize }}
  525.                                 {% endif %}
  526.                             </label>
  527.                         {% endif %}
  528.                     {% endblock %}
  529.                     {% block component_address_form_email_input %}
  530.                         <input type="text"
  531.                                 class="form-control"
  532.                                 id="{{ prefix }}AddressEmail"
  533.                                 placeholder="{{ "account.personalMailPlaceholder"|trans|sw_sanitize }}"
  534.                                 {% if isCustomInput %}
  535.                                     name="{{ prefix }}[customFields][custom_adress_invoiceEmail]"
  536.                                     value="{{ data.get('customFields')['custom_adress_invoiceEmail'] }}"
  537.                                     data-form-custom-field-exists="true"
  538.                                 {% else %}
  539.                                     name="{{ prefix }}[AddressEmail]"
  540.                                     value="{{ data.get('customFields')['custom_adress_email'] }}"
  541.                                 {% endif %}
  542.                                 {% if isCustomInput || prefix == "shippingAddress" %}required="required" onblur="validateCustomEmail(this)" oninvalid="this.setCustomValidity('Bitte füllen Sie dieses Feld aus.')" oninput="this.setCustomValidity('')" {% endif %}
  543.                                 data-form-validation-required
  544.                                 {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}>
  545.                     {% endblock %}
  546.                     {% block component_address_form_email_input_error %}
  547.                         
  548.                     {% endblock %}
  549.                 </div>
  550.             {% endif %}
  551.     {% endblock %}
  552. {% endblock %}