custom/plugins/SelfdelveCms/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_phone_number %}
  3.     {% if context.shippingMethod.customFields.selfdelve_theme_shippingmethod_mandatory_phonenumber == true %}
  4.         <div class="form-group col-md-6">
  5.             {% if formViolations.getViolations("/phoneNumber") is not empty %}
  6.                 {% set violationPath = "/phoneNumber" %}
  7.             {% elseif formViolations.getViolations("/#{prefix}/phoneNumber") is not empty %}
  8.                 {% set violationPath = "/#{prefix}/phoneNumber" %}
  9.             {% endif %}
  10.             <label class="form-label" for="{{ idPrefix ~ prefix }}AddressPhoneNumber">
  11.                 {{ "address.phoneNumberLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  12.             </label>
  13.             <input type="text"
  14.                    class="form-control"
  15.                    id="{{ idPrefix ~ prefix }}AddressPhoneNumber"
  16.                    placeholder="{{ "address.phoneNumberPlaceholder"|trans|striptags }}"
  17.                    name="{{ prefix }}[phoneNumber]"
  18.                    value="{{ data.get('phoneNumber') }}"
  19.                    required="true"
  20.             />
  21.             <small class="form-text js-validation-message" data-form-validation-length-text="true">
  22.                 {{ 'SelfdelveCms.main.checkout.shippingMethodRequiresPhoneNumber'|trans({'%name%': context.shippingMethod.name}) }}
  23.             </small>
  24.             {% if violationPath %}
  25.                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  26.             {% endif %}
  27.         </div>
  28.     {% else %}
  29.         {{ parent() }}
  30.     {% endif %}
  31. {% endblock %}