{% macro oro_rfp_frontend_request_lineitem_requested_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 ~ ']' %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% endif %}
{{ form_widget(form) }}
{% endmacro %} {% block oro_rfp_request_widget %}
{{ form(form) }}
{% endblock %} {% block oro_rfp_frontend_request_product_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_rfp_frontend_request_lineitem_prototype(form, prototype_name, null, widgetContainerAttributes) %} {% endif %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'grid-container' }) %} {% set id = id ~ '_collection' %}

{{ 'oro.rfp.frontend.request.title.label'|trans }}

{% include "@OroUI/view_loading.html.twig" %}
{% endblock %} {% macro oro_rfp_frontend_request_lineitem_prototype(widget, prototype_name, key, attributes) %} {% import '@OroUI/macros.html.twig' as UI %} {% if 'collection' in widget.vars.block_prefixes %} {% set form = widget.vars.prototype %} {% set name = widget.vars.full_name ~ '[' ~ widget.vars.prototype.vars.name ~ ']' %} {% set id = widget.vars.id %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% set id = widget.vars.id %} {% endif %} {% if (key is not null) %} {% set prototype_name = 'child-' ~key %} {% endif %}
{% set page_component_options = form.vars.page_component_options|merge(form.vars.componentOptions|default({})) %}
{{ form_widget(form) }} {{ form_errors(form) }}
{% set hasNotes = form.comment.vars.value is not empty %}
{% endmacro %} {% block oro_rfp_request_product_collection_widget %}
{{ block('oro_rfp_lineitem_collection_widget') }}
{% endblock %} {% block oro_rfp_lineitem_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_rfp_request_lineitem_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.children|length %} {% for child in form.children %} {{ fields.oro_rfp_request_lineitem_prototype(child, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.rfp.frontend.request.lineitem.product'|trans }} {{ 'oro.rfp.frontend.request.lineitem.requested.label'|trans }} {{ 'oro.rfp.frontend.request.lineitem.notes'|trans }}
{% endblock %} {% macro oro_rfp_request_lineitem_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 ~ ']' %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% endif %} {% set page_component_options = form.vars.page_component_options|merge(form.vars.componentOptions|default({})) %} {{ form_widget(form) }} {{ form_errors(form) }} {% endmacro %} {% block oro_rfp_frontend_request_product_widget %} {% set attr = layout_attr_defaults(form.product.vars.attr, { 'data-role': 'lineitem-product' }) %}
{{ form_widget(form.product, {attr: attr}) }} {{ form_errors(form.product) }}
{{ form_widget(form.requestProductItems) }} {{ form_errors(form.requestProductItems) }}
{% endblock %} {% block oro_rfp_request_product_widget %} {{ form_widget(form.product) }} {{ form_errors(form.product) }} {{ form_widget(form.requestProductItems) }} {{ form_errors(form.requestProductItems) }}
{{ form_widget(form.comment) }} {{ form_errors(form.comment) }}
{% endblock %} {% block oro_rfp_request_frontend_product_item_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_rfp_frontend_request_lineitem_requested_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.children|length %} {% for child in form.children %} {{ fields.oro_rfp_frontend_request_lineitem_requested_prototype(child, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.rfp.frontend.request.lineitem.requested.quantity'|trans }} {{ 'oro.rfp.frontend.request.lineitem.requested.price'|trans }}
{% endblock %} {% block oro_rfp_frontend_request_product_item_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_rfp_frontend_request_lineitem_requested_prototype(form, widgetContainerAttributes) %} {% endif %} {% set attr = attr|merge({'class': (attr.class is defined ? attr.class ~ ' ' : '') ~ 'grid-container' }) %} {% set id = id ~ '_collection' %} {% set prototype_name = form.vars.prototype_name %}
{% if form.children|length %} {% for child in form.children %} {{ fields.oro_rfp_frontend_request_lineitem_requested_prototype(child, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.rfp.frontend.request.lineitem.requested.add'|trans }} {% endblock %} {% block oro_rfp_request_product_item_collection_widget %} {% import _self as fields %} {% set widgetContainerAttributes %} {% with {'id': '', 'attr': []} %}{{ block('widget_container_attributes') }}{% endwith %} {% endset %} {% if prototype is defined %} {% set prototype_html = fields.oro_rfp_request_lineitem_requested_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.children|length %} {% for child in form.children %} {{ fields.oro_rfp_request_lineitem_requested_prototype(child, widgetContainerAttributes) }} {% endfor %} {% elseif show_form_when_empty and prototype_html is defined %} {{ prototype_html|replace({(prototype_name): '0'})|raw }} {% endif %}
{{ 'oro.rfp.frontend.request.lineitem.requested.quantity'|trans }} {{ 'oro.rfp.frontend.request.lineitem.requested.price'|trans }}
{% endblock %} {% macro oro_rfp_request_lineitem_requested_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 ~ ']' %} {% else %} {% set form = widget %} {% set name = widget.vars.full_name %} {% endif %} {{ form_widget(form) }} {% endmacro %} {% block _oro_rfp_frontend_request_requestProducts_entry_requestProductItems_entry_widget %} {% set ariaControlsId = 'rfq-quantity-'|uniqid %} {% use "@OroPricing/layouts/default/layout.html.twig" %}
{{ form_widget(form.quantity, {id: ariaControlsId}) }} {{ form_errors(form.quantity) }}
{% set attr_unit = layout_attr_defaults(form.productUnit.vars.attr, { '~class': 'select select--size-m select--full' }) %}
{{ form_widget(form.productUnit, {attr: attr_unit}) }} {{ form_errors(form.productUnit) }}
{% set input_price = layout_attr_defaults(form.price.value.vars.attr, { '~class': 'request-form-lineitem-unit__input', '~data-precision': oro_locale_number_attribute('max_fraction_digits', 'currency') }) %} {{ 'oro.rfp.requestproductitem.price.label'|trans }}: {{ form_widget(form.price.value, {attr: input_price}) }} {{ form_errors(form.price) }}
{% endblock %} {% block oro_rfp_request_product_item_widget %} {{ form_widget(form.quantity) }} {{ form_errors(form.quantity) }} {{ form_widget(form.productUnit, {attr: attr|merge({class: 'rfp-requestproductitem-productunit-select'})}) }} {{ form_errors(form.productUnit) }} {{ form_widget(form.price.value) }} {{ form_errors(form.price.value) }} {{ form_widget(form.price.currency) }} {{ form_errors(form.price.currency) }} {% endblock %} {% block _oro_order_type_lineItems_entry_offers_widget %} {% if offers is defined and offers|length %} {% set page_component_options = { offersSelector: '[name="%s"]'|format(full_name), priceSelector: '#%s'|format(form.parent.price.value.vars.id), quantitySelector: '#%s'|format(form.parent.quantity.vars.id), unitSelector: '#%s'|format(form.parent.productUnit.vars.id), productSelector: '#%s'|format(form.parent.product.vars.id), productSkuSelector: '#%s'|format(form.parent.productSku.vars.id), offersDataSelector: '#%s'|format(form.parent.offers_data.vars.id), } %} {% for child in form.children %} {{ form_row(child, {offer: offers[loop.index-1]}) }} {% endfor %}
{% endif %} {% endblock %} {% block _oro_order_type_lineItems_entry_offers_entry_row %} {% set quantity = offer.quantity %} {% if quantity is not empty %} {% set quantity = quantity|oro_format_decimal %} {% endif %} {% set price = offer.price %} {% if price is not empty %} {% set price = price|oro_format_decimal %} {% endif %} {{ form_widget(form, { attr: { 'data-quantity': quantity|default, 'data-unit': offer.unit|default, 'data-price': price|default, 'data-currency': offer.currency|default } }) }} {% if offer.quantity is defined and offer.unit is defined %} {% endif %} {% if offer.price is defined and offer.currency is defined %} {% endif %} {% endblock %}