{extends file="admin-layout.tpl"} {block name="after-bootstrap-css"} {/block} {block name="no-return-functions"} {$admin_current_location = 'sales'} {/block} {block name="page-title"}{intl l='Change sale configuration'}{/block} {block name="check-resource"}admin.sales{/block} {block name="check-access"}update{/block} {block name="main-content"}
{loop type="sale" name="sale" active='*' id=$sale_id backend_context="1" lang=$edit_language_id} {hook name="sale-edit.top" sale_id=$sale_id}
{form name="thelia.admin.sale.modification"}
{include file = "includes/inner-form-toolbar.html" hide_submit_buttons = false page_url = {url path="/admin/sale/update/%id" id=$ID} close_url = {url path="/admin/sales"} } {* Be sure to get the sale ID, even if the form could not be validated *} {form_hidden_fields} {render_form_field field="success_url" value={url path="/admin/sales"}} {render_form_field field="locale" value={$edit_language_locale}} {if $form_error}
{$form_error_message}
{/if}

{intl l='Sale operation features'}

{render_form_field field='label'}
{render_form_field field='active'} {render_form_field field='display_initial_price'} {custom_render_form_field field='start_date'} {* data-date-format is a moment.js date format *}
{/custom_render_form_field} {custom_render_form_field field='end_date'}
{/custom_render_form_field}
{render_form_field field='price_offset_type'}
{loop type="currency" name="sale.currencies" backend_context="1" lang=$edit_language_id} {$aff=($LOOP_COUNT == 1)} {custom_render_form_field field='price_offset' value_key=$ID show_label=$aff}
{intl l='For prices in %currency' currency={$SYMBOL}}
{/custom_render_form_field} {/loop}

{intl l='You can define here a specific price offset for each of the shop currencies, as a percentage or a constant amount, depending on the selected offset type.'}

{intl l='Sale operation description'}

{include file="includes/standard-description-form-fields.html"}

{intl l='Products selection'}

{form_field field="categories"}
{/form_field}
{form_field field="categories"}
{/form_field}

{intl l='Products'}

{intl l="Please wait, loading products list"}
{* Loaded through Ajax *}
{include file = "includes/inner-form-toolbar.html" hide_submit_buttons = false hide_flags = true page_bottom = true page_url = {url path="/admin/sale/update/%id" id=$ID} close_url = {url path="/admin/sales"} }
{/form}

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

{hook name="sale-edit.bottom" sale_id=$sale_id} {/loop}
{/block} {block name="javascript-initialization"} {javascripts file='assets/js/moment-with-locales.min.js'} {/javascripts} {javascripts file='assets/js/bootstrap-datetimepicker/bootstrap-datetimepicker.min.js'} {/javascripts} {/block} {block name="javascript-last-call"} {hook name="sale.edit-js" location='sale-edit-js' sale_id={$sale_id}} {hook name="wysiwyg.js" location="wysiwyg-sale-edit-js" } {/block}