{% block oro_order_address_type_widget %} {% if form.parent is not empty %}
{% endif %} {% if form.customerAddress is defined %} {{ form_row(form.customerAddress) }} {% endif %} {{ form_row(form.id) }} {{ form_row(form.label, {label: 'oro.order.orderaddress.label.label'}) }} {{ form_row(form.namePrefix, {label: 'oro.order.orderaddress.name_prefix.label'}) }} {{ form_row(form.firstName, {label: 'oro.order.orderaddress.first_name.label'}) }} {{ form_row(form.middleName, {label: 'oro.order.orderaddress.middle_name.label'}) }} {{ form_row(form.lastName, {label: 'oro.order.orderaddress.last_name.label'}) }} {{ form_row(form.nameSuffix, {label: 'oro.order.orderaddress.name_suffix.label'}) }} {{ form_row(form.organization, {label: 'oro.order.orderaddress.organization.label'}) }} {{ form_row(form.country, {label: 'oro.order.orderaddress.country.label'}) }} {{ form_row(form.street, {label: 'oro.order.orderaddress.street.label'}) }} {{ form_row(form.street2, {label: 'oro.order.orderaddress.street2.label'}) }} {{ form_row(form.city, {label: 'oro.order.orderaddress.city.label'}) }} {{ form_row(form.region_text, {label: 'oro.order.orderaddress.region_text.label'}) }} {{ form_row(form.region, {label: 'oro.order.orderaddress.region.label'}) }} {{ form_row(form.postalCode, {label: 'oro.order.orderaddress.postal_code.label'}) }} {{ form_row(form.phone, {label: 'oro.order.orderaddress.phone.label'}) }} {{ form_rest(form) }} {% if form.parent is not empty %}
{% endif %} {% endblock %} {% macro oro_order_line_items_collection_item_prototype(widget, attributes) %} {% if 'collection' in widget.vars.block_prefixes %} {% set form = widget.vars.prototype %} {% set name = widget.vars.full_name ~ '[' ~ widget.vars.prototype.vars.name ~ ']' %} {% set disabled = widget.vars.disabled %} {% set allow_delete = widget.vars.allow_delete %} {% else %} {% if widget.vars.disallow_delete is defined and widget.vars.disallow_delete %} {% set allow_delete = false %} {% else %} {% set allow_delete = widget.parent.vars.allow_delete %} {% endif %} {% set form = widget %} {% set name = widget.vars.full_name %} {% set disabled = widget.parent.vars.disabled %} {% endif %} {% set page_component_options = form.vars.page_component_options|merge({ 'disabled': not allow_delete }) %} {{ form_widget(form) }} {% if allow_delete %} {% elseif widget.parent.vars.allow_delete %} {% endif %} {% endmacro %} {% block oro_order_line_items_collection_widget %} {% import _self as fields %} {% apply spaceless %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_order_line_items_collection_item_prototype(form, widgetContainerAttributes) %} {% endif %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'oro-item-collection grid-container' }) %} {% set id = id ~ '_collection' %}
{% set prototype_name = form.vars.prototype_name %}
{% if form.vars.prototype.vars.sections is defined and form.vars.prototype.vars.sections|length %} {% for sectionName, section in form.vars.prototype.vars.sections %} {% set label = section.label|default('oro.order.orderlineitem.%s.label'|format(sectionName)) %} {% endfor %} {% endif %} {% if form.vars.allow_delete %} {% endif %} {% if form.children|length %} {% for child in form.children %} {{ fields.oro_order_line_items_collection_item_prototype(child, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.product.sku.label'|trans }} {{ 'oro.product.entity_label'|trans }} {{ label|trans }}
{% if allow_add %} {% endif %}
{% endapply %} {% endblock %} {% block oro_order_line_item_widget %} {% import _self as fields %} {% import '@OroUI/macros.html.twig' as UI %}
{% if form.vars.value is not empty %} {{ form.vars.value.productSku }} {% endif %}
{{ form_widget(form.product) }} {{ form_errors(form.product) }} {{ 'oro.order.orderlineitem.select.free_form'|trans }}
{% if form.kitItemLineItems is defined %} {{ form_widget(form.kitItemLineItems) }} {{ form_errors(form.kitItemLineItems) }} {% endif %}
{{ fields.render_form_sections(form.vars.sections, form) }} {% endblock %} {% block _oro_order_type_lineItems_entry_kitItemLineItems_widget %} {%- for child in form -%} {{ form_widget(child) }} {%- endfor -%}
{% endblock %} {% block _oro_order_type_lineItems_entry_kitItemLineItems_entry_widget %} {% import '@OroUI/macros.html.twig' as UI %} {{ form_label(form, label, {translatable_label: false}) }}
{{ form_widget(form.product) }} {{ form_errors(form.product) }}
{% set unit_precision_info = oro_format_product_unit_precision_label(unit_code|default('N/A'|trans), unit_precision|default(0)) %} {{ form_label(form.quantity, 'oro.order.orderproductkititemlineitem.quantity.label'|trans ~ ':', {tooltip: 'oro.order.orderproductkititemlineitem.quantity.form.tooltip'|trans({'{{ unit_precision_info }}': unit_precision_info})}) }}
{{ form_widget(form.quantity, { attr: { 'data-floating-error': true, 'data-precision': unit_precision, 'class': 'line-item-quantity-field' } }) }} {{ form_errors(form.quantity) }}
{{ form_label(form.price, 'oro.order.orderproductkititemlineitem.price.form_label'|trans({'%currency%': oro_currency_symbol(currency)}) ~ ':') }}
{{ form_widget(form.price) }} {{ form_errors(form.price) }}
{% endblock %} {% block _oro_order_type_lineItems_entry_kitItemLineItems_entry_product_entry_widget %} {%- set label -%} {%- if product is not null -%} {%- set productName = product.names|localized_value -%} {{ product.skuUppercase ~ ' - ' ~ productName }} {%- else -%} {{ 'oro.order.form.orderproductkititemlineitem.product.choices.none'|trans }} {%- endif -%} {%- endset -%} {{ block('radio_widget') }} {% endblock %} {% macro render_form_sections(sections, form, overrides) %} {% if sections is defined and not sections.isEmpty %} {% for sectionName, sections in form.vars.sections %} {% placeholder 'order_edit_section_' ~ sectionName ~ '_before' with {form: form} %} {% if overrides[sectionName] is defined %} {{ overrides[sectionName] }} {% elseif sections.data is defined and sections.data is iterable %}
{% for subSectionName, subSection in sections.data %}
{% placeholder 'order_edit_subsection_' ~ subSectionName ~ '_before' with {subSection: subSection} %} {% if subSectionName in form|keys %} {{ form_widget(form[subSectionName]) }} {% endif %} {% placeholder 'order_edit_subsection_' ~ subSectionName ~ '_after' with {subSection: subSection} %}
{% endfor %}
{% for subSectionName, subSection in sections.data %} {% if subSectionName in form|keys %} {{ form_errors(form[subSectionName]) }} {% endif %} {% endfor %} {% endif %} {% placeholder 'order_edit_section_' ~ sectionName ~ '_after' with {form: form} %} {% endfor %} {% endif %} {% endmacro %} {% block oro_order_collection_table_widget %} {% import '@OroOrder/Order/macros.html.twig' as order_macros %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ ' grid-container oro-collection-table' }) %}
{% include template_name with {collection: form.vars.value, editable: true} %} {{ order_macros.hiddenCollection(form) }}
{% endblock %} {% block oro_order_discount_collection_row_widget %} {{ form_widget(form.description, {attr: {'data-role': 'description'}}) }} {{ form_widget(form.type, {attr: {'data-role': 'type'}}) }} {{ form_widget(form.percent, {attr: {'data-role': 'percent'}}) }} {{ form_widget(form.amount, {attr: {'data-role': 'amount'}}) }} {% endblock %} {% macro oro_order_shipping_tracking_collection_item_prototype(widget) %} {% if 'collection' in widget.vars.block_prefixes %} {% set form = widget.vars.prototype %} {% set name = widget.vars.prototype.vars.name %} {% set disabled = widget.vars.disabled %} {% set allow_delete = widget.vars.allow_delete %} {% set allow_add_after = widget.vars.allow_add_after %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% set disabled = widget.parent.vars.disabled %} {% set allow_delete = widget.parent.vars.allow_delete %} {% set allow_add_after = widget.parent.vars.allow_add_after %} {% if widget.vars.allow_delete is defined %} {% set allow_delete = allow_delete and widget.vars.allow_delete %} {% endif %} {% endif %} {{ form_widget(form, {disabled: disabled}) }} {% endmacro %} {% block oro_order_shipping_tracking_collection_widget %} {% import _self as fields %} {% import '@OroUI/macros.html.twig' as UI %} {% apply spaceless %} {% if prototype is defined %} {% set prototype_html = fields.oro_order_shipping_tracking_collection_item_prototype(form) %} {% endif %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'oro-item-collection collection-fields-list' }) %} {% set id = id ~ '_collection' %}
{% set prototype_name = form.vars.prototype_name %}
{% if form.children|length %} {% for child in form.children %} {{ fields.oro_order_shipping_tracking_collection_item_prototype(child) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {% for i in 0..(form.vars.row_count_initial - 1) %} {{ prototype_html|replace({(prototype_name): i})|raw }} {% endfor %} {% endif %}
{{ 'oro.order.shipping_tracking.method.label'|trans }} {{ 'oro.order.shipping_tracking.number.label'|trans }}
{% if allow_add %} {{ form.vars.add_label|default('oro.form.collection.add')|trans }} {% endif %}
{% endapply %} {% endblock %} {% block oro_order_shipping_tracking_widget %} {% set name = form.vars.full_name %} {{ form_widget(form.method, { 'attr': {'class': 'order-shipping-tracking-method', 'style': 'width: 100px'}}) }} {{ form_widget(form.number, { 'attr': {'class': 'order-shipping-tracking-number', 'style': 'width: 150px'} }) }} {% if form.parent.vars.allow_delete %} {% endif %} {% endblock %} {% block oro_select_switch_input_widget %}
{{ form_widget(form) }}
{{ form_errors(form) }}
{% endblock %}