{% block oro_region_widget %} {# // check if block was not included yet #} {% if block('oro_region_updater_js') is not defined %} {{ block('oro_region_updater_js', '@OroAddress/Include/javascript.html.twig')|raw }} {% endif %} {% if country_field is not defined or country_field is empty %} {% set country_field = name|replace({'region': 'country'}) %} {% endif %} {% set country_field = form.parent[country_field] %} {% if region_text_field is not defined or region_text_field is empty %} {% set region_text_field = name ~ "_text" %} {% endif %} {% set region_text_field = form.parent[region_text_field] %} {% set attr = {} %} {% if required %} {% set attr = attr|merge({'attr': {'data-validation': { NotBlank: null}|json_encode} }) %} {% endif %} {% set showSelect = (choices is not empty and region_text_field.vars.value is empty) ? ' show-select' : '' %}
{{ form_widget(form, attr) }} {% set regionView = regionView|default('oroaddress/js/region/view') %} {% import '@OroUI/macros.html.twig' as UI %}
{% endblock oro_region_widget %} {% block oro_email_widget %}
{{ form_widget(form.email) }}
{{ form_errors(form.email) }} {% for child in form.children %} {% if child.vars.extra_field is defined and child.vars.extra_field %}
{{ form_widget(child, {'attr': {'title': child.vars.label}}) }}
{{ form_errors(child) }} {% endif %} {% endfor %}
{{ form_rest(form) }} {% endblock %} {% block oro_phone_widget %}
{{ form_widget(form.phone) }}
{{ form_errors(form.phone) }} {% for child in form.children %} {% if child.vars.extra_field is defined and child.vars.extra_field %}
{{ form_widget(child, {'attr': {'title': child.vars.label}}) }}
{{ form_errors(child) }} {% endif %} {% endfor %}
{{ form_rest(form) }} {% endblock %} {% block oro_address_widget %} {% if form.parent is not empty %}
{{ block('oro_address_rows') }}
{% else %} {{ block('oro_address_rows') }} {% endif %} {% endblock %} {% block oro_address_rows %} {{ form_row(form.id) }} {{ form_row(form.label) }} {{ form_row(form.namePrefix) }} {{ form_row(form.firstName) }} {{ form_row(form.middleName) }} {{ form_row(form.lastName) }} {{ form_row(form.nameSuffix) }} {{ form_row(form.organization) }} {{ form_row(form.country) }} {{ form_row(form.street) }} {{ form_row(form.street2) }} {{ form_row(form.city) }} {{ form_row(form.region_text) }} {{ form_row(form.region) }} {{ form_row(form.postalCode) }} {{ form_rest(form) }} {% endblock %} {% block oro_typed_address_widget %} {{ block('oro_typed_address_rows') }} {% endblock %} {% block oro_typed_address_rows %} {{ form_row(form.types) }} {{ form_row(form.primary) }} {{ block('oro_address_rows') }} {% endblock %} {% block oro_address_collection_widget %} {% import _self as addressIncludeFields %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'collection-fields-list-bg oro-address-collection' }) %} {{ block('oro_collection_widget') }} {% set id = id ~ '_collection' %} {{ addressIncludeFields.oro_collection_validate_types_js(_context) }} {% endblock %} {% macro oro_collection_validate_types_js(context) %} {% if context.form.vars.prototype.types is defined %} {% import '@OroUI/macros.html.twig' as UI %}
{% endif %} {% endmacro %}