152 lines
9.7 KiB
HTML
152 lines
9.7 KiB
HTML
{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"}
|
|
<div class="customers edit-customer">
|
|
|
|
<div id="wrapper" class="container">
|
|
|
|
{loop name="customer_edit" type="customer" current="false" id="$customer_id" backend_context="1" lang="$edit_language_id"}
|
|
|
|
<ul class="breadcrumb">
|
|
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
|
<li><a href="{url path='/admin/customers'}">{intl l="Customers"}</a></li>
|
|
<li>{intl l='Editing customer "%name"' name="{$FIRSTNAME} {$LASTNAME}"}</li>
|
|
</ul>
|
|
|
|
<div class="row">
|
|
<div class="col-md-12 general-block-decorator">
|
|
<div class="row">
|
|
|
|
<div class="col-md-12 title title-without-tabs">
|
|
{intl l="Edit customer $FIRSTNAME $LASTNAME"}
|
|
</div>
|
|
|
|
<div class="form-container">
|
|
<div class="col-md-12">
|
|
|
|
{form name="thelia.customer.modification"}
|
|
<form method="POST" action="{url path='/admin/customers/save'}" {form_enctype form=$form} class="clearfix">
|
|
|
|
{* Be sure to get the customer ID, even if the form could not be validated *}
|
|
<input type="hidden" name="customer_id" value="{$customer_id}" />
|
|
|
|
{include file="includes/inner-form-toolbar.html"}
|
|
|
|
{form_hidden_fields form=$form}
|
|
|
|
{form_field form=$form field='success_url'}
|
|
<input type="hidden" name="{$name}" value="{url path='/admin/customers'}" />
|
|
{/form_field}
|
|
|
|
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
|
|
|
<div class="col-md-6">
|
|
|
|
{form_field form=$form field='title'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
|
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
|
{loop type="title" name="title1"}
|
|
<option value="{$ID}">{$LONG}</option>
|
|
{/loop}
|
|
</select>
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='firstname'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Firstname'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='lastname'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{intl l="{$label}"}" placeholder="{intl l='Lastname'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
</div>
|
|
|
|
<div class="col-md-6">
|
|
{loop name="address" type="address" customer="$customer_id" backend_context="1"}
|
|
|
|
{form_field form=$form field='address1'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS1}" title="{intl l="{$label}"}" placeholder="{intl l='Address'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='address2'}
|
|
<div class="form-group">
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS2}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='address3'}
|
|
<div class="form-group">
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS3}" title="{intl l="{$label}"}" placeholder="{intl l='Additional address'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='zipcode'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ZIPCODE}" title="{intl l="{$label}"}" placeholder="{intl l='Zip code'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='city'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$CITY}" title="{intl l="{$label}"}" placeholder="{intl l='City'}">
|
|
</div>
|
|
{/form_field}
|
|
|
|
{form_field form=$form field='country'}
|
|
<div class="form-group {if $error}has-error{/if}">
|
|
<label for="{$label_attr.for}" class="control-label">{intl l="{$label}"} : </label>
|
|
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
|
{loop type="country" name="country1"}
|
|
<option value="{$ID}">{$TITLE}</option>
|
|
{/loop}
|
|
</select>
|
|
</div>
|
|
{/form_field}
|
|
|
|
{/loop}
|
|
</div>
|
|
|
|
</form>
|
|
{/form}
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
</div>
|
|
|
|
</div>
|
|
|
|
{/loop}
|
|
|
|
{elseloop rel="customer_edit"}
|
|
<div class="row">
|
|
<div class="col-md-12">
|
|
<div class="alert alert-error">
|
|
{intl l="Sorry, customer ID=$customer_id was not found."}
|
|
</div>
|
|
</div>
|
|
</div>
|
|
{/elseloop}
|
|
|
|
</div>
|
|
</div>
|
|
{/block} |