custom/plugins/MadNoms/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_street %}
  3.     <div class="form-group col-md-6">
  4.         {% if formViolations.getViolations("/street") is not empty %}
  5.             {% set violationPath = "/street" %}
  6.         {% elseif formViolations.getViolations("/#{prefix}/street") is not empty %}
  7.             {% set violationPath = "/#{prefix}/street" %}
  8.         {% else %}
  9.             {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.streetLabel"|trans|sw_sanitize }) %}
  10.         {% endif %}
  11.         {% block component_address_form_street_label %}
  12.             <label class="form-label"
  13.                    for="{{ idPrefix ~ prefix }}AddressStreet">
  14.                 {{ "address.streetLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  15.             </label>
  16.         {% endblock %}
  17.         {% block component_address_form_street_input %}
  18.             <input type="text"
  19.                    class="form-control{% if violationPath %} is-invalid{% endif %}"
  20.                    id="{{ idPrefix ~ prefix }}AddressStreet"
  21.                    placeholder="{{ "address.streetPlaceholder"|trans|striptags }}"
  22.                    name="{{ prefix }}[street]"
  23.                    value="{%  if data.extensions.nomsExtension.street %}{{ data.extensions.nomsExtension.street }}{% else %}{{ data.street }}{% endif %}"
  24.                    data-form-validation-required
  25.                    {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}
  26.                    required="required"
  27.                    maxlength="35"
  28.             >
  29.             {# BODYMED-1033 Maxlength für einzelne Felder, da NOMS längenbeschränkungen hat #}
  30.         {% endblock %}
  31.         {% block component_address_form_street_input_error %}
  32.             {% if violationPath %}
  33.                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  34.             {% endif %}
  35.         {% endblock %}
  36.     </div>
  37.     <div class="form-group col-md-6">
  38.         {% if formViolations.getViolations("/streetnumber") is not empty %}
  39.             {% set violationPath = "/streetnumber" %}
  40.         {% elseif formViolations.getViolations("/#{prefix}/streetnumber") is not empty %}
  41.             {% set violationPath = "/#{prefix}/streetnumber" %}
  42.         {% else %}
  43.             {% set requiredMessage = "error.VIOLATION::IS_BLANK_ERROR"|trans({ '%field%': "address.streetnumberLabel"|trans|sw_sanitize }) %}
  44.         {% endif %}
  45.         {% block component_address_form_streetnumber_label %}
  46.             <label class="form-label"
  47.                    for="{{ idPrefix ~ prefix }}AddressStreetnumber">
  48.                 {{ "address.streetnumberLabel"|trans|sw_sanitize }}{{ "general.required"|trans|sw_sanitize }}
  49.             </label>
  50.         {% endblock %}
  51.         {% block component_address_form_streetnumber_input %}
  52.             <input type="text"
  53.                    class="form-control{% if violationPath %} is-invalid{% endif %}"
  54.                    id="{{ idPrefix ~ prefix }}AddressStreet"
  55.                    placeholder="{{ "address.streetnumberPlaceholder"|trans|striptags }}{{ "general.required"|trans|sw_sanitize }}"
  56.                    name="{{ prefix }}[streetnumber]"
  57.                    value="{%  if data.extensions.nomsExtension.streetnumber %}{{ data.extensions.nomsExtension.streetnumber }}{% endif %}"
  58.                    data-form-validation-required
  59.                    {% if requiredMessage is defined %}data-form-validation-required-message="{{ requiredMessage }}"{% endif %}
  60.                    required="required"
  61.                    maxlength="10"
  62.             >
  63.             {# BODYMED-1033 Maxlength für einzelne Felder, da NOMS längenbeschränkungen hat #}
  64.         {% endblock %}
  65.         {% block component_address_form_streetnumber_input_error %}
  66.             {% if violationPath %}
  67.                 {% sw_include '@Storefront/storefront/utilities/form-violation.html.twig' %}
  68.             {% endif %}
  69.         {% endblock %}
  70.         {% if context.customer.id %}
  71.             <input type="hidden" name="{{ prefix }}[nomsId]" value="{{ context.customer.id }}" />
  72.         {% endif %}
  73.     </div>
  74. {% endblock %}