{% extends '@OroUI/actions/update.html.twig' %}
{% set formAction = entity.id ? path('oro_tax_rule_update', {id: entity.id}) : path('oro_tax_rule_create') %}
{% oro_title_set({params : {"%id%": entity.id|default('N/A'|trans), "%entityName%": 'oro.tax.taxrule.entity_label'|trans} }) %}
{% block navButtons %}
{% import '@OroUI/macros.html.twig' as UI %}
{{ parent() }}
{{ UI.cancelButton(path('oro_tax_rule_index')) }}
{% set html = '' %}
{% if is_granted('oro_tax_rule_view') %}
{% set html = html ~ UI.saveAndCloseButton({
'route' : 'oro_tax_rule_view',
'params' : {'id': '$id'}
}) %}
{% endif %}
{% if is_granted('oro_tax_rule_update') %}
{% set html = html ~ UI.saveAndStayButton({
'route' : 'oro_tax_rule_update',
'params': {'id': '$id'}
}) %}
{% endif %}
{{ UI.dropdownSaveButton({'html': html}) }}
{% endblock %}
{% block pageHeader %}
{% if entity.id %}
{% set breadcrumbs = {
'entity': entity,
'indexPath': path('oro_tax_rule_index'),
'indexLabel': 'oro.tax.taxrule.entity_plural_label'|trans,
'entityTitle': entity.id|default('N/A'|trans)
} %}
{{ parent() }}
{% else %}
{% set title = 'oro.ui.create_entity'|trans({'%entityName%': 'oro.tax.taxrule.entity_label'|trans}) %}
{% include '@OroUI/page_title_block.html.twig' with { title: title } %}
{% endif %}
{% endblock pageHeader %}
{% block content_data %}
{% set id = 'tax-edit' %}
{% set dataBlocks = [
{
'title': 'oro.tax.sections.general'|trans,
'subblocks': [
{
'data': [
form_row(form.customerTaxCode),
form_row(form.productTaxCode),
form_row(form.taxJurisdiction),
form_row(form.tax),
form_row(form.description),
]
}
]
}
] %}
{% set data = {
'formErrors': form_errors(form),
'dataBlocks': dataBlocks
}%}
{{ parent() }}
{% endblock content_data %}