{extends file="admin-layout.tpl"} {block name="no-return-functions"} {$admin_current_location = 'configuration'} {/block} {block name="page-title"}{intl l='Edit a tax rule'}{/block} {block name="check-resource"}admin.configuration.tax{/block} {block name="check-access"}update{/block} {block name="main-content"} {assign oder_tab {$smarty.get.tab|default:$smarty.post.tab|default:'data'}} {assign asked_country {$smarty.get.country|default:{country ask="default" attr="id"}}}
{loop type="tax-rule" name="tax-rule" id=$tax_rule_id backend_context="1" lang=$edit_language_id}
{form name="thelia.admin.taxrule.modification"}
{include file = "includes/inner-form-toolbar.html" hide_submit_buttons = false page_url = {url path="/admin/configuration/taxes_rules/update/$tax_rule_id" tab=data} close_url = {url path="/admin/configuration/taxes_rules"} } {* Be sure to get the product ID, even if the form could not be validated *} {form_hidden_fields form=$form} {form_field form=$form field='success_url'} {/form_field} {form_field form=$form field='locale'} {/form_field} {if $form_error}
{$form_error_message}
{/if} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='description'}
{/form_field}

{intl l='Tax rule created on %date_create. Last modification: %date_change' date_create={format_date date=$CREATE_DATE} date_change={format_date date=$UPDATE_DATE}}

{/form}
{intl l="Manage taxes"}

{intl l="Countries that have the same tax rule"} :

{$matchedCountries.first=$asked_country} {loop type="tax-rule-country" name="same-country-list" tax_rule=$ID ask="countries" country=$asked_country} {$matchedCountries[]=$COUNTRY} {$COUNTRY_TITLE} {/loop} {elseloop rel="same-country-list"} {intl l="NONE"} {/elseloop}

{intl l="Manage the tax rule taxes appliance order"}

{assign lastPosition 0} {loop type="tax-rule-country" name="existing-tax-list" tax_rule=$ID country=$asked_country} {if $POSITION != $lastPosition} {assign lastPosition $POSITION} {if $LOOP_COUNT > 1}
{/if}

{intl l="Add tax to this group"}

{/if}
{$TAX_TITLE}
{if $LOOP_COUNT == $LOOP_TOTAL}
{/if} {/loop} {elseloop rel="existing-tax-list"}

{intl l="Add tax to this group"}

{/elseloop}
{intl l="Apply"}

Available taxes

{loop type="tax" name="tax-list" exclude_tax_rule=$ID country=$asked_country}
{$TITLE}
{/loop}
{/loop}
{* Confirmation dialog *} {form name="thelia.admin.taxrule.taxlistupdate"} {if $form_error_message} {$taxUpdateError = true} {else} {$taxUpdateError = false} {/if} {* Capture the dialog body, to pass it to the generic dialog *} {capture "tax_list_update_dialog"} {form_hidden_fields form=$form} {form_field form=$form field='country_list'}

{intl l="Tax rule taxes will be update for the following countries :"}

{/form_field} {module_include location='tax_list_update_form'} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "tax_list_update_dialog" dialog_title = {intl l="Update tax rule taxes"} dialog_body = {$smarty.capture.tax_list_update_dialog nofilter} dialog_ok_label = {intl l="Edit tax rule taxes"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path="/admin/configuration/taxes_rules/saveTaxes"} form_enctype = {form_enctype form=$form} form_error_message = $form_error_message } {/form} {/block} {block name="javascript-initialization"} {javascripts file='assets/js/bootstrap-select/bootstrap-select.js'} {/javascripts} {javascripts file='assets/js/main.js'} {/javascripts} {/block} {block name="javascript-last-call"} {module_include location='tax-rule-edit-js'} {/block}