Merge branch 'master' of github.com:thelia/thelia
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -4,9 +4,12 @@
|
||||
{check_auth role="ADMIN" resource="{block name="check-resource"}{/block}" access="{block name="check-access"}{/block}" login_tpl="/admin/login"}
|
||||
{/block}
|
||||
|
||||
{* -- Define some stuff for Smarty ----------------------------------------- *}
|
||||
{* -- Define some stuff for Smarty ------------------------------------------ *}
|
||||
{config_load file='variables.conf'}
|
||||
|
||||
{* -- Declare assets directory, relative to template base directory --------- *}
|
||||
{declare_assets directory='assets'}
|
||||
|
||||
<!DOCTYPE html>
|
||||
<html lang="{$lang_code}">
|
||||
<head>
|
||||
@@ -22,7 +25,7 @@
|
||||
|
||||
{block name="before-bootstrap-css"}{/block}
|
||||
|
||||
{stylesheets file='assets/less/*' filters='less,cssembed'}
|
||||
{stylesheets file='assets/less/main.less' filters='less'}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
|
||||
|
||||
@@ -1,111 +0,0 @@
|
||||
{* Update an Address *}
|
||||
|
||||
{form name="thelia.admin.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'}
|
||||
<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="{$value}" title="{intl l={$label} }" placeholder="{intl l='Label'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='company'}
|
||||
<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="{$value}" title="{intl l={$label}}" placeholder="{intl l='Company'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{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}" {if $value == $ID}selected{/if}>{$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="{$value}" 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="{$value}" title="{intl l={$label}}" placeholder="{intl l='Lastname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{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="{$value}" title="{intl l={$label}}" placeholder="{intl l='Address'}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address2'}
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address3'}
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{intl l={$label}}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</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="{$value}" 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="{$value}" 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}" {if $value == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/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/save/{$address_id}"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form}
|
||||
@@ -2,4 +2,4 @@
|
||||
@import "bootstrap/bootstrap.less";
|
||||
|
||||
/* Thelia Admin */
|
||||
@import "thelia/thelia.less";
|
||||
@import "thelia/thelia.less";
|
||||
|
||||
@@ -9,7 +9,6 @@
|
||||
<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">
|
||||
@@ -30,18 +29,21 @@
|
||||
<div class="col-md-12">
|
||||
|
||||
{form name="thelia.admin.customer.update"}
|
||||
<form method="POST" action="{url path="/admin/customer/update/{$ID}"}" {form_enctype form=$form} class="clearfix">
|
||||
<form method="POST" action="{url path='/admin/customer/save'}" {form_enctype form=$form} class="clearfix">
|
||||
|
||||
<div class="row inner-toolbar clearfix">
|
||||
<div class="col-md-6 inner-actions pull-right">
|
||||
<button type="submit" name="save_mode" value="stay" class="btn btn-default btn-primary" title="{intl l='Save'}">{intl l='Save'} <span class="glyphicon glyphicon-ok"></span></button>
|
||||
<button type="submit" name="save_mode" value="close" class="btn btn-default btn-info" title="{intl l='Save and close'}">{intl l='Save and close'} <span class="glyphicon glyphicon-remove"></span></button>
|
||||
</div>
|
||||
</div>
|
||||
{form_hidden_fields form=$form}
|
||||
{include
|
||||
file="includes/inner-form-toolbar.html"
|
||||
hide_flags = true
|
||||
close_url = {url path='/admin/customers'}
|
||||
}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
<input type="hidden" name="page" value="{$page}" />
|
||||
<input type="hidden" name="customer_id" value="{$customer_id}" />
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/customer/update/{$ID}"}" />
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/customers' page=$page}" />
|
||||
{/form_field}
|
||||
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
@@ -51,7 +53,7 @@
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
{loop type="title" name="title1" backend_context="1"}
|
||||
@@ -63,15 +65,29 @@
|
||||
|
||||
{form_field form=$form field='firstname'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$FIRSTNAME}" title="{$label}" placeholder="{intl l='Firstname'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$LASTNAME}" title="{$label}" placeholder="{intl l='Lastname'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='email'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='password'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} (leave blank to keep current customer password) {if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Password'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
@@ -81,50 +97,50 @@
|
||||
|
||||
{form_field form=$form field='company'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$COMPANY}" title="{$label}" placeholder="{intl l='Company'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Company'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='address1'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ADDRESS1}" title="{$label}" placeholder="{intl l='Address'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$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="{$label}" placeholder="{intl l='Additional address'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$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="{$label}" placeholder="{intl l='Additional address'}">
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$ZIPCODE}" title="{$label}" placeholder="{intl l='Zip code'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$CITY}" title="{$label}" placeholder="{intl l='City'}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$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">{$label} : </label>
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
{loop type="country" name="country1"}
|
||||
<option value="{$ID}" {if $ID == $COUNTRY}selected{/if}>{$TITLE}</option>
|
||||
<option value="{$ID}" {if {$value} == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
@@ -149,13 +165,14 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th>{intl l="Address"}</th>
|
||||
<th>{intl l="Actions"}</th>
|
||||
<th class="text-center">{intl l="Actions"}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{loop name="address" type="address" customer="$customer_id" backend_context="1" default="0"}
|
||||
<tr>
|
||||
<td>
|
||||
{$LABEL}
|
||||
<address>
|
||||
<strong>{loop name="address.title" type="title" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</strong><br>
|
||||
{$ADDRESS1}
|
||||
@@ -166,21 +183,21 @@
|
||||
<br>{$TITLE}
|
||||
{/loop}
|
||||
{if $PHONE}
|
||||
<br> <abbr title="{intl l="Phone"}">P:</abbr>{$PHONE}
|
||||
<br>{intl l="Phone"}: {$PHONE}
|
||||
{/if}
|
||||
{if $CELLPHONE}
|
||||
<br> <abbr title="{intl l="cell phone"}">P:</abbr>{$CELLPHONE}
|
||||
<br>{intl l="Cellular phone"}: {$CELLPHONE}
|
||||
{/if}
|
||||
</address>
|
||||
</td>
|
||||
<td>
|
||||
<td class="text-center">
|
||||
<div class="btn-group">
|
||||
|
||||
<a class="btn btn-default btn-xs customer-update-address" title="{intl l='Edit this address'}" href="#" data-id="{$ID}">
|
||||
<a class="btn btn-default btn-xs customer-update-address" title="{intl l='Edit this address'}" href="{url path='/admin/address/update' address_id=$ID}">
|
||||
<span class="glyphicon glyphicon-edit"></span>
|
||||
</a>
|
||||
|
||||
<a class="btn btn-default btn-xs customer-address-use" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-id="{$ID}" data-toggle="modal" rel="tooltip">
|
||||
<a class="btn btn-default btn-xs customer-address-use" title="{intl l='Use this address by default'}" href="#use_address_dialog" data-toggle="modal" data-id="{$ID}" data-toggle="modal" rel="tooltip">
|
||||
<span class="glyphicon glyphicon-pushpin"></span>
|
||||
</a>
|
||||
|
||||
@@ -262,168 +279,117 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div id="address-update-modal"></div>
|
||||
{* Add an Address *}
|
||||
{* -- Add an Address -------------------------------------------------------- *}
|
||||
|
||||
{form name="thelia.admin.address.create"}
|
||||
{form name="thelia.admin.address.create"}
|
||||
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "address_creation_dialog"}
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
{capture "address_creation_dialog"}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
<input type="hidden" name="customer_id" value="{$customer_id}">
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/admin/customer/update/{$customer_id}"}" />
|
||||
{/form_field}
|
||||
{form_field form=$form field='label'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Label'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
{include file='includes/customer_address_form_fields.html' customer_id=$customer_id page=$page}
|
||||
|
||||
{form_field form=$form field='company'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Company'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
|
||||
{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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Firstname'}" required>
|
||||
</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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='address1'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Address'}" required>
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address2'}
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address3'}
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Zip code'}" required>
|
||||
</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">{$label} : </label>
|
||||
<input type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='City'}" required>
|
||||
</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">{$label} : </label>
|
||||
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
|
||||
{loop type="country" name="country1"}
|
||||
<option value="{$ID}">{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/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}
|
||||
|
||||
|
||||
|
||||
|
||||
{* Default confirmation dialog *}
|
||||
|
||||
{capture "use_address_dialog"}
|
||||
<input type="hidden" name="address_id" id="address_use_id" value="" />
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
file = "includes/generic-create-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 ?"}
|
||||
dialog_id = "address_creation_dialog"
|
||||
dialog_title = {intl l="Create a customer address"}
|
||||
dialog_body = {$smarty.capture.address_creation_dialog nofilter}
|
||||
|
||||
form_action = {url path='/admin/address/use'}
|
||||
form_content = {$smarty.capture.use_address_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
|
||||
}
|
||||
|
||||
{* Delete confirmation dialog *}
|
||||
{/form}
|
||||
|
||||
{capture "delete_address_dialog"}
|
||||
<input type="hidden" name="address_id" id="address_delete_id" value="" />
|
||||
{/capture}
|
||||
{* -- Update an Address ----------------------------------------------------- *}
|
||||
|
||||
{include
|
||||
file = "includes/generic-confirm-dialog.html"
|
||||
{if $address_id > 0}
|
||||
{form name="thelia.admin.address.update"}
|
||||
|
||||
dialog_id = "delete_address_dialog"
|
||||
dialog_title = {intl l="Delete address"}
|
||||
dialog_message = {intl l="Do you really want to delete this address ?"}
|
||||
{* Capture the dialog body, to pass it to the generic dialog *}
|
||||
|
||||
form_action = {url path='/admin/address/delete'}
|
||||
form_content = {$smarty.capture.delete_address_dialog nofilter}
|
||||
}
|
||||
{capture "address_update_dialog"}
|
||||
<input type="hidden" name="address_id" id="address_update_id" value="{$address_id}" />
|
||||
|
||||
{include file='includes/customer_address_form_fields.html' customer_id=$customer_id page=$page}
|
||||
|
||||
{/capture}
|
||||
|
||||
{include
|
||||
file = "includes/generic-create-dialog.html"
|
||||
|
||||
dialog_id = "address_update_dialog"
|
||||
dialog_title = {intl l="Edit a customer address"}
|
||||
dialog_body = {$smarty.capture.address_update_dialog nofilter}
|
||||
|
||||
dialog_ok_label = {intl l="Save this address"}
|
||||
dialog_cancel_label = {intl l="Cancel"}
|
||||
|
||||
form_action = {url path="/admin/address/save"}
|
||||
form_enctype = {form_enctype form=$form}
|
||||
form_error_message = $form_error_message
|
||||
}
|
||||
|
||||
{/form}
|
||||
{/if}
|
||||
|
||||
{* -- Confirm making an address the default --------------------------------- *}
|
||||
|
||||
{capture "use_address_dialog"}
|
||||
<input type="hidden" name="address_id" id="address_use_id" value="" />
|
||||
|
||||
<input type="hidden" name="customer_id" value="{$customer_id}">
|
||||
<input type="hidden" name="page" value="{$page}">
|
||||
{/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"}
|
||||
<input type="hidden" name="address_id" id="address_delete_id" value="" />
|
||||
|
||||
<input type="hidden" name="customer_id" value="{$customer_id}">
|
||||
<input type="hidden" name="page" value="{$page}">
|
||||
{/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_address_dialog nofilter}
|
||||
}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
|
||||
{javascripts file='assets/js/main.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
|
||||
<script>
|
||||
(function($) {
|
||||
$(document).ready(function(){
|
||||
$(function() {
|
||||
|
||||
$("a.customer-address-delete").click(function(e){
|
||||
$("#address_delete_id").val($(this).data("id"));
|
||||
});
|
||||
@@ -432,23 +398,29 @@
|
||||
$("#address_use_id").val($(this).data("id"));
|
||||
});
|
||||
|
||||
$("a.customer-update-address").click(function(e){
|
||||
var baseUrl = "{url path="/admin/address/update/"}";
|
||||
$('body').append('<div class="modal-backdrop fade in" id="loading-event"><div class="loading"></div></div>');
|
||||
$.ajax({
|
||||
method: 'get',
|
||||
url: baseUrl+$(this).data('id')
|
||||
}).done(function(data){
|
||||
$("#loading-event").remove();
|
||||
$("#address-update-modal").html(data);
|
||||
$("#edit_address_dialog").modal("show");
|
||||
});
|
||||
});
|
||||
// JS stuff for creation form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "address_creation_dialog"
|
||||
form_name = "thelia.admin.address.create"
|
||||
}
|
||||
|
||||
$(document).on("hidden.bs.modal", "#edit_address_dialog", function(ev){
|
||||
$("#edit_address_dialog").remove();
|
||||
});
|
||||
|
||||
// If $address_id is defined, show the edit dialog
|
||||
{if $address_id > 0}
|
||||
|
||||
// JS stuff for update form
|
||||
{include
|
||||
file = "includes/generic-js-dialog.html"
|
||||
dialog_id = "address_update_dialog"
|
||||
form_name = "thelia.admin.address.update"
|
||||
}
|
||||
|
||||
$('#address_update_dialog').modal();
|
||||
{/if}
|
||||
});
|
||||
})(jQuery);
|
||||
</script>
|
||||
{/block}
|
||||
@@ -7,9 +7,6 @@
|
||||
{block name="check-access"}view{/block}
|
||||
|
||||
{block name="main-content"}
|
||||
{assign var=customer_page value={$smarty.get.page|default:1}}
|
||||
|
||||
|
||||
<div class="customer">
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
@@ -41,27 +38,83 @@
|
||||
<thead>
|
||||
<tr>
|
||||
<th class="object-title">
|
||||
{intl l="customer ref"}
|
||||
{admin_sortable_header
|
||||
current_order=$customer_order
|
||||
order='reference'
|
||||
reverse_order='reference_reverse'
|
||||
path={url path='/admin/customers'}
|
||||
request_parameter_name='customer_order'
|
||||
label="{intl l='Reference'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
{module_include location='category_list_header'}
|
||||
{module_include location='customer_list_header'}
|
||||
|
||||
<th>
|
||||
{intl l="firstname & lastname"}
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$customer_order
|
||||
order='lastname'
|
||||
reverse_order='lastname_reverse'
|
||||
path={url path='/admin/customers'}
|
||||
request_parameter_name='customer_order'
|
||||
label="{intl l='Last name'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>
|
||||
{intl l="last order"}
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$customer_order
|
||||
order='firstname'
|
||||
reverse_order='firstname_reverse'
|
||||
path={url path='/admin/customers'}
|
||||
request_parameter_name='customer_order'
|
||||
label="{intl l='First name'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th>{intl l='order amount'}</th>
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$customer_order
|
||||
order='registration_date'
|
||||
reverse_order='registration_date_reverse'
|
||||
path={url path='/admin/customers'}
|
||||
request_parameter_name='customer_order'
|
||||
label="{intl l='Registration date'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="object-title">{intl l='Date of last order'}</th>
|
||||
<th class="object-title">{intl l='Last order amount'}</th>
|
||||
|
||||
{* TODO
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$customer_order
|
||||
order='last_order'
|
||||
reverse_order='last_order_reverse'
|
||||
path={url path='/admin/customers'}
|
||||
request_parameter_name='customer_order'
|
||||
label="{intl l='Date of last order'}"
|
||||
}
|
||||
</th>
|
||||
|
||||
<th class="object-title">
|
||||
{admin_sortable_header
|
||||
current_order=$customer_order
|
||||
order='order_amount'
|
||||
reverse_order='order_amount_reverse'
|
||||
path={url path='/admin/customers'}
|
||||
request_parameter_name='customer_order'
|
||||
label="{intl l='Last order amount'}"
|
||||
}
|
||||
</th>
|
||||
*}
|
||||
<th class="actions">{intl l='Actions'}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
||||
<tbody>
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" backend_context="1" page={$customer_page} limit={$display_customer}}
|
||||
{loop name="customer_list" type="customer" current="false" visible="*" order=$customer_order backend_context="1" page=$page limit=$display_customer}
|
||||
{assign "lastOrderDate" ''}
|
||||
{assign "lastOrderAmount" ''}
|
||||
{assign "lastOrderCurrency" ''}
|
||||
@@ -75,14 +128,23 @@
|
||||
{/loop}
|
||||
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
|
||||
<td><a href="{url path="/admin/customer/update" customer_id=$ID page=$page}">{$REF}</a></td>
|
||||
|
||||
<td class="object-title">
|
||||
{$FIRSTNAME} {$LASTNAME}
|
||||
{$LASTNAME}
|
||||
</td>
|
||||
|
||||
<td class="object-title">
|
||||
{$FIRSTNAME}
|
||||
</td>
|
||||
|
||||
|
||||
{module_include location='customer_list_row'}
|
||||
|
||||
<td>
|
||||
{format_date date=$CREATE_DATE}
|
||||
</td>
|
||||
|
||||
<td>
|
||||
{$lastOrderDate}
|
||||
</td>
|
||||
@@ -94,7 +156,7 @@
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path='/admin/customer/update' customer_id=$ID page=$page}"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_send_mail" role="ADMIN" resource="admin.customer" access="VIEW"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
|
||||
@@ -111,10 +173,10 @@
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colspan="6">
|
||||
|
||||
|
||||
<div class="text-center">
|
||||
<ul class="pagination pagination-centered">
|
||||
{if $customer_page != 1}
|
||||
{if $page != 1}
|
||||
<li><a href="{url path="/admin/customers" page="1"}">«</a></li>
|
||||
{else}
|
||||
<li class="disabled"><a href="#">«</a></li>
|
||||
@@ -137,7 +199,7 @@
|
||||
{/if}
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
@@ -163,7 +225,7 @@
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
{* on success, redirect to the edition page, _ID_ is replaced with the created object ID, see controller *}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/customer/update/_ID_'}" />
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/customer/update' customer_id='_ID_'}" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field="password"}
|
||||
@@ -283,7 +345,7 @@
|
||||
{* Delete confirmation dialog *}
|
||||
|
||||
{capture "delete_customer_dialog"}
|
||||
<input type="hidden" name="customer_page" value="{$customer_page}">
|
||||
<input type="hidden" name="page" value="{$page}">
|
||||
<input type="hidden" name="customer_id" id="delete_customer_id">
|
||||
{/capture}
|
||||
|
||||
|
||||
@@ -0,0 +1,123 @@
|
||||
{* Customer address creation / modification fields, used in the customer-edit.html template *}
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
<input type="hidden" name="customer_id" value="{$customer_id}">
|
||||
<input type="hidden" name="page" value="{$page}">
|
||||
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path='/admin/customer/update'} customer_id=$customer_id page=$page" />
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='label'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{$label}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='company'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Company'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
{form_field form=$form field='title'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
|
||||
<select {if $required}required{/if} name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
{loop type="title" name="title1"}
|
||||
<option value="{$ID}" {if $value == $ID}selected{/if}>{$LONG}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='firstname'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Firstname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='lastname'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Lastname'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='address1'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Address'}">
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address2'}
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</div>
|
||||
|
||||
<div class="form-group">
|
||||
{form_field form=$form field='address3'}
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Additional address'}">
|
||||
{/form_field}
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
{form_field form=$form field='zipcode'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Zip code'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-9">
|
||||
{form_field form=$form field='city'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='City'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='country'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<select {if $required}required{/if} name="{$name}" id="{$label_attr.for}" class="form-control">
|
||||
{loop type="country" name="country1"}
|
||||
<option value="{$ID}" {if $value == $ID}selected{/if}>{$TITLE}</option>
|
||||
{/loop}
|
||||
</select>
|
||||
</div>
|
||||
{/form_field}
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='phone'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Phone number'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
{form_field form=$form field='cellphone'}
|
||||
<div class="form-group {if $error}has-error{/if}">
|
||||
<label for="{$label_attr.for}" class="control-label">{$label}{if $required} <span class="required">*</span>{/if} : </label>
|
||||
<input {if $required}required{/if} type="text" id="{$label_attr.for}" name="{$name}" class="form-control" value="{$value}" title="{$label}" placeholder="{intl l='Cellular phone number'}">
|
||||
</div>
|
||||
{/form_field}
|
||||
</div>
|
||||
</div>
|
||||
@@ -65,7 +65,7 @@
|
||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$orderInvoiceCompany}</td>
|
||||
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
|
||||
@@ -122,7 +122,7 @@
|
||||
</tfoot>
|
||||
|
||||
{/ifloop}
|
||||
|
||||
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
@@ -9,7 +9,7 @@
|
||||
<div class="modules">
|
||||
|
||||
<div id="wrapper" class="container">
|
||||
|
||||
|
||||
<div class="clearfix">
|
||||
<ul class="breadcrumb pull-left">
|
||||
<li><a href="{url path='/admin/home'}">{intl l="Home"}</a></li>
|
||||
@@ -68,7 +68,7 @@
|
||||
{/loop}
|
||||
|
||||
<tr>
|
||||
<td><a href="{url path="/admin/customer/update/{$ID}"}">{$REF}</a></td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$ID}">{$REF}</a></td>
|
||||
|
||||
<td>
|
||||
{$COMPANY}
|
||||
@@ -91,7 +91,7 @@
|
||||
<div class="btn-group">
|
||||
|
||||
{loop type="auth" name="can_change" role="ADMIN" resource="admin.customer" access="UPDATE"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path="/admin/customer/update/{$ID}" }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
<a class="btn btn-default btn-xs" title="{intl l='Edit this customer'}" href="{url path='/admin/customer/update' customer_id=$ID }"><i class="glyphicon glyphicon-edit"></i></a>
|
||||
{/loop}
|
||||
{loop type="auth" name="can_send_mail" role="ADMIN" resource="admin.customer" access="VIEW"}
|
||||
<a class="btn btn-default btn-xs" title="{intl l="Send a mail to this customer"}" href="mailto:{$EMAIL}"><span class="glyphicon glyphicon-envelope"></span></a>
|
||||
@@ -148,7 +148,7 @@
|
||||
<td><a href="{url path="/admin/order/update/$ID"}">{$REF}</a></td>
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{$orderInvoiceCompany}</td>
|
||||
<td><a href="{url path="/admin/customer/update/$CUSTOMER"}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td><a href="{url path='/admin/customer/update' customer_id=$CUSTOMER}">{$orderInvoiceFirstName|ucwords} {$orderInvoiceLastName|upper}</a></td>
|
||||
<td>{$TOTAL_TAXED_AMOUNT}</td>
|
||||
<td><span class="label label-{#$orderStatusLabel#}">{$orderStatus}</span></td>
|
||||
|
||||
|
||||
@@ -44,7 +44,7 @@ return array(
|
||||
'Date' => 'Date',
|
||||
'Delete address' => 'Delete address',
|
||||
'Delivery address' => 'Delivery address',
|
||||
'Delivery Informations' => 'Delivery Informations',
|
||||
'Delivery Information' => 'Delivery Information',
|
||||
'Demo product description' => 'Demo product description',
|
||||
'Demo product title' => 'Demo product title',
|
||||
'Description' => 'Description',
|
||||
@@ -105,7 +105,7 @@ return array(
|
||||
'Password Forgotten' => 'Password Forgotten',
|
||||
'Password' => 'Password',
|
||||
'per page' => 'per page',
|
||||
'Personal Informations' => 'Personal Informations',
|
||||
'Personal Information' => 'Personal Information',
|
||||
'Placeholder address label' => 'Home, Work office, other',
|
||||
'Placeholder address1' => '76 Ninth Avenue',
|
||||
'Placeholder address2' => 'Address',
|
||||
|
||||
@@ -44,7 +44,7 @@ return array(
|
||||
'Date' => '',
|
||||
'Delete address' => '',
|
||||
'Delivery address' => '',
|
||||
'Delivery Informations' => '',
|
||||
'Delivery Information' => '',
|
||||
'Demo product description' => '',
|
||||
'Demo product title' => '',
|
||||
'Description' => '',
|
||||
@@ -105,7 +105,7 @@ return array(
|
||||
'Password Forgotten' => '',
|
||||
'Password' => '',
|
||||
'per page' => '',
|
||||
'Personal Informations' => '',
|
||||
'Personal Information' => '',
|
||||
'Placeholder address label' => '',
|
||||
'Placeholder address1' => '',
|
||||
'Placeholder address2' => '',
|
||||
|
||||
@@ -44,7 +44,7 @@ return array(
|
||||
'Date' => 'Date',
|
||||
'Delete address' => 'Supprimer cette adresse',
|
||||
'Delivery address' => 'Adresse de livraison',
|
||||
'Delivery Informations' => 'Informations de livraison',
|
||||
'Delivery Information' => 'Informations de livraison',
|
||||
'Demo product description' => 'Example de description de produit',
|
||||
'Demo product title' => 'Example de titre',
|
||||
'Description' => 'Description',
|
||||
@@ -108,7 +108,6 @@ return array(
|
||||
'Password' => 'Mot de passe',
|
||||
'per page' => 'par page',
|
||||
'Personal Information' => 'Informations personnelles',
|
||||
'Personal Informations' => 'Informations personnelles',
|
||||
'Placeholder address label' => 'Maison, Domicile, Travail...',
|
||||
'Placeholder address1' => 'Adresse',
|
||||
'Placeholder address2' => '',
|
||||
|
||||
@@ -44,7 +44,7 @@ return array(
|
||||
'Date' => '',
|
||||
'Delete address' => '',
|
||||
'Delivery address' => '',
|
||||
'Delivery Informations' => '',
|
||||
'Delivery Information' => '',
|
||||
'Demo product description' => '',
|
||||
'Demo product title' => '',
|
||||
'Description' => '',
|
||||
@@ -105,7 +105,7 @@ return array(
|
||||
'Password Forgotten' => '',
|
||||
'Password' => '',
|
||||
'per page' => '',
|
||||
'Personal Informations' => '',
|
||||
'Personal Information' => '',
|
||||
'Placeholder address label' => '',
|
||||
'Placeholder address1' => '',
|
||||
'Placeholder address2' => '',
|
||||
|
||||
@@ -25,7 +25,7 @@
|
||||
<h1 id="main-label" class="page-header">{intl l="Change Password"}</h1>
|
||||
|
||||
{form name="thelia.front.customer.password.update"}
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/account/password"}" method="post" role="form">
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/account/password"}" method="post">
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/account"}" />
|
||||
{/form_field}
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<h1 id="main-label" class="page-header">{intl l="Update Profile"}</h1>
|
||||
|
||||
{form name="thelia.front.customer.profile.update"}
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/account/update"}" method="post" role="form">
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/account/update"}" method="post">
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/account"}" />
|
||||
{/form_field}
|
||||
@@ -35,7 +35,7 @@
|
||||
|
||||
<fieldset id="register-info" class="panel">
|
||||
<div class="panel-heading">
|
||||
{intl l="Personal Informations"}
|
||||
{intl l="Personal Information"}
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
@@ -26,7 +26,7 @@
|
||||
<div class="panel-heading">
|
||||
<h4 class="panel-title">
|
||||
<a class="accordion-toggle" data-toggle="collapse" data-parent="#account" href="#account-info">
|
||||
{intl l="Personal Informations"}
|
||||
{intl l="Personal Information"}
|
||||
</a>
|
||||
</h4>
|
||||
</div>
|
||||
@@ -158,7 +158,7 @@
|
||||
<td>{format_date date=$CREATE_DATE}</td>
|
||||
<td>{format_number number=$TOTAL_TAXED_AMOUNT} {loop type="currency" name="order.currency" id={$CURRENCY}}{$SYMBOL}{/loop}</td>
|
||||
<td><span class="label-delivered">{loop type="order-status" name="order.status" id={$STATUS}}{$TITLE}{/loop}</span></td>
|
||||
<td><a href="#" class="btn btn-order-details" data-toggle="tooltip" title="{intl l="View order %ref as pdf document" ref={$REF}}"><span class="icon-cloud-download"></span> {intl l="Order details"}</a></td>
|
||||
<td><a href="{url path="/account/order/pdf/delivery/$ID"}" class="btn btn-order-details" data-toggle="tooltip" title="{intl l="View order %ref as pdf document" ref={$REF}}"><span class="icon-cloud-download"></span> {intl l="Order details"}</a></td>
|
||||
</tr>
|
||||
{/loop}
|
||||
|
||||
|
||||
@@ -24,7 +24,7 @@
|
||||
<h1 id="main-label" class="page-header">{intl l="Address Update"}</h1>
|
||||
{form name="thelia.front.address.update"}
|
||||
{loop name="customer.update" type="address" customer="current" id="{$address_id}"}
|
||||
<form id="form-address" class="form-horizontal" action="{url path="/address/update/{$address_id}"}" method="post" role="form">
|
||||
<form id="form-address" class="form-horizontal" action="{url path="/address/update/{$address_id}"}" method="post">
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/account"}" />
|
||||
{/form_field}
|
||||
|
||||
@@ -23,7 +23,7 @@
|
||||
|
||||
<h1 id="main-label" class="page-header">{intl l="Create New Address"}</h1>
|
||||
{form name="thelia.front.address.create"}
|
||||
<form id="form-address" class="form-horizontal" action="{url path="/address/create"}" method="post" role="form">
|
||||
<form id="form-address" class="form-horizontal" action="{url path="/address/create"}" method="post">
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/account"}" />
|
||||
{/form_field}
|
||||
|
||||
@@ -1,22 +1,23 @@
|
||||
/* JQUERY PREVENT CONFLICT */
|
||||
(function($) {
|
||||
(function ($) {
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
/* ------------------------------------------------------------------
|
||||
callback Function -------------------------------------------------- */
|
||||
var confirmCallback = {
|
||||
'address.delete': function($elm){
|
||||
$.post($elm.attr('href'), function(data){
|
||||
if(data.success)
|
||||
'address.delete': function ($elm) {
|
||||
$.post($elm.attr('href'), function (data) {
|
||||
if (data.success) {
|
||||
$elm.closest('tr').remove();
|
||||
else
|
||||
} else {
|
||||
bootbox.alert(data.message);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
/* ------------------------------------------------------------------
|
||||
/* ------------------------------------------------------------------
|
||||
onLoad Function -------------------------------------------------- */
|
||||
$(document).ready(function(){
|
||||
$(document).ready(function () {
|
||||
|
||||
// Loader
|
||||
var $loader = $('<div class="loader"></div>');
|
||||
@@ -24,32 +25,29 @@
|
||||
|
||||
// Display loader if we do ajax call
|
||||
$(document)
|
||||
.ajaxStart(function() { $loader.show(); })
|
||||
.ajaxStop(function(){ $loader.hide(); });
|
||||
.ajaxStart(function () { $loader.show(); })
|
||||
.ajaxStop(function () { $loader.hide(); });
|
||||
|
||||
// Main Navigation Hover
|
||||
$('.nav-main')
|
||||
.on('click.subnav', '[data-toggle=dropdown]', function(event){
|
||||
if($(this).parent().hasClass('open') && $(this).is(event.target))
|
||||
return false;
|
||||
.on('click.subnav', '[data-toggle=dropdown]', function (event) {
|
||||
if ($(this).parent().hasClass('open') && $(this).is(event.target)) { return false; }
|
||||
})
|
||||
.on('mouseenter.subnav', '.dropdown', function(event){
|
||||
if($(this).hasClass('open'))
|
||||
return;
|
||||
.on('mouseenter.subnav', '.dropdown', function () {
|
||||
if ($(this).hasClass('open')) { return; }
|
||||
|
||||
$(this).addClass('open');
|
||||
})
|
||||
.on('mouseleave.subnav', '.dropdown', function(){
|
||||
.on('mouseleave.subnav', '.dropdown', function () {
|
||||
var $this = $(this);
|
||||
|
||||
if(!$this.hasClass('open'))
|
||||
return;
|
||||
if (!$this.hasClass('open')) { return; }
|
||||
|
||||
//This will check if an input child has focus. If no then remove class open
|
||||
if ($this.find(":input:focus").length == 0){
|
||||
if ($this.find(":input:focus").length === 0) {
|
||||
$this.removeClass('open');
|
||||
} else {
|
||||
$this.find(":input:focus").one('blur', function(){
|
||||
$this.find(":input:focus").one('blur', function () {
|
||||
$this.trigger('mouseleave.subnav');
|
||||
});
|
||||
}
|
||||
@@ -61,56 +59,55 @@
|
||||
});
|
||||
|
||||
// Confirm Dialog
|
||||
$(document).on('click.confirm', '[data-confirm]', function (e) {
|
||||
$(document).on('click.confirm', '[data-confirm]', function () {
|
||||
var $this = $(this),
|
||||
href = $this.attr('href'),
|
||||
callback = $this.attr('data-confirm-callback'),
|
||||
title = $this.attr('data-confirm') != '' ? $this.attr('data-confirm') : 'Are you sure?';
|
||||
title = $this.attr('data-confirm') !== '' ? $this.attr('data-confirm') : 'Are you sure?';
|
||||
|
||||
bootbox.confirm(title, function(confirm) {
|
||||
if(confirm){
|
||||
//Check if callback and if it's a function
|
||||
if (callback && $.isFunction(confirmCallback[callback])) {
|
||||
confirmCallback[callback]($this);
|
||||
bootbox.confirm(title, function (confirm) {
|
||||
if (confirm) {
|
||||
//Check if callback and if it's a function
|
||||
if (callback && $.isFunction(confirmCallback[callback])) {
|
||||
confirmCallback[callback]($this);
|
||||
} else {
|
||||
if (href) {
|
||||
window.location.href = href;
|
||||
} else {
|
||||
if(href){
|
||||
window.location.href = href;
|
||||
} else {
|
||||
// If forms
|
||||
var $form = $this.closest("form");
|
||||
if($form.size() > 0){
|
||||
$form.submit();
|
||||
}
|
||||
// If forms
|
||||
var $form = $this.closest("form");
|
||||
if ($form.size() > 0) {
|
||||
$form.submit();
|
||||
}
|
||||
}
|
||||
}
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
return false;
|
||||
});
|
||||
|
||||
// Toolbar
|
||||
var $category_products = $('#category-products');
|
||||
if($category_products.size() > 0){
|
||||
var $category_products = $ ('#category-products');
|
||||
if ($category_products.size() > 0) {
|
||||
var $parent = $category_products.parent();
|
||||
|
||||
$parent.on('click.view-mode', '[data-toggle=view]', function(){
|
||||
if( ($(this).hasClass('btn-grid') && $parent.hasClass('grid')) || ($(this).hasClass('btn-list') && $parent.hasClass('list')))
|
||||
return;
|
||||
$parent.on('click.view-mode', '[data-toggle=view]', function () {
|
||||
if (($(this).hasClass('btn-grid') && $parent.hasClass('grid')) || ($(this).hasClass('btn-list') && $parent.hasClass('list'))) { return; }
|
||||
|
||||
// Add loader effect
|
||||
$loader.show();
|
||||
setTimeout(function(){ $parent.toggleClass('grid').toggleClass('list'); $loader.hide(); }, 400);
|
||||
setTimeout(function () { $parent.toggleClass('grid').toggleClass('list'); $loader.hide(); }, 400);
|
||||
|
||||
return false;
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
// Login
|
||||
var $form_login = $('#form-login');
|
||||
if($form_login.size() > 0) {
|
||||
$form_login.on('change.account', ':radio', function(){
|
||||
if($(this).val() === '0')
|
||||
if ($form_login.size() > 0) {
|
||||
$form_login.on('change.account', ':radio', function () {
|
||||
if ($(this).val() === '0')
|
||||
$('#password', $form_login).val('').prop('disabled', true); // Disabled (new customer)
|
||||
else
|
||||
$('#password', $form_login).prop('disabled', false); // Enabled
|
||||
@@ -119,19 +116,19 @@
|
||||
|
||||
// Mini Newsletter Subscription
|
||||
var $form_newsletter = $('#form-newsletter-mini');
|
||||
if($form_newsletter.size() > 0) {
|
||||
$form_newsletter.on('submit.newsletter', function(){
|
||||
if ($form_newsletter.size() > 0) {
|
||||
$form_newsletter.on('submit.newsletter', function () {
|
||||
|
||||
$.ajax({
|
||||
url: $(this).attr('action'),
|
||||
type: $(this).attr('method'),
|
||||
data: $(this).serialize(),
|
||||
dataType: 'json',
|
||||
success: function(json) {
|
||||
success: function (json) {
|
||||
var $msg = '';
|
||||
if(json.success){
|
||||
if (json.success) {
|
||||
$msg = json.message;
|
||||
}else{
|
||||
} else {
|
||||
$msg = json.message;
|
||||
}
|
||||
bootbox.alert($msg);
|
||||
@@ -153,14 +150,14 @@
|
||||
content: function() {
|
||||
return $('#form-forgotpassword').html();
|
||||
}
|
||||
}).on('click.btn-forgot', function(){
|
||||
}).on('click.btn-forgot', function () {
|
||||
|
||||
$('.btn-forgot').click(function(){
|
||||
$('.btn-forgot').click(function () {
|
||||
alert('click form');
|
||||
return false;
|
||||
});
|
||||
|
||||
$('.btn-close').click(function(){
|
||||
$('.btn-close').click(function () {
|
||||
$forgot_password.popover('hide');
|
||||
});
|
||||
|
||||
@@ -170,11 +167,11 @@
|
||||
*/
|
||||
|
||||
//.Form Filters
|
||||
$('#form-filters').each(function(){
|
||||
$('#form-filters').each(function () {
|
||||
var $form = $(this);
|
||||
|
||||
$form
|
||||
.on('change.filter', ':checkbox', function(){
|
||||
.on('change.filter', ':checkbox', function () {
|
||||
$loader.show();
|
||||
$form.submit();
|
||||
})
|
||||
@@ -182,19 +179,18 @@
|
||||
});
|
||||
|
||||
// Product details Thumbnails
|
||||
$('#product-gallery').each(function(){
|
||||
$('#product-gallery').each(function () {
|
||||
var $item = $('.item', this),
|
||||
$thumbnails = $('.thumbnail', this),
|
||||
$image = $('.product-image > img', this);
|
||||
|
||||
// Show Carousel control if needed
|
||||
if($item.size() > 1){
|
||||
if ($item.size() > 1) {
|
||||
$('#product-thumbnails', this).carousel({interval: false}).find('.carousel-control').show();
|
||||
}
|
||||
|
||||
$(this).on('click.thumbnails', '.thumbnail', function(){
|
||||
if($(this).hasClass('active'))
|
||||
return false;
|
||||
$(this).on('click.thumbnails', '.thumbnail', function () {
|
||||
if ($(this).hasClass('active')) { return false; }
|
||||
|
||||
$image.attr('src',$(this).attr('href'));
|
||||
$thumbnails.removeClass('active');
|
||||
@@ -205,9 +201,9 @@
|
||||
});
|
||||
|
||||
// Payment Method
|
||||
$('#payment-method').each(function(){
|
||||
$('#payment-method').each(function () {
|
||||
var $label = $('label', this);
|
||||
$label.on('change', ':radio', function(){
|
||||
$label.on('change', ':radio', function () {
|
||||
$label.removeClass('active');
|
||||
$label.filter('[for="' + $(this).attr('id') + '"]').addClass('active');
|
||||
}).filter(':has(:checked)').addClass('active');
|
||||
@@ -215,21 +211,14 @@
|
||||
|
||||
// Apply validation
|
||||
$('#form-contact, #form-register, #form-address').validate({
|
||||
highlight: function(element) {
|
||||
highlight: function (element) {
|
||||
$(element).closest('.form-group').addClass('has-error');
|
||||
},
|
||||
unhighlight: function(element) {
|
||||
unhighlight: function (element) {
|
||||
$(element).closest('.form-group').removeClass('has-error');
|
||||
},
|
||||
errorElement: 'span',
|
||||
errorClass: 'help-block'/*,
|
||||
errorPlacement: function(error, element) {
|
||||
if(element.parent('.input-group').length || element.prop('type') === 'checkbox' || element.prop('type') === 'radio'){
|
||||
error.prepend('<i class="icon-remove"></i> ').insertAfter(element.parent());
|
||||
}else{
|
||||
error.prepend('<i class="icon-remove"></i> ').insertAfter(element);
|
||||
}
|
||||
}*/
|
||||
errorClass: 'help-block'
|
||||
});
|
||||
|
||||
|
||||
@@ -240,7 +229,7 @@
|
||||
|
||||
var $btnAddToCart = $(".btn_add_to_cart", $("#form-product-details"));
|
||||
|
||||
var $productMeta = $("#stockInformations");
|
||||
var $productMeta = $("#stock-information");
|
||||
|
||||
var $inStock = $(".in",$productMeta);
|
||||
var $outOfStock = $(".out",$productMeta);
|
||||
@@ -253,14 +242,14 @@
|
||||
// Switch Quantity in product page
|
||||
$("select", $(".product-options")).change(function(){
|
||||
$select_quantity = $(this).find(":selected").attr("data-quantity");
|
||||
var $old_price = $(this).find(":selected").attr("data-old-price");
|
||||
var $old_price = $(this).find(":selected").attr("data-old-price");
|
||||
|
||||
var $best_price = $(this).find(":selected").attr("data-price");
|
||||
var $best_price = $(this).find(":selected").attr("data-price");
|
||||
|
||||
$quantityInput.attr("max", $select_quantity);
|
||||
|
||||
// Show Out Of Stock OR In Stock
|
||||
if($select_quantity == 0){
|
||||
if ($select_quantity == 0) {
|
||||
$btnAddToCart.attr("disabled", true);
|
||||
|
||||
$productMeta.removeClass("in-stock");
|
||||
@@ -271,7 +260,7 @@
|
||||
$outOfStock.show();
|
||||
$inStock.hide();
|
||||
|
||||
}else{
|
||||
} else {
|
||||
$btnAddToCart.attr("disabled", false);
|
||||
|
||||
$productMeta.removeClass("out-of-stock");
|
||||
@@ -283,38 +272,38 @@
|
||||
$outOfStock.hide();
|
||||
}
|
||||
|
||||
if(parseInt($quantityInput.val()) > parseInt($select_quantity)){
|
||||
if (parseInt($quantityInput.val()) > parseInt($select_quantity)) {
|
||||
$quantityInput.val($select_quantity);
|
||||
}
|
||||
|
||||
if($old_price_container.size() > 0 ){
|
||||
if ($old_price_container.size() > 0) {
|
||||
$(".price", $old_price_container).html($old_price);
|
||||
$(".price", $(".special-price")).html($best_price);
|
||||
}else{
|
||||
} else {
|
||||
$(".price", $(".regular-price")).html($best_price);
|
||||
}
|
||||
|
||||
}).change();
|
||||
|
||||
$quantityInput.focusout(function() {
|
||||
$quantityInput.focusout(function () {
|
||||
$quantityInput.attr("max", $select_quantity);
|
||||
if(parseInt($quantityInput.val()) > parseInt($select_quantity)){
|
||||
if (parseInt($quantityInput.val()) > parseInt($select_quantity)) {
|
||||
$quantityInput.val($select_quantity);
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
$(".form-product").submit(function(){
|
||||
$(".form-product").submit(function () {
|
||||
var url_action = $(this).attr("action");
|
||||
var $cartContainer = $(".cart-container");
|
||||
|
||||
$.ajax({type:"POST", data: $(this).serialize(), url:url_action,
|
||||
$.ajax({type: "POST", data: $(this).serialize(), url: url_action,
|
||||
success: function(data){
|
||||
|
||||
$cartContainer.html($(data).html());
|
||||
|
||||
$.ajax({url:"ajax/addCartMessage",
|
||||
success: function(data){
|
||||
success: function (data) {
|
||||
bootbox.dialog({
|
||||
message : data,
|
||||
buttons : {}
|
||||
@@ -322,7 +311,7 @@
|
||||
}
|
||||
});
|
||||
},
|
||||
error: function(){
|
||||
error: function () {
|
||||
console.log('Error.');
|
||||
}
|
||||
});
|
||||
@@ -330,11 +319,11 @@
|
||||
return false;
|
||||
});
|
||||
|
||||
$('#limit-top').change(function(e){
|
||||
$('#limit-top').change(function (e) {
|
||||
window.location = $(this).val()
|
||||
});
|
||||
|
||||
$('#sortby-top').change(function(e){
|
||||
$('#sortby-top').change(function (e) {
|
||||
window.location = $(this).val()
|
||||
});
|
||||
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
|
||||
/* Bootstrap */
|
||||
@import "bootstrap/bootstrap.less";
|
||||
|
||||
@@ -9,4 +8,4 @@
|
||||
@import "thelia/import.less";
|
||||
|
||||
/* Theme */
|
||||
@import "../themes/default/less/import.less";
|
||||
@import "../themes/default/less/import.less";
|
||||
|
||||
@@ -43,6 +43,7 @@
|
||||
|
||||
// Keep old style button
|
||||
&.btn-add-address,
|
||||
&.btn-cart-update,
|
||||
&.btn-coupon,
|
||||
&.btn-filter,
|
||||
&.btn-grid,
|
||||
|
||||
@@ -96,4 +96,10 @@
|
||||
display: block;
|
||||
font-size: 2.2em;
|
||||
}
|
||||
}
|
||||
|
||||
// Qty (js enabled)
|
||||
.js .group-qty {
|
||||
.form-inline .form-group { display: block; }
|
||||
.btn-cart-update { .sr-only; }
|
||||
}
|
||||
@@ -6,6 +6,9 @@
|
||||
// Collapse
|
||||
.no-js .collapse { display: block!important; }
|
||||
|
||||
// Hide carousel arrow if no js
|
||||
.no-js #carousel .carousel-control { display: none; }
|
||||
|
||||
// Loader (Overlay)
|
||||
.loader {
|
||||
position: fixed;
|
||||
|
||||
@@ -78,7 +78,7 @@
|
||||
|
||||
// Icons (Accordion and Dropdown)
|
||||
//.accordion-toggle,
|
||||
.dropdown-toggle {
|
||||
.js .dropdown-toggle {
|
||||
&:after {
|
||||
.icon(@chevron-down);
|
||||
float:right;
|
||||
|
||||
@@ -31,7 +31,7 @@
|
||||
text-transform: uppercase;
|
||||
}
|
||||
|
||||
#stockInformations{
|
||||
#stock-information {
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
@@ -41,3 +41,8 @@
|
||||
> .pagination { margin: 15px 0 0; }
|
||||
}
|
||||
}
|
||||
|
||||
.no-js .toolbar {
|
||||
.limiter,
|
||||
.sort-by { display : none; }
|
||||
}
|
||||
|
||||
@@ -98,13 +98,16 @@
|
||||
</td>
|
||||
<td class="qty">
|
||||
<div class="form-group group-qty">
|
||||
<form action="{url path="/cart/update"}" method="post" role="form">
|
||||
<form action="{url path="/cart/update"}" class="form-inline" method="post">
|
||||
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
|
||||
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
|
||||
{for $will=1 to $STOCK}
|
||||
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
|
||||
{/for}
|
||||
</select>
|
||||
<div class="form-group">
|
||||
<select name="quantity" class="form-control" onchange="jQuery(this).parent('form').submit();">
|
||||
{for $will=1 to $STOCK}
|
||||
<option {if $QUANTITY == $will}selected="selected"{/if}>{$will}</option>
|
||||
{/for}
|
||||
</select>
|
||||
</div>
|
||||
<button type="submit" title="{intl l="Update Quantity"}" class="btn btn-cart-update">{intl l="+"}</button>
|
||||
</form>
|
||||
</div>
|
||||
</td>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
|
||||
{block name="contact-form"}
|
||||
{form name="thelia.front.contact"}
|
||||
<form id="form-contact" action="{url path="/contact"}" method="post" role="form">
|
||||
<form id="form-contact" action="{url path="/contact"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<fieldset id="contact-info" class="panel">
|
||||
<div class="panel-heading">
|
||||
|
||||
25
templates/default/currency.html
Normal file
25
templates/default/currency.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-currency{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$breadcrumbs = [
|
||||
['title' => {intl l="Currency"}, 'url'=>{url path="/currency"}]
|
||||
]}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">{intl l="SELECT YOUR CURRENCY"}</h1>
|
||||
<ul class="nav nav-tabs nav-justified" style="margin-bottom:60px;">
|
||||
{loop type="currency" name="currency_available"}
|
||||
<li{if $ID eq "{currency attr="id"}"} class="active"{/if}><a href="{url path="{navigate to="current"}" currency={$ISOCODE}}">{$SYMBOL} - {$NAME}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -1,6 +1,6 @@
|
||||
<section id="filters">
|
||||
<h3>Find <span>a product</span></h3>
|
||||
<form id="form-filters" action="" method="get" role="form">
|
||||
<form id="form-filters" action="" method="get">
|
||||
<div class="filter filter-type">
|
||||
<fieldset>
|
||||
<legend class="filter-heading">Type</legend>
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
{intl l="Cart"} <span class="badge">{cart attr="count_item"}</span>
|
||||
</a>
|
||||
<div class="dropdown-menu cart-content">
|
||||
<form id="form-cart-mini" action="{url path="/order/delivery"}" method="post" role="form">
|
||||
<form id="form-cart-mini" action="{url path="/order/delivery"}" method="post">
|
||||
<table class="table table-cart-mini">
|
||||
<colgroup>
|
||||
<col width="70">
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
</div>
|
||||
{if $hasBtn == true}
|
||||
{form name="thelia.cart.add" }
|
||||
<form id="form-product-details" action="{url path="/cart/add" }" method="post" role="form" class="form-product">
|
||||
<form id="form-product-details" action="{url path="/cart/add" }" method="post" class="form-product">
|
||||
{form_hidden_fields form=$form}
|
||||
<input type="hidden" name="view" value="product">
|
||||
<input type="hidden" name="product_id" value="{$ID}">
|
||||
|
||||
25
templates/default/language.html
Normal file
25
templates/default/language.html
Normal file
@@ -0,0 +1,25 @@
|
||||
{extends file="layout.tpl"}
|
||||
|
||||
{* Body Class *}
|
||||
{block name="body-class"}page-language{/block}
|
||||
|
||||
{* Breadcrumb *}
|
||||
{block name='no-return-functions' append}
|
||||
{$breadcrumbs = [
|
||||
['title' => {intl l="Language"}, 'url'=>{url path="/language"}]
|
||||
]}
|
||||
{/block}
|
||||
|
||||
|
||||
{block name="main-content"}
|
||||
<div class="main">
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">{intl l="SELECT YOUR LANGUAGE"}</h1>
|
||||
<ul class="nav nav-tabs nav-justified" style="margin-bottom:60px;">
|
||||
{loop type="lang" name="lang_available"}
|
||||
<li{if $ID eq "{lang attr="id"}"} class="active"{/if}><a href="{url path="{navigate to="current"}" lang={$CODE}}">{$TITLE}</a></li>
|
||||
{/loop}
|
||||
</ul>
|
||||
</article>
|
||||
</div>
|
||||
{/block}
|
||||
@@ -1,4 +1,10 @@
|
||||
{* Declare assets directory, relative to template base directory *}
|
||||
{declare_assets directory='assets'}
|
||||
{block name="no-return-functions"}{/block}
|
||||
{assign var="company_name" value="{config key="company_name"}"}
|
||||
{if not $company_name}
|
||||
{assign var="company_name" value="{intl l='Thelia V2'}"}
|
||||
{/if}
|
||||
<!doctype html>
|
||||
<!--
|
||||
______ __ __ ______ __ __ ______
|
||||
@@ -31,18 +37,19 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<meta charset="utf-8">
|
||||
|
||||
{* Page Title *}
|
||||
<title>{block name="page-title"}{strip}{if $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title} - {/foreach}{/if}{config key="company_name"}{/strip}{/block}</title>
|
||||
<title>{block name="page-title"}{strip}{if $breadcrumbs}{foreach from=$breadcrumbs|array_reverse item=breadcrumb}{$breadcrumb.title} - {/foreach}{/if}{$company_name}{/strip}{/block}</title>
|
||||
|
||||
{* Meta Tags *}
|
||||
<meta name="description" content="">
|
||||
<meta name="generator" content="{intl l='Thelia V2'}">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
<meta http-equiv="X-UA-Compatible" content="IE=edge">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1.0">
|
||||
{block name="meta"}{/block}
|
||||
{block name="meta"}
|
||||
<meta name="description" content="{$company_name}">
|
||||
<meta name="robots" content="noindex,nofollow">
|
||||
{/block}
|
||||
|
||||
{* Stylesheets *}
|
||||
{stylesheets file='assets/less/styles.less' filters='less,cssembed'}
|
||||
{stylesheets file='assets/less/styles.less' filters='less'}
|
||||
<link rel="stylesheet" href="{$asset_url}">
|
||||
{/stylesheets}
|
||||
|
||||
@@ -52,14 +59,10 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
{images file='assets/img/favicon.ico'}<link rel="shortcut icon" type="image/x-icon" href="{$asset_url}">{/images}
|
||||
{images file='assets/img/favicon.png'}<link rel="icon" type="image/png" href="{$asset_url}" />{/images}
|
||||
|
||||
<link rel="icon" href="/favicon.ico" type="image/x-icon">
|
||||
|
||||
{* HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries *}
|
||||
<!--[if lt IE 9]>
|
||||
<script src="//html5shim.googlecode.com/svn/trunk/html5.js"></script>
|
||||
{javascripts file='assets/js/libs/respond.min.js'}
|
||||
<script src="{$asset_url}"></script>
|
||||
{/javascripts}
|
||||
<script src="//oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
|
||||
<script src="//oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
|
||||
<![endif]-->
|
||||
</head>
|
||||
|
||||
@@ -83,7 +86,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<span class="icon-bar"></span>
|
||||
<span class="icon-bar"></span>
|
||||
</button>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{config key="company_name"}</a>
|
||||
<a class="navbar-brand" href="{navigate to="index"}">{$company_name}</a>
|
||||
</div>
|
||||
|
||||
<!-- Place everything within .nav-collapse to hide it until above 768px -->
|
||||
@@ -100,18 +103,18 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<a href="{url path="/login"}" class="login">{intl l="Log In!"}</a>
|
||||
<div class="dropdown-menu">
|
||||
{form name="thelia.front.customer.login"}
|
||||
<form id="form-login-mini" action="{url path="/login"}" method="post" role="form" {form_enctype form=$form}>
|
||||
<form id="form-login-mini" action="{url path="/login"}" method="post" {form_enctype form=$form}>
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group group-email">
|
||||
<label for="{$label_attr.for}-mini">Email address</label>
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control" aria-required="true" required>
|
||||
<label for="{$label_attr.for}-mini">{intl l="Email address"}</label>
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" aria-required="true" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="password"}
|
||||
<div class="form-group group-password">
|
||||
<label for="{$label_attr.for}-mini">Password</label>
|
||||
<input type="password" name="{$name}" id="{$label_attr.for}-mini" class="form-control" aria-required="true" required>
|
||||
<label for="{$label_attr.for}-mini">{intl l="Password"}</label>
|
||||
<input type="password" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" aria-required="true" required>
|
||||
</div>
|
||||
{/form_field}
|
||||
{form_field form=$form field="account"}
|
||||
@@ -143,8 +146,8 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<header class="container" role="banner">
|
||||
<div class="header">
|
||||
<h1 class="logo">
|
||||
<a href="{navigate to="index"}" title="{config key="company_name"}">
|
||||
{images file='assets/img/logo.gif'}<img src="{$asset_url}" alt="{config key="company_name"}">{/images}
|
||||
<a href="{navigate to="index"}" title="{$company_name}">
|
||||
{images file='assets/img/logo.gif'}<img src="{$asset_url}" alt="{$company_name}">{/images}
|
||||
</a>
|
||||
</h1>
|
||||
|
||||
@@ -162,7 +165,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<div class="language-switch" aria-labelledby="language-label">
|
||||
<div class="language-switch" aria-labelledby="language-label" role="form">
|
||||
<span id="language-label" class="dropdown-label">{intl l="Language:"}</span>
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="{url path="/language"}">{lang attr="title"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
@@ -172,7 +175,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
</ul>
|
||||
</div>
|
||||
|
||||
<div class="currency-switch" aria-labelledby="currency-label">
|
||||
<div class="currency-switch" aria-labelledby="currency-label" role="form">
|
||||
<span id="currency-label" class="dropdown-label">{intl l="Currency:"}</span>
|
||||
<a class="current dropdown-toggle" data-toggle="dropdown" href="{url path="/currency"}">{currency attr="code"}</a>
|
||||
<ul class="select dropdown-menu">
|
||||
@@ -191,7 +194,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<main class="main-container" role="main">
|
||||
<div class="container">
|
||||
{block name="breadcrumb"}{include file="misc/breadcrumb.tpl"}{/block}
|
||||
{block name="main-content"}{/block}
|
||||
<div id="content">{block name="main-content"}{/block}</div>
|
||||
</div><!-- /.container -->
|
||||
</main><!-- /.main-container -->
|
||||
|
||||
@@ -269,54 +272,60 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<section class="block block-social">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Follow us"}</h3></div>
|
||||
<div class="block-content">
|
||||
<p>Lorem ipsum dolor sit amet, consectetur adipisicing elit.</p>
|
||||
<p>{intl l="Follow us introduction"}</p>
|
||||
<ul role="presentation">
|
||||
<li>
|
||||
<a href="http://facebook.com" class="facebook" data-toggle="tooltip" data-placement="top" title="facebook" target="_blank">
|
||||
<a href="http://facebook.com" rel="nofollow" class="facebook" data-toggle="tooltip" data-placement="top" title="{intl l="Facebook"}" target="_blank">
|
||||
<span class="icon-stack">
|
||||
<span class="icon-circle icon-stack-base"></span>
|
||||
<span class="icon-facebook icon-light"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Facebook"}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://twitter.com" class="twitter" data-toggle="tooltip" data-placement="top" title="twitter" target="_blank">
|
||||
<a href="https://twitter.com" rel="nofollow" class="twitter" data-toggle="tooltip" data-placement="top" title="{intl l="Twitter"}" target="_blank">
|
||||
<span class="icon-stack">
|
||||
<span class="icon-circle icon-stack-base"></span>
|
||||
<span class="icon-twitter icon-light"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Twitter"}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://instagram.com" class="instagram" data-toggle="tooltip" data-placement="top" title="instagram" target="_blank">
|
||||
<a href="http://instagram.com" rel="nofollow" class="instagram" data-toggle="tooltip" data-placement="top" title="{intl l="Instagram"}" target="_blank">
|
||||
<span class="icon-stack">
|
||||
<span class="icon-circle icon-stack-base"></span>
|
||||
<span class="icon-instagram icon-light"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Instagram"}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://google.com" class="google-plus" data-toggle="tooltip" data-placement="top" title="google+" target="_blank">
|
||||
<a href="http://www.google.com" rel="nofollow" class="google-plus" data-toggle="tooltip" data-placement="top" title="{intl l="Google+"}" target="_blank">
|
||||
<span class="icon-stack">
|
||||
<span class="icon-circle icon-stack-base"></span>
|
||||
<span class="icon-google-plus icon-light"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Google+"}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="http://youtube.com" class="youtube" data-toggle="tooltip" data-placement="top" title="youtube" target="_blank">
|
||||
<a href="http://www.youtube.com" rel="nofollow" class="youtube" data-toggle="tooltip" data-placement="top" title="{intl l="Youtube"}" target="_blank">
|
||||
<span class="icon-stack">
|
||||
<span class="icon-circle icon-stack-base"></span>
|
||||
<span class="icon-youtube icon-light"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="Youtube"}</span>
|
||||
</a>
|
||||
</li>
|
||||
<li>
|
||||
<a href="#rss" class="rss" data-toggle="tooltip" data-placement="top" title="rss" target="_blank">
|
||||
<a href="#rss" class="rss" rel="nofollow" data-toggle="tooltip" data-placement="top" title="{intl l="RSS"}" target="_blank">
|
||||
<span class="icon-stack">
|
||||
<span class="icon-circle icon-stack-base"></span>
|
||||
<span class="icon-rss icon-light"></span>
|
||||
</span>
|
||||
<span class="visible-print">{intl l="RSS"}</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
@@ -326,14 +335,14 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<section class="block block-newsletter">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Newsletter"}</h3></div>
|
||||
<div class="block-content">
|
||||
<p id="newletter-describe">{intl l="Sign up to receive our latest news."}</p>
|
||||
<p id="newsletter-describe">{intl l="Sign up to receive our latest news."}</p>
|
||||
{form name="thelia.front.newsletter"}
|
||||
<form id="form-newsletter-mini" action="{url path="/newsletter"}" method="post" role="form">
|
||||
<form id="form-newsletter-mini" action="{url path="/newsletter"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
{form_field form=$form field="email"}
|
||||
<div class="form-group">
|
||||
<label for="{$label_attr.for}-mini">{intl l="Email address"}</label>
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control" placeholder="{intl l="Your email address"}" aria-describedby="newletter-describe" {if $required} aria-required="true" required{/if} autocomplete="off">
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}-mini" class="form-control" maxlength="255" placeholder="{intl l="Your email address"}" aria-describedby="newsletter-describe" {if $required} aria-required="true" required{/if} autocomplete="off">
|
||||
</div>
|
||||
{/form_field}
|
||||
<button type="submit" class="btn btn-subscribe">{intl l="Subscribe"}</button>
|
||||
@@ -347,7 +356,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
<section class="block block-contact" itemscope itemtype="http://schema.org/Organization">
|
||||
<div class="block-heading"><h3 class="block-title">{intl l="Contact Us"}</h3></div>
|
||||
<div class="block-content">
|
||||
<meta itemprop="name" content="{config key="company_name"}">
|
||||
<meta itemprop="name" content="{$company_name}">
|
||||
<ul>
|
||||
<li class="contact-address">
|
||||
<address class="adr" itemprop="address" itemscope itemtype="http://schema.org/PostalAddress">
|
||||
@@ -385,7 +394,7 @@ GNU General Public License : http://www.gnu.org/licenses/
|
||||
</ul>
|
||||
</nav>
|
||||
|
||||
<section class="copyright">{intl l="Copyright"} © <time datetime="{'Y-m-d'|date}">{'Y'|date}</time> <a href="http://www.thelia.net" rel="external">Thelia</a></section>
|
||||
<section class="copyright">{intl l="Copyright"} © <time datetime="{'Y-m-d'|date}">{'Y'|date}</time> <a href="http://thelia.net" rel="external">Thelia</a></section>
|
||||
</div>
|
||||
</div>
|
||||
</footer><!-- /.footer-info -->
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">{intl l="Login"}</h1>
|
||||
{form name="thelia.front.customer.login"}
|
||||
<form id="form-login" action="{url path="/login"}" method="post" role="form" {form_enctype form=$form} novalidate>
|
||||
<form id="form-login" action="{url path="/login"}" method="post" {form_enctype form=$form} novalidate>
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{navigate to="return_to"}"> {* the url the user is redirected to on login success *}
|
||||
|
||||
@@ -11,7 +11,7 @@
|
||||
<h1 id="main-label" class="page-header">{intl l="Newsletter Subscription"}</h1>
|
||||
|
||||
{form name="thelia.front.newsletter"}
|
||||
<form id="form-newsletter" action="{url path="/newsletter"}" method="post" role="form">
|
||||
<form id="form-newsletter" action="{url path="/newsletter"}" method="post">
|
||||
{form_hidden_fields form=$form}
|
||||
<p>{intl l="You want to subscribe to the newsletter? Please enter your email address below."}</p>
|
||||
{form_field form=$form field="email"}
|
||||
@@ -20,7 +20,7 @@
|
||||
<div class="control-input">
|
||||
<input type="email" name="{$name}" id="{$label_attr.for}" value="{$value}" class="form-control" maxlength="255" {if $required} aria-required="true" required{/if} autofocus>
|
||||
{if $error}
|
||||
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
|
||||
<span class="help-block">{$message}</span>
|
||||
{elseif !$error && $value != ""}
|
||||
<span class="help-block"><span class="icon-ok"></span> {intl l="Thanks for signing up! We'll keep you posted whenever we have any new updates."}</span>
|
||||
{/if}
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
{form name="thelia.order.delivery"}
|
||||
{assign var="isPost" value="{$smarty.post|count}"}
|
||||
<form id="form-cart-delivery" action="{url path="/order/delivery"}" method="post" role="form" {form_enctype form=$form}>
|
||||
<form id="form-cart-delivery" action="{url path="/order/delivery"}" method="post" {form_enctype form=$form}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
{form name="thelia.order.coupon"}
|
||||
|
||||
<form id="form-coupon" action="{url path="/order/coupon"}" method="post" role="form" {form_enctype form=$form}>
|
||||
<form id="form-coupon" action="{url path="/order/coupon"}" method="post" {form_enctype form=$form}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
@@ -162,8 +162,8 @@
|
||||
</form>
|
||||
{/form}
|
||||
{form name="thelia.order.payment"}
|
||||
|
||||
<form id="form-cart-payment" action="{url path="/order/invoice"}" method="post" role="form" {form_enctype form=$form}>
|
||||
{assign var="isPost" value="{$smarty.post|count}"}
|
||||
<form id="form-cart-payment" action="{url path="/order/invoice"}" method="post" {form_enctype form=$form}>
|
||||
|
||||
{form_hidden_fields form=$form}
|
||||
|
||||
@@ -191,7 +191,6 @@
|
||||
</div>
|
||||
|
||||
{form_field form=$form field='invoice-address'}
|
||||
|
||||
<div class="panel">
|
||||
<div class="panel-heading">{intl l="Billing address"}s</div>
|
||||
|
||||
@@ -201,65 +200,19 @@
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
<table class="col-md-12">
|
||||
|
||||
{if !$error && $value}
|
||||
{assign defaultParam '*'}
|
||||
{else}
|
||||
{assign defaultParam 'true'}
|
||||
{/if}
|
||||
{if !$error && $value}
|
||||
{assign idParam $value}
|
||||
{else}
|
||||
{assign idParam '*'}
|
||||
{/if}
|
||||
{loop type="address" name="invoice-address" default=$defaultParam id=$idParam}
|
||||
|
||||
<tr>
|
||||
<td>
|
||||
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
|
||||
<span class="org">{$COMPANY}</span>
|
||||
<address class="adr">
|
||||
<span class="street-address">{$ADDRESS1}</span><br>
|
||||
{if $ADDRESS2 != ""}
|
||||
<span class="street-address">{$ADDRESS2}</span><br>
|
||||
{/if}
|
||||
{if $ADDRESS3 != ""}
|
||||
<span class="street-address">{$ADDRESS3}</span><br>
|
||||
{/if}
|
||||
<span class="postal-code">{$ZIPCODE}</span>
|
||||
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
||||
</address>
|
||||
</td>
|
||||
<td>
|
||||
<input class="js-invoice-address-selector {if !$error}hidden{/if}" type="radio" name="{$name}" value="{$ID}" {if $value == $ID OR !$error}checked="checked"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
{if !$error}
|
||||
<tr class="js-change-invoice-address">
|
||||
<td colspan="2">
|
||||
<a href="#" class="btn btn-change-address">{intl l="Change address"}</a>
|
||||
</td>
|
||||
</tr>
|
||||
{loop type="address" name="invoice-address"}
|
||||
{assign var="isInvoiceAddressChecked" value="0"}
|
||||
{if $isPost}
|
||||
{if $value == $ID}
|
||||
{assign var="isInvoiceAddressChecked" value="1"}
|
||||
{/if}
|
||||
{elseif $DEFAULT}
|
||||
{assign var="isInvoiceAddressChecked" value="1"}
|
||||
{/if}
|
||||
|
||||
{/loop}
|
||||
|
||||
{if !$error && $value}
|
||||
{assign defaultParam '*'}
|
||||
{else}
|
||||
{assign defaultParam 'false'}
|
||||
{/if}
|
||||
{if !$error && $value}
|
||||
{assign excludeParam $value}
|
||||
{else}
|
||||
{assign excludeParam 'none'}
|
||||
{/if}
|
||||
{loop type="address" name="invoice-address" default=$defaultParam exclude=$excludeParam}
|
||||
|
||||
<tr class="js-other-invoice-address {if !$error}hidden{/if}">
|
||||
<td>
|
||||
<div class="radio">
|
||||
<label for="invoice-address_{$ID}">
|
||||
<input type="radio" name="{$name}" id="invoice-address_{$ID}" value="{$ID}"{if $isInvoiceAddressChecked} checked="checked"{/if}>
|
||||
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$LASTNAME|upper} {$FIRSTNAME|ucwords}</span>
|
||||
<span class="org">{$COMPANY}</span>
|
||||
<address class="adr">
|
||||
@@ -273,15 +226,11 @@
|
||||
<span class="postal-code">{$ZIPCODE}</span>
|
||||
<span class="locality">{$CITY}, <span class="country-name">{loop type="country" name="customer.country.info" id=$COUNTRY}{$TITLE}{/loop}</span></span>
|
||||
</address>
|
||||
</td>
|
||||
<td>
|
||||
<input class="js-invoice-address-selector {if !$error}hidden{/if}" type="radio" name="{$name}" value="{$ID}" {if $value == $ID}checked="checked"{/if}>
|
||||
</td>
|
||||
</tr>
|
||||
|
||||
</label>
|
||||
</div>
|
||||
{/loop}
|
||||
|
||||
</table>
|
||||
<a href="#" class="btn btn-change-address hidden">{intl l="Change address"}</a>
|
||||
|
||||
</div>
|
||||
|
||||
@@ -342,15 +291,21 @@
|
||||
|
||||
{block name="javascript-initialization"}
|
||||
<script type="text/javascript">
|
||||
jQuery(function($order) {
|
||||
$order('.js-change-invoice-address').on('click', 'a', function(e) {
|
||||
e.preventDefault();
|
||||
jQuery(function($) {
|
||||
$('#cart-address').each(function(){
|
||||
var $radio = $('.radio', this),
|
||||
$btn = $('.btn-change-address');
|
||||
|
||||
$order('.js-other-invoice-address').removeClass('hidden');
|
||||
$order('.js-invoice-address-selector').removeClass('hidden');
|
||||
// Hide other invoice address
|
||||
$radio.filter( function(){ return !$(this).find(':radio').is(':checked'); }).hide();
|
||||
$btn
|
||||
.removeClass('hidden')
|
||||
.bind('click.btn-change-address', function(){
|
||||
$radio.show();
|
||||
$(this).hide();
|
||||
|
||||
$order('#js-invoice-address-default-selector').unbind().remove();
|
||||
$order('.js-change-invoice-address').unbind().remove();
|
||||
return false;
|
||||
});
|
||||
});
|
||||
});
|
||||
</script>
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
<article class="col-main" role="main" aria-labelledby="main-label">
|
||||
<h1 id="main-label" class="page-header">{intl l="Password Forgotten"}</h1>
|
||||
{form name="thelia.front.customer.lostpassword"}
|
||||
<form id="form-forgotpassword" action="{url path="/password"}" method="post" role="form">
|
||||
<form id="form-forgotpassword" action="{url path="/password"}" method="post">
|
||||
|
||||
<p>{intl l="Please enter your email address below."} {intl l="You will receive a link to reset your password."}</p>
|
||||
{form_field form=$form field="email"}
|
||||
|
||||
@@ -113,7 +113,7 @@
|
||||
<div class="product-price" itemprop="offers" itemscope itemtype="http://schema.org/Offer">
|
||||
<div class="availability">
|
||||
<span class="availibity-label">{intl l="Availability"}: </span>
|
||||
<span itemprop="availability" href="{$current_stock_href}" class="{$current_stock_class}" id="stockInformations">
|
||||
<span itemprop="availability" href="{$current_stock_href}" class="{$current_stock_class}" id="stock-information">
|
||||
<span class="in">{intl l='In Stock'}</span><span class="out">{intl l='Out of Stock'}</span>
|
||||
</span>
|
||||
</div>
|
||||
@@ -137,7 +137,7 @@
|
||||
</div>
|
||||
|
||||
{form name="thelia.cart.add" }
|
||||
<form id="form-product-details" action="{url path="/cart/add" }" method="post" role="form" class="form-product">
|
||||
<form id="form-product-details" action="{url path="/cart/add" }" method="post" class="form-product">
|
||||
{form_hidden_fields form=$form}
|
||||
<input type="hidden" name="view" value="product">
|
||||
<input type="hidden" name="product_id" value="{$ID}">
|
||||
|
||||
@@ -15,7 +15,7 @@
|
||||
|
||||
<h1 id="main-label" class="page-header">{intl l="Create New Account"}</h1>
|
||||
{form name="thelia.front.customer.create"}
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/register"}" method="post" role="form">
|
||||
<form id="form-register" class="form-horizontal" action="{url path="/register"}" method="post">
|
||||
{form_field form=$form field='success_url'}
|
||||
<input type="hidden" name="{$name}" value="{url path="/account"}" /> {* the url the user is redirected to on registration success *}
|
||||
{/form_field}
|
||||
@@ -27,7 +27,7 @@
|
||||
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
|
||||
<fieldset id="register-info" class="panel">
|
||||
<div class="panel-heading">
|
||||
1. {intl l="Personal Informations"}
|
||||
1. {intl l="Personal Information"}
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
@@ -116,7 +116,7 @@
|
||||
|
||||
<fieldset id="register-delivery" class="panel">
|
||||
<div class="panel-heading">
|
||||
2. {intl l="Delivery Informations"}
|
||||
2. {intl l="Delivery Information"}
|
||||
</div>
|
||||
|
||||
<div class="panel-body">
|
||||
|
||||
Reference in New Issue
Block a user