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

Open in your IDE?
  1. {% block component_address_form %}
  2.     {% block component_address_form_addressId %}
  3.         {% if data.get('id') %}
  4.             <input type="hidden"
  5.                    name="{{ prefix }}[id]"
  6.                    value="{{ data.get('id') }}">
  7.         {% endif %}
  8.     {% endblock %}
  9.     {# @deprecated tag:v6.5.0 - will be removed #}
  10.     {% if not feature('FEATURE_NEXT_15957') %}
  11.         {% set showVatIdField = false %}
  12.     {% endif %}
  13.     {% block component_address_form_company %}
  14.         {% if showFormCompany %}
  15.             {% if config('core.loginRegistration.showAccountTypeSelection') %}
  16.                 {% set accountTypeRequired = true %}
  17.             {% endif %}
  18.             {% if config('core.loginRegistration.showAccountTypeSelection') or prefix == "address" or prefix == "shippingAddress" or hasSelectedBusiness %}
  19.                 <div class="{% if prefix == "shippingAddress" or hasSelectedBusiness %}address-contact-type-company{% elseif prefix == "address" %}d-block{% else %}d-none{% endif %}">
  20.                     {% block component_address_form_company_fields %}
  21.                         <div class="{{ formRowClass }}">
  22.                             {% block component_address_form_company_name %}
  23.                                 <div class="form-group form-group-text col-6">
  24.                                     {% if formViolations.getViolations("/company") is not empty %}
  25.                                         {% set violationPath = "/company" %}
  26.                                     {% elseif formViolations.getViolations("/#{prefix}/company") is not empty %}
  27.                                         {% set violationPath = "/#{prefix}/company" %}
  28.                                     {% endif %}
  29.                                     {% block component_address_form_company_name_label %}
  30.                                         <label class="form-label"
  31.                                                for="{{ idPrefix ~ prefix }}company"><span>
  32.                                             {{ "address.companyNameLabel"|trans|sw_sanitize }}{% if prefix != "shippingAddress" and accountTypeRequired %}{{ "general.required"|trans|sw_sanitize }}{% endif %}
  33.                                             </span></label>
  34.                                     {% endblock %}
  35.                                     {% block component_address_form_company_name_input %}
  36.                                         <input type="text"
  37.                                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  38.                                                id="{{ idPrefix ~ prefix }}company"
  39.                                                {#placeholder="{{ "address.companyNamePlaceholder"|trans|striptags }}"#}
  40.                                                name="{{ prefix }}[company]"
  41.                                                value="{{ data.get('company') }}"
  42.                                                {% if prefix != "shippingAddress" and accountTypeRequired %}required="required"{% endif %}>
  43.                                     {% endblock %}
  44.                                     {% block component_address_form_company_name_input_error %}
  45.                                         {% if violationPath %}
  46.                                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  47.                                         {% endif %}
  48.                                     {% endblock %}
  49.                                 </div>
  50.                             {% endblock %}
  51.                             {% block component_address_form_company_department %}
  52.                                 <div class="form-group form-group-text col-md-6">
  53.                                     {% if formViolations.getViolations("/department") is not empty %}
  54.                                         {% set violationPath = "/department" %}
  55.                                     {% elseif formViolations.getViolations("/#{prefix}/department") is not empty %}
  56.                                         {% set violationPath = "/#{prefix}/department" %}
  57.                                     {% endif %}
  58.                                     {% block component_address_form_company_department_label %}
  59.                                         <label class="form-label"
  60.                                                for="{{ idPrefix ~ prefix }}department"><span>
  61.                                             {{ "address.companyDepartmentLabel"|trans|sw_sanitize }}
  62.                                             </span></label>
  63.                                     {% endblock %}
  64.                                     {% block component_address_form_company_department_input %}
  65.                                         <input type="text"
  66.                                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  67.                                                id="{{ idPrefix ~ prefix }}department"
  68.                                                {#placeholder="{{ "address.companyDepartmentPlaceholder"|trans|striptags }}"#}
  69.                                                name="{{ prefix }}[department]"
  70.                                                value="{{ data.get('department') }}">
  71.                                     {% endblock %}
  72.                                     {% block component_address_form_company_department_input_error %}
  73.                                         {% if violationPath %}
  74.                                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  75.                                         {% endif %}
  76.                                     {% endblock %}
  77.                                 </div>
  78.                             {% endblock %}
  79.                             {% block component_address_form_company_vatId %}
  80.                                 {% if not feature('FEATURE_NEXT_15957') and showVatIdField %}
  81.                                     <div class="form-group form-group-text col-md-6">
  82.                                         {% if formViolations.getViolations("/vatId") is not empty %}
  83.                                             {% set violationPath = "/vatId" %}
  84.                                         {% elseif formViolations.getViolations("/#{prefix}/vatId") is not empty %}
  85.                                             {% set violationPath = "/#{prefix}/vatId" %}
  86.                                         {% endif %}
  87.                                         {# @deprecated tag:v6.5.0 - will be removed, look into `@Storefront/storefront/component/address/address-personal-vat-id.html.twig` instead #}
  88.                                         {% block component_address_form_company_vatId_label %}
  89.                                             <label class="form-label"
  90.                                                    for="{{ idPrefix ~ prefix }}vatId"><span>
  91.                                                 {{ "address.companyVatLabel"|trans|sw_sanitize }}
  92.                                                 </span></label>
  93.                                         {% endblock %}
  94.                                         {# @deprecated tag:v6.5.0 - will be removed, look into `@Storefront/storefront/component/address/address-personal-vat-id.html.twig` instead #}
  95.                                         {% block component_address_form_company_vatId_input %}
  96.                                             <input type="text"
  97.                                                    class="form-control{% if violationPath %} is-invalid{% endif %}"
  98.                                                    id="{{ idPrefix ~ prefix }}vatId"
  99.                                                    {#placeholder="{{ "address.companyVatPlaceholder"|trans|striptags }}"#}
  100.                                                    name="{{ prefix }}[vatId]"
  101.                                                    value="{{ data.get('vatId') }}">
  102.                                         {% endblock %}
  103.                                         {# @deprecated tag:v6.5.0 - will be removed, look into `@Storefront/storefront/component/address/address-personal-vat-id.html.twig` instead #}
  104.                                         {% block component_address_form_company_vatId_input_error %}
  105.                                             {% if violationPath %}
  106.                                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  107.                                             {% endif %}
  108.                                         {% endblock %}
  109.                                     </div>
  110.                                 {% elseif feature('FEATURE_NEXT_15957') and prefix == 'address' and showVatIdField %}
  111.                                     <div class="form-group col-md-6">
  112.                                         {% sw_include '@Storefront/storefront/component/address/address-personal-vat-id.html.twig' with {
  113.                                             'vatIds': context.customer.vatIds
  114.                                         } %}
  115.                                     </div>
  116.                                 {% endif %}
  117.                             {% endblock %}
  118.                         </div>
  119.                     {% endblock %}
  120.                 </div>
  121.             {% endif %}
  122.         {% endif %}
  123.     {% endblock %}
  124.     {% set ev_addresses = app.session.get('ev_address_data') %}
  125.     {% block component_address_form_address_fields %}
  126.         <div class="{{ formRowClass }}">
  127.             {% block component_address_form_street %}
  128.                 <div class="form-group form-group-text col-md-6">
  129.                     {% if formViolations.getViolations("/street") is not empty %}
  130.                         {% set violationPath = "/street" %}
  131.                     {% elseif formViolations.getViolations("/#{prefix}/street") is not empty %}
  132.                         {% set violationPath = "/#{prefix}/street" %}
  133.                     {% else %}
  134.                         {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.streetLabel"|trans|sw_sanitize }) %}
  135.                     {% endif %}
  136.                     {% block component_address_form_street_label %}
  137.                         <label class="form-label"
  138.                                for="{{ idPrefix ~ prefix }}AddressStreet"><span>
  139.                             {{ "address.streetLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  140.                             </span></label>
  141.                     {% endblock %}
  142.                     {% block component_address_form_street_input %}
  143.                         <input type="text"
  144.                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  145.                                id="{{ idPrefix ~ prefix }}AddressStreet"
  146.                                {#placeholder="{{ "address.streetPlaceholder"|trans|striptags }}"#}
  147.                                name="{{ prefix }}[street]"
  148.                                value="{% if data.get('street') is empty %}{{ ev_addresses[0].ev_street ~ ' ' ~ ev_addresses[0].ev_housenr }} {% else %}{{ data.get('street') }}{% endif %}"
  149.                               {# value="{% if data.get('street') is empty %}{{ ev_addresses[0].ev_street ~ ' ' ~ ev_addresses[0].ev_housenr }} {% else %}{{ data.get('street') }}{% endif %}" #}
  150.                                data-form-validation-required
  151.                                {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}
  152.                                required="required">
  153.                                     {% if prefix == "shippingAddress"  %}
  154.                                        <script>
  155.                                           (()=>{
  156.                                               const shipStreet = document.getElementsByName("shippingAddress[street]")[0];
  157.                                               if (shipStreet) shipStreet.addEventListener("keyup", ()=>{
  158.                                               document.dispatchEvent(new Event("keyUpForStreet"));
  159.                                                });
  160.                                            })();
  161.                                        </script>
  162.                                     {% endif %}
  163.                     {% endblock %}
  164.                     {% block component_address_form_street_input_error %}
  165.                         {% if violationPath %}
  166.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  167.                         {% endif %}
  168.                     {% endblock %}
  169.                 </div>
  170.             {% endblock %}
  171.             {% block component_address_form_zipcode_city %}
  172.                 {% set zipcodeField %}
  173.                 {% set zipcodeValue = formViolations.getInputData()['zipcode'] ?? data.get('zipcode') %}
  174.                     {% if formViolations.getViolations("/zipcode") is not empty %}
  175.                         {% set violationPath = "/zipcode" %}
  176.                     {% elseif formViolations.getViolations("/#{prefix}/zipcode") is not empty %}
  177.                         {% set violationPath = "/#{prefix}/zipcode" %}
  178.                     {% else %}
  179.                         {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.zipcodeLabel"|trans|sw_sanitize }) %}
  180.                     {% endif %}
  181.                     {% block component_address_form_zipcode_label %}
  182.                         <label class="form-label"
  183.                                for="{{ idPrefix ~ prefix }}AddressZipcode"><span>
  184.                             {{ "address.zipcodeLabel"|trans|sw_sanitize }}</span></label>
  185.                     {% endblock %}
  186.                     {% block component_address_form_zipcode_input %}
  187.                         <input type="text" {% if controllerName != "Address" %}readonly{% endif %}
  188.                                class="form-control{% if violationPath %} is-invalid{% endif %} isDifferentShippingAddress"
  189.                                id="{{ idPrefix ~ prefix }}AddressZipcode"
  190.                                {# placeholder="{{ "address.zipcodePlaceholder"|trans|striptags }}" #}
  191.                                {#placeholder=" {{ app.session.get('ev_postcode') |trans|striptags }}"#}
  192.                                name="{{ prefix }}[zipcode]"
  193.                                value="{% if data.get('zipcode') is empty %}{{ ev_addresses[0].ev_postcode }} {% else %}{{ data.get('zipcode') }}{% endif %}"
  194.                                {#value="{{ app.session.get('ev_postcode') |trans|striptags }}"#}
  195.                                data-input-name="zipcodeInput"
  196.                                {% if not feature('v6.5.0.0') %}required="required"{% endif %}
  197.                         >
  198.                     {% endblock %}
  199.                     {% block component_address_form_zipcode_error %}
  200.                         {% if violationPath %}
  201.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  202.                         {% endif %}
  203.                     {% endblock %}
  204.                 {% endset %}
  205.                 {% set cityField %}
  206.                     {% if formViolations.getViolations("/city") is not empty %}
  207.                         {% set violationPath = "/city" %}
  208.                     {% elseif formViolations.getViolations("/#{prefix}/city") is not empty %}
  209.                         {% set violationPath = "/#{prefix}/city" %}
  210.                     {% else %}
  211.                         {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.cityLabel"|trans|sw_sanitize }) %}
  212.                         {% set violationPath = null %}
  213.                     {% endif %}
  214.                     {% block component_address_form_city_label %}
  215.                         <label class="form-label"
  216.                                for="{{ idPrefix ~ prefix }}AddressCity">
  217.                             {{ "address.cityLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  218.                         </label>
  219.                     {% endblock %}
  220.                     {% block component_address_form_city_input %}
  221.                         <input type="text"
  222.                                class="form-control{% if violationPath %} is-invalid{% endif %}"
  223.                                id="{{ idPrefix ~ prefix }}AddressCity"
  224.                                {#placeholder="{{ "address.cityPlaceholder"|trans|striptags }}"#}
  225.                                name="{{ prefix }}[city]"
  226.                                value="{% if data.get('city') is empty %}{{ ev_addresses[0].ev_city }} {% else %}{{ data.get('city') }}{% endif %}"
  227.                                {# value="{{ data.get('city') }}" #}
  228.                                data-form-validation-required
  229.                                {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}
  230.                                required="required">
  231.                                             <script>
  232.                                                 (()=>{
  233.                                                     const checkbox1 = document.getElementsByName("shippingAddress[city]")[0];
  234.                                                     checkbox1.addEventListener("keyup", ()=>{
  235.                                                         document.dispatchEvent(new Event("keyUpForCity"));
  236.                                                     });
  237.                                                 })();
  238.                                             </script>
  239.                     {% endblock %}
  240.                     {% block component_address_form_city_error %}
  241.                         {% if violationPath %}
  242.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  243.                         {% endif %}
  244.                     {% endblock %}
  245.                 {% endset %}
  246.                 {% if config('core.address.showZipcodeInFrontOfCity') %}
  247.                     <div class="form-group form-group-text col-md-2 col-4">
  248.                         {{ zipcodeField }}
  249.                     </div>
  250.                     <div class="form-group form-group-text col-md-4 col-8">
  251.                         {{ cityField }}
  252.                     </div>
  253.                 {% else %}
  254.                     <div class="form-group form-group-text col-md-4 col-8">
  255.                         {{ cityField }}
  256.                     </div>
  257.                     <div class="form-group form-group-text col-md-2 col-4">
  258.                         {{ zipcodeField }}
  259.                     </div>
  260.                 {% endif %}
  261.             {% endblock %}
  262.             {% block component_address_form_additional_field1 %}
  263.                 {% if config('core.loginRegistration.showAdditionalAddressField1') %}
  264.                     {% if formViolations.getViolations("/additionalAddressLine1") is not empty %}
  265.                         {% set violationPath = "/additionalAddressLine1" %}
  266.                     {% elseif formViolations.getViolations("/#{prefix}/additionalAddressLine1") is not empty %}
  267.                         {% set violationPath = "/#{prefix}/additionalAddressLine1" %}
  268.                     {% endif %}
  269.                     <div class="form-group form-group-text col-md-6">
  270.                         {% block component_address_form_additional_field1_label %}
  271.                             <label class="form-label"
  272.                                    for="{{ idPrefix ~ prefix }}AdditionalField1"><span>
  273.                                 {{ "address.additionalField1Label"|trans|sw_sanitize }}{{ config('core.loginRegistration.additionalAddressField1Required') ? "general.required"|trans|sw_sanitize }}
  274.                                 </span></label>
  275.                         {% endblock %}
  276.                         {% block component_address_form_additional_field1_input %}
  277.                             <input type="text"
  278.                                    class="form-control {% if violationPath %} is-invalid{% endif %}"
  279.                                    id="{{ idPrefix ~ prefix }}AdditionalField1"
  280.                                    {#placeholder="{{ "address.additionalField1Placeholder"|trans|striptags }}"#}
  281.                                    name="{{ prefix }}[additionalAddressLine1]"
  282.                                value="{% if data.get('additionalAddressLine1') is empty %}{{ ev_addresses[0].ev_info }} {% else %}{{ data.get('additionalAddressLine1') }}{% endif %}"
  283.                                     {{ config('core.loginRegistration.additionalAddressField1Required') ? 'required="true"' }}>
  284.                         {% endblock %}
  285.                         {% block component_address_form_additional_field1_error %}
  286.                             {% if violationPath %}
  287.                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  288.                             {% endif %}
  289.                         {% endblock %}
  290.                     </div>
  291.                 {% endif %}
  292.             {% endblock %}
  293.             {% block component_address_form_additional_field2 %}
  294.                 {% if config('core.loginRegistration.showAdditionalAddressField2') %}
  295.                     {% if formViolations.getViolations("/additionalAddressLine2") is not empty %}
  296.                         {% set violationPath = "/additionalAddressLine2" %}
  297.                     {% elseif formViolations.getViolations("/#{prefix}/additionalAddressLine2") is not empty %}
  298.                         {% set violationPath = "/#{prefix}/additionalAddressLine2" %}
  299.                     {% endif %}
  300.                     <div class="form-group form-group-text col-md-6">
  301.                         {% block component_address_form_additional_field2_label %}
  302.                             <label class="form-label"
  303.                                    for="{{ idPrefix ~ prefix }}AdditionalField2"><span>
  304.                                 {{ "address.additionalField2Label"|trans|sw_sanitize }}{{ config('core.loginRegistration.additionalAddressField2Required') ? "general.required"|trans|sw_sanitize }}
  305.                                 </span></label>
  306.                         {% endblock %}
  307.                         {% block component_address_form_additional_field2_input %}
  308.                             <input type="text"
  309.                                    class="form-control {% if violationPath %} is-invalid{% endif %}"
  310.                                    id="{{ idPrefix ~ prefix }}AdditionalField2"
  311.                                    {#placeholder="{{ "address.additionalField2Placeholder"|trans|striptags }}"#}
  312.                                    name="{{ prefix }}[additionalAddressLine2]"
  313.                                    value="{{ data.get('additionalAddressLine2') }}"
  314.                                     {{ config('core.loginRegistration.additionalAddressField2Required') ? 'required="true"' }}>
  315.                         {% endblock %}
  316.                         {% block component_address_form_additional_field2_error %}
  317.                             {% if violationPath %}
  318.                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  319.                             {% endif %}
  320.                         {% endblock %}
  321.                     </div>
  322.                 {% endif %}
  323.             {% endblock %}
  324.         </div>
  325.         <div class="{{ formRowClass }} country-and-state-form-elements" data-country-state-select="true">
  326.             {% block component_address_form_country %}
  327.                 <div class="form-group form-group-select col-md-6">
  328.                     {% set initialCountryId = null %}
  329.                     {% if data.get('countryId') %}
  330.                         {% set initialCountryId = data.get('countryId') %}
  331.                     {% elseif page.countries|length == 1 %}
  332.                         {% set initialCountryId = (page.countries|first).id %}
  333.                     {% endif %}
  334.                     {% if formViolations.getViolations("/countryId") is not empty %}
  335.                         {% set violationPath = "/countryId" %}
  336.                     {% elseif formViolations.getViolations("/#{prefix}/countryId") is not empty %}
  337.                         {% set violationPath = "/#{prefix}/countryId" %}
  338.                     {% endif %}
  339.                     {% block component_address_form_country_label %}
  340.                         <label class="form-label"
  341.                                for="{{ idPrefix ~ prefix }}AddressCountry"><span>
  342.                             {{ "address.countryLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  343.                             </span></label>
  344.                     {% endblock %}
  345.                     {% block component_address_form_country_select %}
  346.                     <div class="custom-dropdown">
  347.                         <select class="country-select {{ formSelectClass }}{% if violationPath %} is-invalid{% endif %}"
  348.                                 id="{{ idPrefix ~ prefix }}AddressCountry"
  349.                                 name="{{ prefix }}[countryId]"
  350.                                 required="required"
  351.                                 data-initial-country-id="{{ initialCountryId }}">
  352.                             {% if not initialCountryId %}
  353.                                 <option disabled="disabled"
  354.                                         value=""
  355.                                         selected="selected">
  356.                                     {{ "address.countryPlaceholder"|trans|sw_sanitize }}
  357.                                 </option>
  358.                             {% endif %}
  359.                             {% for country in page.countries %}
  360.                                 <option {% if country.id == initialCountryId %}
  361.                                         selected="selected"
  362.                                         {% endif %}
  363.                                         value="{{ country.id }}"
  364.                                         data-zipcode-required="{{ country.postalCodeRequired }}"
  365.                                         data-vat-id-required="{{ country.vatIdRequired }}"
  366.                                         data-state-required="{{ country.forceStateInRegistration }}"
  367.                                         {% if feature('FEATURE_NEXT_15707') and  not country.shippingAvailable and disableNonShippableCountries %}
  368.                                             disabled="disabled"
  369.                                         {% endif %}>
  370.                                     {{ country.translated.name }}{% if feature('FEATURE_NEXT_15707') and showNoShippingPostfix and not country.shippingAvailable %} {{ "address.countryPostfixNoShipping"|trans|sw_sanitize }}{% endif %}
  371.                                 </option>
  372.                             {% endfor %}
  373.                         </select>
  374.                     </div>
  375.                     {% endblock %}
  376.                 </div>
  377.                 <div class="form-group form-group-select col-md-6  d-none">
  378.                     {% if formViolations.getViolations("/countryStateId") is not empty %}
  379.                         {% set violationPath = "/countryStateId" %}
  380.                     {% elseif formViolations.getViolations("/#{prefix}/countryStateId") is not empty %}
  381.                         {% set violationPath = "/#{prefix}/countryStateId" %}
  382.                     {% endif %}
  383.                     {% block component_address_form_country_state_label %}
  384.                         <label class="form-label"
  385.                                for="{{ idPrefix ~ prefix }}AddressCountryState"><span>
  386.                             {{ "address.countryStateLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  387.                             </span></label>
  388.                     {% endblock %}
  389.                     {% block component_address_form_country_state_select %}
  390.                     <div class="custom-dropdown">
  391.                         <select class="country-state-select {{ formSelectClass }}{% if violationPath %} is-invalid{% endif %}"
  392.                                 id="{{ idPrefix ~ prefix }}AddressCountryState"
  393.                                 name="{{ prefix }}[countryStateId]"
  394.                                 data-initial-country-state-id="{{ data.get('countryStateId') }}">
  395.                             <option value=""
  396.                                     selected="selected"
  397.                                     data-placeholder-option="true">
  398.                                 {{ "address.countryStatePlaceholder"|trans|sw_sanitize }}
  399.                             </option>
  400.                         </select>
  401.                     </div>
  402.                     {% endblock %}
  403.                     {% block component_address_form_country_error %}
  404.                         {% if violationPath %}
  405.                             {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  406.                         {% endif %}
  407.                     {% endblock %}
  408.                 </div>
  409.             {% endblock %}
  410.         </div>
  411.         <div class="{{ formRowClass }}">
  412.             {% block component_address_form_phone_number %}
  413.                 {% if config('core.loginRegistration.showPhoneNumberField') %}
  414.                     <div class="form-group form-group-text col-md-6">
  415.                         {% if formViolations.getViolations("/phoneNumber") is not empty %}
  416.                             {% set violationPath = "/phoneNumber" %}
  417.                         {% elseif formViolations.getViolations("/#{prefix}/phoneNumber") is not empty %}
  418.                             {% set violationPath = "/#{prefix}/phoneNumber" %}
  419.                         {% endif %}
  420.                         {% block component_address_form_phone_number_label %}
  421.                             <label class="form-label"
  422.                                    for="{{ idPrefix ~ prefix }}AddressPhoneNumber"><span>
  423.                                 {{ "address.phoneNumberLabel"|trans|sw_sanitize }}{{ config('core.loginRegistration.phoneNumberFieldRequired') ? "general.required"|trans|sw_sanitize }}
  424.                                 </span></label>
  425.                         {% endblock %}
  426.                         {% block component_address_form_phone_number_input %}
  427.                             <input type="text"
  428.                                    class="form-control"
  429.                                    id="{{ idPrefix ~ prefix }}AddressPhoneNumber"
  430.                                    {#placeholder="{{ "address.phoneNumberPlaceholder"|trans|striptags }}"#}
  431.                                    name="{{ prefix }}[phoneNumber]"
  432.                                value="{% if data.get('phoneNumber') is empty %}{{ ev_addresses[0].ev_phone }} {% else %}{{ data.get('phoneNumber') }}{% endif %}"
  433.                                 {{ config('core.loginRegistration.phoneNumberFieldRequired') ? 'required="true"' }}>
  434.                         {% endblock %}
  435.                         {% block component_address_form_phone_error %}
  436.                             {% if violationPath %}
  437.                                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  438.                             {% endif %}
  439.                         {% endblock %}
  440.                     </div>
  441.                 {% endif %}
  442.             {% endblock %}
  443.         </div>
  444.     {% endblock %}
  445. {% endblock %}