{extends file="admin-layout.tpl"} {block name="page-title"}{intl l='Edit a customer'}{/block} {block name="check-permissions"}admin.customer.edit{/block} {block name="main-content"}
{loop name="customer_edit" type="customer" current="false" id="$customer_id" backend_context="1" lang="$edit_language_id"}
{intl l="Edit customer $FIRSTNAME $LASTNAME"}
{form name="thelia.customer.modification"}
{* Be sure to get the customer ID, even if the form could not be validated *} {include file="includes/inner-form-toolbar.html" close_url="{url path='/admin/customers'}"} {form_hidden_fields form=$form} {form_field form=$form field='success_url'} {/form_field} {if $form_error}
{$form_error_message}
{/if}

{intl l="Customer informations"}

{form_field form=$form field='title'}
{/form_field} {form_field form=$form field='firstname'}
{/form_field} {form_field form=$form field='lastname'}
{/form_field} {loop name="address" type="address" customer="$customer_id" backend_context="1" default="true"}

{intl l="Default address"}

{form_field form=$form field='address1'}
{/form_field} {form_field form=$form field='address2'}
{/form_field} {form_field form=$form field='address3'}
{/form_field} {form_field form=$form field='zipcode'}
{/form_field} {form_field form=$form field='city'}
{/form_field} {form_field form=$form field='country'}
{/form_field} {/loop}

{intl l="Other addresses"}

{intl l="Address"} {intl l="Actions"}
Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
Twitter, Inc.
795 Folsom Ave, Suite 600
San Francisco, CA 94107
P: (123) 456-7890
{/form}
{/loop} {elseloop rel="customer_edit"}
{intl l="Sorry, customer ID=$customer_id was not found."}
{/elseloop}
{* Add an Address *} {form name="thelia.address.create"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "address_creation_dialog"} {form_hidden_fields form=$form} {form_field form=$form field='label'}
{/form_field} {form_field form=$form field='company'}
{/form_field} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='firstname'}
{/form_field} {form_field form=$form field='lastname'}
{/form_field} {form_field form=$form field='address1'}
{form_field form=$form field='address2'} {/form_field}
{form_field form=$form field='address3'} {/form_field}
{/form_field} {form_field form=$form field='zipcode'}
{/form_field} {form_field form=$form field='city'}
{/form_field} {form_field form=$form field='country'}
{/form_field} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "address_creation_dialog" dialog_title = {intl l="Create an address"} dialog_body = {$smarty.capture.address_creation_dialog nofilter} dialog_ok_label = {intl l="Create this address"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path='/admin/address/create'} form_enctype = {form_enctype form=$form} form_error_message = $form_error_message } {/form} {* Update an Address *} {form name="thelia.address.update"} {* Capture the dialog body, to pass it to the generic dialog *} {capture "edit_address_dialog"} {form_hidden_fields form=$form} {form_field form=$form field='label'}
{/form_field} {form_field form=$form field='company'}
{/form_field} {form_field form=$form field='title'}
{/form_field} {form_field form=$form field='firstname'}
{/form_field} {form_field form=$form field='lastname'}
{/form_field} {form_field form=$form field='address1'}
{form_field form=$form field='address2'} {/form_field}
{form_field form=$form field='address3'} {/form_field}
{/form_field} {form_field form=$form field='zipcode'}
{/form_field} {form_field form=$form field='city'}
{/form_field} {form_field form=$form field='country'}
{/form_field} {/capture} {include file = "includes/generic-create-dialog.html" dialog_id = "edit_address_dialog" dialog_title = {intl l="Edit an address"} dialog_body = {$smarty.capture.edit_address_dialog nofilter} dialog_ok_label = {intl l="Edit this address"} dialog_cancel_label = {intl l="Cancel"} form_action = {url path='/admin/address/update'} form_enctype = {form_enctype form=$form} form_error_message = $form_error_message } {/form} {* Default confirmation dialog *} {capture "use_address_dialog"} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "use_address_dialog" dialog_title = {intl l="Use address by default"} dialog_message = {intl l="Do you really want to use this address by default ?"} form_action = {url path='/admin/address/use'} form_content = {$smarty.capture.use_address_dialog nofilter} } {* Delete confirmation dialog *} {capture "delete_address_dialog"} {/capture} {include file = "includes/generic-confirm-dialog.html" dialog_id = "delete_address_dialog" dialog_title = {intl l="Delete address"} dialog_message = {intl l="Do you really want to delete this address ?"} form_action = {url path='/admin/address/delete'} form_content = {$smarty.capture.delete_dialog nofilter} } {/block} {block name="javascript-initialization"} {javascripts file='assets/js/main.js'} {/javascripts} {/block}