Merge branch 'master' of github.com:thelia/thelia

This commit is contained in:
Etienne Roudeix
2013-11-06 11:07:59 +01:00
44 changed files with 707 additions and 505 deletions

View File

@@ -73,11 +73,8 @@ class Address extends BaseAction implements EventSubscriberInterface
$con = Propel::getWriteConnection(AddressTableMap::DATABASE_NAME);
$con->beginTransaction();
try {
if ($addressModel->isNew()) {
$addressModel->setLabel($event->getLabel());
}
$addressModel
->setLabel($event->getLabel())
->setTitleId($event->getTitle())
->setFirstname($event->getFirstname())
->setLastname($event->getLastname())

View File

@@ -60,7 +60,7 @@ class Customer extends BaseAction implements EventSubscriberInterface
}
public function updateProfil(CustomerCreateOrUpdateEvent $event)
public function updateProfile(CustomerCreateOrUpdateEvent $event)
{
$customer = $event->getCustomer();
@@ -166,7 +166,7 @@ class Customer extends BaseAction implements EventSubscriberInterface
return array(
TheliaEvents::CUSTOMER_CREATEACCOUNT => array('create', 128),
TheliaEvents::CUSTOMER_UPDATEACCOUNT => array('modify', 128),
TheliaEvents::CUSTOMER_UPDATEPROFIL => array('updateProfil', 128),
TheliaEvents::CUSTOMER_UPDATEPROFILE => array('updateProfile', 128),
TheliaEvents::CUSTOMER_LOGOUT => array('logout', 128),
TheliaEvents::CUSTOMER_LOGIN => array('login', 128),
TheliaEvents::CUSTOMER_DELETEACCOUNT => array('delete', 128),

View File

@@ -9,7 +9,7 @@
<form name="thelia.front.customer.login" class="Thelia\Form\CustomerLogin"/>
<form name="thelia.front.customer.lostpassword" class="Thelia\Form\CustomerLostPasswordForm"/>
<form name="thelia.front.customer.create" class="Thelia\Form\CustomerCreateForm"/>
<form name="thelia.front.customer.profil.update" class="Thelia\Form\CustomerProfilUpdateForm"/>
<form name="thelia.front.customer.profile.update" class="Thelia\Form\CustomerProfileUpdateForm"/>
<form name="thelia.front.customer.password.update" class="Thelia\Form\CustomerPasswordUpdateForm"/>
<form name="thelia.front.address.create" class="Thelia\Form\AddressCreateForm"/>
<form name="thelia.front.address.update" class="Thelia\Form\AddressUpdateForm"/>

View File

@@ -110,6 +110,7 @@
</route>
<route id="cart.update.quantity" path="/cart/update">
<default key="_controller">Thelia\Controller\Front\CartController::changeItem</default>
<default key="_controller">Thelia\Controller\Front\CartController::changeItem</default>
<default key="_view">cart</default>
</route>

View File

@@ -156,17 +156,51 @@ class AddressController extends BaseFrontController
public function deleteAction($address_id)
{
$this->checkAuth();
$error_message = false;
$customer = $this->getSecurityContext()->getCustomerUser();
$address = AddressQuery::create()->findPk($address_id);
if (!$address || $customer->getId() != $address->getCustomerId()) {
$this->redirectToRoute('default');
// If Ajax Request
if ($this->getRequest()->isXmlHttpRequest()) {
return $this->jsonResponse(json_encode(array(
"success" => false,
"message" => "Error during address deletion process"
)));
} else {
$this->redirectToRoute('default');
}
}
$this->dispatch(TheliaEvents::ADDRESS_DELETE, new AddressEvent($address));
try {
$this->dispatch(TheliaEvents::ADDRESS_DELETE, new AddressEvent($address));
} catch (\Exception $e) {
$error_message = $e->getMessage();
}
$this->redirectToRoute('default', array('view'=>'account'));
\Thelia\Log\Tlog::getInstance()->error(sprintf('Error during address deletion : %s', $error_message));
// If Ajax Request
if ($this->getRequest()->isXmlHttpRequest()) {
if ($error_message) {
$response = $this->jsonResponse(json_encode(array(
"success" => false,
"message" => $error_message
)));
} else {
$response = $this->jsonResponse(json_encode(array(
"success" => true,
"message" => ""
)));;
}
return $response;
} else {
$this->redirectToRoute('default', array('view'=>'account'));
}
}
protected function createAddressEvent($form)

View File

@@ -56,7 +56,7 @@ class BaseFrontController extends BaseController
public function checkAuth()
{
if ($this->getSecurityContext()->hasCustomerUser() === false) {
$this->redirectToRoute('default', array('view'=>'login'));
$this->redirectToRoute('customer.login.process');
}
}

View File

@@ -33,7 +33,7 @@ use Thelia\Form\CustomerCreateForm;
use Thelia\Form\CustomerLogin;
use Thelia\Form\CustomerLostPasswordForm;
use Thelia\Form\CustomerPasswordUpdateForm;
use Thelia\Form\CustomerProfilUpdateForm;
use Thelia\Form\CustomerProfileUpdateForm;
use Thelia\Form\Exception\FormValidationException;
use Thelia\Model\Customer;
use Thelia\Core\Event\TheliaEvents;
@@ -149,10 +149,10 @@ class CustomerController extends BaseFrontController
'newsletter' => null !== NewsletterQuery::create()->findOneByEmail($customer->getEmail()),
);
$customerProfilUpdateForm = new CustomerProfilUpdateForm($this->getRequest(), 'form', $data);
$customerProfileUpdateForm = new CustomerProfileUpdateForm($this->getRequest(), 'form', $data);
// Pass it to the parser
$this->getParserContext()->addForm($customerProfilUpdateForm);
$this->getParserContext()->addForm($customerProfileUpdateForm);
}
public function updatePasswordAction()
@@ -169,7 +169,7 @@ class CustomerController extends BaseFrontController
$customerChangeEvent = $this->createEventInstance($form->getData());
$customerChangeEvent->setCustomer($customer);
$this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFIL, $customerChangeEvent);
$this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFILE, $customerChangeEvent);
$this->redirectSuccess($customerPasswordUpdateForm);
@@ -198,17 +198,17 @@ class CustomerController extends BaseFrontController
$message = false;
$customerProfilUpdateForm = new CustomerProfilUpdateForm($this->getRequest());
$customerProfileUpdateForm = new CustomerProfileUpdateForm($this->getRequest());
try {
$customer = $this->getSecurityContext()->getCustomerUser();
$newsletterOldEmail = $customer->getEmail();
$form = $this->validateForm($customerProfilUpdateForm, "post");
$form = $this->validateForm($customerProfileUpdateForm, "post");
$customerChangeEvent = $this->createEventInstance($form->getData());
$customerChangeEvent->setCustomer($customer);
$this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFIL, $customerChangeEvent);
$this->dispatch(TheliaEvents::CUSTOMER_UPDATEPROFILE, $customerChangeEvent);
$updatedCustomer = $customerChangeEvent->getCustomer();
@@ -234,7 +234,7 @@ class CustomerController extends BaseFrontController
$this->processLogin($updatedCustomer);
$this->redirectSuccess($customerProfilUpdateForm);
$this->redirectSuccess($customerProfileUpdateForm);
} catch (FormValidationException $e) {
$message = sprintf("Please check your input: %s", $e->getMessage());
@@ -245,10 +245,10 @@ class CustomerController extends BaseFrontController
if ($message !== false) {
Tlog::getInstance()->error(sprintf("Error during customer modification process : %s.", $message));
$customerProfilUpdateForm->setErrorMessage($message);
$customerProfileUpdateForm->setErrorMessage($message);
$this->getParserContext()
->addForm($customerProfilUpdateForm)
->addForm($customerProfileUpdateForm)
->setGeneralError($message)
;
}
@@ -276,7 +276,7 @@ class CustomerController extends BaseFrontController
// If User is a new customer
if ($form->get('account')->getData() == 0 && !$form->get("email")->getErrors()) {
$this->redirectToRoute("default", array("view" => "register","email" => $form->get("email")->getData()));
$this->redirectToRoute("customer.create.process", array("email" => $form->get("email")->getData()));
} else {
try {

View File

@@ -72,9 +72,9 @@ final class TheliaEvents
const CUSTOMER_UPDATEACCOUNT = "action.updateCustomer";
/**
* sent on customer account update profil
* sent on customer account update profile
*/
const CUSTOMER_UPDATEPROFIL = "action.updateProfilCustomer";
const CUSTOMER_UPDATEPROFILE = "action.updateProfileCustomer";
/**
* sent on customer removal

View File

@@ -23,14 +23,15 @@
namespace Thelia\Form;
use Symfony\Component\Validator\ExecutionContextInterface;
use Thelia\Core\Translation\Translator;
use Thelia\Model\CustomerQuery;
/**
* Class CustomerProfilUpdateForm
* Class CustomerProfileUpdateForm
* @package Thelia\Form
* @author Christophe Laffont <claffont@openstudio.fr>
*/
class CustomerProfilUpdateForm extends CustomerCreateForm
class CustomerProfileUpdateForm extends CustomerCreateForm
{
protected function buildForm()
@@ -81,6 +82,6 @@ class CustomerProfilUpdateForm extends CustomerCreateForm
public function getName()
{
return "thelia_customer_profil_update";
return "thelia_customer_profile_update";
}
}

View File

@@ -12,31 +12,11 @@
{block name="main-content"}
<div class="main">
<article id="cart" class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page_404">
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label">
404
<span>{intl l="The page cannot be found"}</span>
</h1>
{ifloop rel="product_upsell"}
<aside id="products-upsell" role="complementary" aria-labelledby="products-upsell-label">
<div class="products-heading">
<h3 id="products-upsell-label">{intl l="Upsell Products"}</h3>
</div>
<div class="products-content">
<ul class="products-grid product-col-5 hover-effect">
{loop name="product_upsell" type="product" promo="yes" limit="5"}
{include file="includes/single-product.html" product_id=$ID hasBtn=true hasDescription=true width="218" height="146"}
{/loop}
</ul>
</div>
</aside><!-- #products-upsell -->
{/ifloop}
</div>
</article>
</div>
{/block}

View File

@@ -28,12 +28,12 @@ return array (
'Free shipping' => 'Free shipping',
'Orders over $50' => 'Orders over $50',
'Secure payment' => 'Secure payment',
'Multi-payment plateform' => 'Multi-payment plateform',
'Multi-payment platform' => 'Multi-payment platform',
'Need help ?' => 'Need help ?',
'Questions ? See or F.A.Q.' => 'Questions ? See or F.A.Q.',
'Latest articles' => 'Latest articles',
'No articles currently' => 'No articles currently',
'Usefull links' => 'Usefull links',
'Useful links' => 'Useful links',
'Login' => 'Login',
'Follow us' => 'Follow us',
'Newsletter' => 'Newsletter',
@@ -113,11 +113,11 @@ return array (
'Coupon code' => 'Coupon code',
'Ok' => 'Ok',
'Delivery address' => 'Delivery address',
'Billing addres' => 'Billing addres',
'Billing address' => 'Billing address',
'Change address' => 'Change address',
'Choose your payment method' => 'Choose your payment method',
'Secure Payment' => 'Secure Payment',
'You chose to pay by' => 'You chose to pay by',
'You choose to pay by' => 'You choose to pay by',
'Thank you for the trust you place in us.' => 'Thank you for the trust you place in us.',
'A summary of your order email has been sent to the following address' => 'A summary of your order email has been sent to the following address',
'Your order will be confirmed by us upon receipt of your payment.' => 'Your order will be confirmed by us upon receipt of your payment.',
@@ -139,7 +139,7 @@ return array (
'View order %ref as pdf document' => 'View order %ref as pdf document',
'Order details' => 'Order details',
'You don\'t have orders yet.' => 'You don\'t have orders yet.',
'Update Profil' => 'Update Profil',
'Update Profile' => 'Update Profile',
'Personal Informations' => 'Personal Informations',
'Select Title' => 'Select Title',
'Update' => 'Update',
@@ -152,5 +152,63 @@ return array (
'Select Country' => 'Select Country',
'Create' => 'Create',
'Related' => 'Related',
'Grid' => 'Grid',
'List' => 'List',
'Next' => 'Next',
'Previous' => 'Previous',
/*
'The page cannot be found' => 'The page cannot be found',
'What\'s your name?' => 'What\'s your name?',
'So I can get back to you.' => 'So I can get back to you.',
'The subject of your message.' => 'The subject of your message.',
'And your message...' => 'And your message...',
'This email already exists.' => 'This email already exists.',
'Address label' => 'Address label',
'Title' => 'Title',
'First Name' => 'First Name',
'Last Name' => 'Last Name',
'Company Name' => 'Company Name',
'Street Address' => 'Street Address',
'Address Line 2' => 'Address Line 2',
'Address Line 3' => 'Address Line 3',
'City' => 'City',
'Zip code' => 'Zip code',
'Country' => 'Country',
'Phone' => 'Phone',
'Cellphone' => 'Cellphone',
'Make this address as my primary address' => 'Make this address as my primary address',
'Full Name' => 'Full Name',
'Your Email Address' => 'Your Email Address',
'Subject' => 'Subject',
'Your Message' => 'Your Message',
'Please enter your email address' => 'Please enter your email address',
'No, I am a new customer.' => 'No, I am a new customer.',
'Yes, I have a password :' => 'Yes, I have a password :',
'Please enter your password' => 'Please enter your password',
'This value should not be blank.' => 'This value should not be blank.',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => 'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.',
'This email does not exists' => 'This email does not exists',
'Current Password' => 'Current Password',
'New Password' => 'New Password',
'Password confirmation' => 'Password confirmation',
'Your current password does not match.' => 'Your current password does not match.',
'Password confirmation is not the same as password field.' => 'Password confirmation is not the same as password field.',
'I would like to receive the newsletter or the latest news.' => 'I would like to receive the newsletter or the latest news.',
*/
'Placeholder firstname' => 'John',
'Placeholder lastname' => 'Doe',
'Placeholder email' => 'johndoe@domain.com',
'Placeholder phone' => '',
'Placeholder cellphone' => '',
'Placeholder company' => 'Google',
'Placeholder address1' => '76 Ninth Avenue',
'Placeholder address2' => '',
'Placeholder city' => 'New York',
'Placeholder zipcode' => 'NY 10011',
'Placeholder address label' => 'Home, Work office, other',
'Placeholder contact name' => 'What\'s your name?',
'Placeholder contact email' => 'So I can get back to you.',
'Placeholder contact subject' => 'The subject of your message.',
'Placeholder contact message' => 'And your message...',
)
;

View File

@@ -28,12 +28,12 @@ return array (
'Free shipping' => '',
'Orders over $50' => '',
'Secure payment' => '',
'Multi-payment plateform' => '',
'Multi-payment platform' => '',
'Need help ?' => '',
'Questions ? See or F.A.Q.' => '',
'Latest articles' => '',
'No articles currently' => '',
'Usefull links' => '',
'Useful links' => '',
'Login' => '',
'Follow us' => '',
'Newsletter' => '',
@@ -113,11 +113,11 @@ return array (
'Coupon code' => '',
'Ok' => '',
'Delivery address' => '',
'Billing addres' => '',
'Billing address' => '',
'Change address' => '',
'Choose your payment method' => '',
'Secure Payment' => '',
'You chose to pay by' => '',
'You choose to pay by' => '',
'Thank you for the trust you place in us.' => '',
'A summary of your order email has been sent to the following address' => '',
'Your order will be confirmed by us upon receipt of your payment.' => '',
@@ -139,7 +139,7 @@ return array (
'View order %ref as pdf document' => '',
'Order details' => '',
'You don\'t have orders yet.' => '',
'Update Profil' => '',
'Update Profile' => '',
'Personal Informations' => '',
'Select Title' => '',
'Update' => '',
@@ -152,5 +152,63 @@ return array (
'Select Country' => '',
'Create' => '',
'Related' => '',
'Grid' => '',
'List' => '',
'Next' => '',
'Previous' => '',
/*
'The page cannot be found' => '',
'What\'s your name?' => '',
'So I can get back to you.' => '',
'The subject of your message.' => '',
'And your message...' => '',
'This email already exists.' => '',
'Address label' => '',
'Title' => '',
'First Name' => '',
'Last Name' => '',
'Company Name' => '',
'Street Address' => '',
'Address Line 2' => '',
'Address Line 3' => '',
'City' => '',
'Zip code' => '',
'Country' => '',
'Phone' => '',
'Cellphone' => '',
'Make this address as my primary address' => '',
'Full Name' => '',
'Your Email Address' => '',
'Subject' => '',
'Your Message' => '',
'Please enter your email address' => '',
'No, I am a new customer.' => '',
'Yes, I have a password :' => '',
'Please enter your password' => '',
'This value should not be blank.' => '',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => '',
'This email does not exists' => '',
'Current Password' => '',
'New Password' => '',
'Password confirmation' => '',
'Your current password does not match.' => '',
'Password confirmation is not the same as password field.' => '',
'I would like to receive the newsletter or the latest news.' => '',
*/
'Placeholder firstname' => '',
'Placeholder lastname' => '',
'Placeholder email' => '',
'Placeholder phone' => '',
'Placeholder cellphone' => '',
'Placeholder company' => '',
'Placeholder address1' => '',
'Placeholder address2' => '',
'Placeholder city' => '',
'Placeholder zipcode' => '',
'Placeholder address label' => '',
'Placeholder contact name' => '',
'Placeholder contact email' => '',
'Placeholder contact subject' => '',
'Placeholder contact message' => '',
)
;

View File

@@ -5,45 +5,45 @@ return array (
'Thelia V2' => 'Thelia v2',
'Skip to content' => 'Aller au contenu',
'Toggle navigation' => 'Navigation alternative',
'Main Navigation' => 'Navigation principale ',
'Register!' => 'S\inscrire !',
'Main Navigation' => 'Navigation principale',
'Register!' => 'S\'inscrire !',
'Log In!' => 'Se connecter',
'Sign In' => 'S\inscrire',
'Sign In' => 'S\'inscrire',
'Register' => 'Se connecter',
'Cart' => 'Panier',
'View Cart' => 'Voir mon panier',
'Checkout' => 'Payer',
'You have no items in your shopping cart.' => 'Vous n\'avez pas de produit dans votre panier',
'You have no items in your shopping cart.' => 'Vous n\'avez pas de produit dans votre panier.',
'Home' => 'Accueil',
'Search a product' => 'Chercher un produit',
'Search...' => 'Recherche…',
'Minimum 2 characters.' => '2 caractères minimum',
'Minimum 2 characters.' => '2 caractères minimum.',
'Search' => 'Recherche',
'Language:' => 'Langue',
'Currency:' => 'Monnaie',
'Latest' => 'Nouveautés',
'Offers' => 'Promotions',
'Special Price:' => 'Prix en promotion:',
'Regular Price:' => 'Prix:',
'Special Price:' => 'Prix en promotion :',
'Regular Price:' => 'Prix :',
'Free shipping' => 'Livraison gratuite',
'Orders over $50' => 'Commandes supérieures à 50€',//ne devrait-on pas mettre une variable ici?
'Secure payment' => 'Paiement sécurisé',
'Multi-payment plateform' => 'Plateforme multipaiement',// bizarre ?
'Need help ?' => 'Besoin d\'aide? ',
'Questions ? See or F.A.Q.' => 'Des questions ? Voir la F.A.Q.', // bizarre le 'see or '
'Questions ? See or F.A.Q.' => 'Des questions ? Voir la F.A.Q.', // bizarre le 'see or '
'Latest articles' => 'Nouveaux articles',
'No articles currently' => 'Actuellement aucun article',
'Usefull links' => 'Liens utiles',
'Useful links' => 'Liens utiles',
'Login' => 'Connexion',
'Follow us' => 'Suivez-nous',
'Newsletter' => 'Newsletter',
'Sign up to receive our latest news.' => 'Inscrivez-vous pour recevoir nos actualités',
'Sign up to receive our latest news.' => 'Inscrivez-vous pour recevoir nos actualités.',
'Email address' => 'Adresse e-mail',
'Your email address' => 'Votre adresse e-mail',
'Subscribe' => 'Inscription',
'Contact Us' => 'Contactez-nous',
'Copyright' => 'Copyright',
'You are here:' => 'Vous êtes ici :',
'You are here:' => 'Vous êtes ici :',
'Show' => 'Voir',
'per page' => 'par page',
'Sort By' => 'Trier par',
@@ -54,7 +54,7 @@ return array (
'View as' => 'Voir en tant que ',
'View product' => 'Voir le produit',
'Pagination' => 'Pagination',
'No products available in this category' => 'Aucun produit dans cette catégorie',
'No products available in this category' => 'Aucun produit dans cette catégorie.',
'Categories' => 'Catégories',
'Ref.' => 'Ref.',
'Availability' => 'Disponibilité',
@@ -77,7 +77,6 @@ return array (
'Qty' => 'Qté',
'Total' => 'Total',
'Tax Inclusive' => 'TVA incluse',
'TTC' => 'TTC',
'Available' => 'Disponible',
'In Stock' => 'Disponible',
'No.' => 'N°',
@@ -85,8 +84,8 @@ return array (
'Proceed checkout' => 'Payer',
'Warning' => 'Attention',
'missing or invalid data' => 'Information éronnée ou incomplète',
'Do you have an account?' => 'Avez-vous déjà un compte ? ',
'Forgot your Password?' => 'Mot de passé oublié ? ',
'Do you have an account?' => 'Avez-vous déjà un compte ?',
'Forgot your Password?' => 'Mot de passé oublié ?',
'Next' => 'Suivant',
'Log out!' => 'Se déconnecter',
'My Account' => 'Mon compte',
@@ -104,21 +103,21 @@ return array (
'Back' => 'Retour',
'Next Step' => 'Etape suivante',
'Delete address' => 'Supprimer cette adresse',
'Do you really want to delete this address ?' => 'Voulez-vous vraiment supprimer cette adresse ? ',
'Do you really want to delete this address ?' => 'Voulez-vous vraiment supprimer cette adresse ?',
'No' => 'Non',
'Yes' => 'Oui',
'Shipping Tax' => 'Frais de livraison',
'You may have a coupon ?' => 'Avez-vous un code promo? ',
'You may have a coupon ?' => 'Avez-vous un code promo ?',
'Code :' => 'Code',
'Coupon code' => 'Code promo',
'Ok' => 'Ok',
'Delivery address' => 'Adresse de livraison',
'Billing addres' => 'Adresse de facturation',
'Billing address' => 'Adresse de facturation',
'Change address' => 'Changer d\'adresse',
'Choose your payment method' => 'Choisissez voter moyen de paiement',
'Secure Payment' => 'Paiement sécurisé',
// Tous les éléments relatifs au message de confirmation de commande devraient être administrables non?
'You chose to pay by' => 'Vous avez choisi de payer par',
'You choose to pay by' => 'Vous avez choisi de payer par',
'Thank you for the trust you place in us.' => 'Merci pour voter confiance. ',
'A summary of your order email has been sent to the following address' => 'Un récapitulatif de commande vows a été envoyé par e-mail à l\'adresse suivante : ',
'Your order will be confirmed by us upon receipt of your payment.' => 'Votre commande sera confirmée à réception de votre pavement.',
@@ -129,8 +128,8 @@ return array (
'Personal Information' => 'Informations personnelles',
'Change my account information' => 'Modifier mes informations personnelles',
'Change my password' => 'Changer mon mot de passe',
'My Address book' => 'Mon carnet d\adresses',
'My Address Books' => 'Mes carnets d\adresses',
'My Address book' => 'Mon carnet d\'adresses',
'My Address Books' => 'Mes carnets d\'adresses',
'My Orders' => 'Mes commandes',
'List of orders' => 'Liste de mes commandes',
'Order Number' => 'Commande numéro',
@@ -139,8 +138,8 @@ return array (
'View' => 'Voir',
'View order %ref as pdf document' => 'Ouvrir la commande %ref dans un pdf',
'Order details' => 'Détail de commande',
'You don\'t have orders yet.' => 'Vous n\'avez pas encore de commande',
'Update Profil' => 'Mettre à jour votre profil',
'You don\'t have orders yet.' => 'Vous n\'avez pas encore de commande.',
'Update Profile' => 'Mettre à jour votre profil',
'Personal Informations' => 'Informations personnelles',
'Select Title' => 'Civilité',
'Update' => 'Mettre à jour',
@@ -153,6 +152,64 @@ return array (
'Select Country' => 'Choisissez un pays',
'Create' => 'Créer',
'Related' => 'Liés', // voir le contexte pour l'accord
'Grid' => 'Grille',
'List' => 'Liste',
'Next' => 'Suivant',
'Previous' => 'Précédent',
/*
'The page cannot be found' => '',
'What\'s your name?' => '',
'So I can get back to you.' => '',
'The subject of your message.' => '',
'And your message...' => '',
'This email already exists.' => '',
'Address label' => '',
'Title' => '',
'First Name' => '',
'Last Name' => '',
'Company Name' => '',
'Street Address' => '',
'Address Line 2' => '',
'Address Line 3' => '',
'City' => '',
'Zip code' => '',
'Country' => '',
'Phone' => '',
'Cellphone' => '',
'Make this address as my primary address' => '',
'Full Name' => '',
'Your Email Address' => '',
'Subject' => '',
'Your Message' => '',
'Please enter your email address' => '',
'No, I am a new customer.' => '',
'Yes, I have a password :' => '',
'Please enter your password' => '',
'This value should not be blank.' => '',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => '',
'This email does not exists' => '',
'Current Password' => '',
'New Password' => '',
'Password confirmation' => '',
'Your current password does not match.' => '',
'Password confirmation is not the same as password field.' => '',
'I would like to receive the newsletter or the latest news.' => '',
*/
'Placeholder firstname' => 'Prénom',
'Placeholder lastname' => 'Nom de famille',
'Placeholder email' => 'Adresse e-mail',
'Placeholder phone' => 'Téléphone',
'Placeholder cellphone' => 'Portable',
'Placeholder company' => 'Compagnie',
'Placeholder address1' => 'Adresse',
'Placeholder address2' => '',
'Placeholder city' => 'Ville',
'Placeholder zipcode' => 'Code postal',
'Placeholder address label' => 'Maison, Domicile, Travail...',
'Placeholder contact name' => 'Quel est votre nom ?',
'Placeholder contact email' => 'Pour me permettre de vous contacter',
'Placeholder contact subject' => 'Le sujet de votre message',
'Placeholder contact message' => 'Votre commentaire',
)
;

View File

@@ -28,12 +28,12 @@ return array (
'Free shipping' => '',
'Orders over $50' => '',
'Secure payment' => '',
'Multi-payment plateform' => '',
'Multi-payment platform' => '',
'Need help ?' => '',
'Questions ? See or F.A.Q.' => '',
'Latest articles' => '',
'No articles currently' => '',
'Usefull links' => '',
'Useful links' => '',
'Login' => '',
'Follow us' => '',
'Newsletter' => '',
@@ -113,11 +113,11 @@ return array (
'Coupon code' => '',
'Ok' => '',
'Delivery address' => '',
'Billing addres' => '',
'Billing address' => '',
'Change address' => '',
'Choose your payment method' => '',
'Secure Payment' => '',
'You chose to pay by' => '',
'You choose to pay by' => '',
'Thank you for the trust you place in us.' => '',
'A summary of your order email has been sent to the following address' => '',
'Your order will be confirmed by us upon receipt of your payment.' => '',
@@ -139,7 +139,7 @@ return array (
'View order %ref as pdf document' => '',
'Order details' => '',
'You don\'t have orders yet.' => '',
'Update Profil' => '',
'Update Profile' => '',
'Personal Informations' => '',
'Select Title' => '',
'Update' => '',
@@ -152,5 +152,63 @@ return array (
'Select Country' => '',
'Create' => '',
'Related' => '',
'Grid' => '',
'List' => '',
'Next' => '',
'Previous' => '',
/*
'The page cannot be found' => '',
'What\'s your name?' => '',
'So I can get back to you.' => '',
'The subject of your message.' => '',
'And your message...' => '',
'This email already exists.' => '',
'Address label' => '',
'Title' => '',
'First Name' => '',
'Last Name' => '',
'Company Name' => '',
'Street Address' => '',
'Address Line 2' => '',
'Address Line 3' => '',
'City' => '',
'Zip code' => '',
'Country' => '',
'Phone' => '',
'Cellphone' => '',
'Make this address as my primary address' => '',
'Full Name' => '',
'Your Email Address' => '',
'Subject' => '',
'Your Message' => '',
'Please enter your email address' => '',
'No, I am a new customer.' => '',
'Yes, I have a password :' => '',
'Please enter your password' => '',
'This value should not be blank.' => '',
'A user already exists with this email address. Please login or if you\'ve forgotten your password, go to Reset Your Password.' => '',
'This email does not exists' => '',
'Current Password' => '',
'New Password' => '',
'Password confirmation' => '',
'Your current password does not match.' => '',
'Password confirmation is not the same as password field.' => '',
'I would like to receive the newsletter or the latest news.' => '',
*/
'Placeholder firstname' => '',
'Placeholder lastname' => '',
'Placeholder email' => '',
'Placeholder phone' => '',
'Placeholder cellphone' => '',
'Placeholder company' => '',
'Placeholder address1' => '',
'Placeholder address2' => '',
'Placeholder city' => '',
'Placeholder zipcode' => '',
'Placeholder address label' => '',
'Placeholder contact name' => '',
'Placeholder contact email' => '',
'Placeholder contact subject' => '',
'Placeholder contact message' => '',
)
;

View File

@@ -1,14 +1,18 @@
{extends file="layout.tpl"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{/block}
{* Body Class *}
{block name="body-class"}page-account-password{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = [['title' => {intl l="Account"}, 'url'=>{url path="/account"}]]}
{$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Change Password"}, 'url'=>{url path="/account/password"}]
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Change Password"}, 'url'=>{url path="/account/password"}]
]}
{/block}
@@ -37,12 +41,14 @@
<div class="panel-body">
{form_field form=$form field="password_old"}
<div class="form-group group-password_old {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-password_old{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value}" {if $required} aria-required="true" required{/if}{if $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" value="{$value}" {if $required} aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
{if $error}
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
{/if}
</div>
@@ -50,25 +56,24 @@
{/form_field}
{form_field form=$form field="password"}
<div class="form-group group-password {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-password{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="password_confirm"}
<div class="form-group group-password_confirm {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-password_confirm{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{assign var="error_focus" value="true"}
<span class="help-block">{$message}</span>
{/if}
</div>
</div><!--/.form-group-->

View File

@@ -1,14 +1,18 @@
{extends file="layout.tpl"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{/block}
{* Body Class *}
{block name="body-class"}page-account-update{/block}
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = [['title' => {intl l="Account"}, 'url'=>{url path="/account"}]]}
{$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Update Profil"}, 'url'=>{url path="/account/update"}]
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Update Profile"}, 'url'=>{url path="/account/update"}]
]}
{/block}
@@ -17,10 +21,9 @@
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">{intl l="Update Profil"}</h1>
<h1 id="main-label" class="page-header">{intl l="Update Profile"}</h1>
{form name="thelia.front.customer.profil.update"}
{assign var="isPost" value="{$smarty.post|count}"}
{form name="thelia.front.customer.profile.update"}
<form id="form-register" class="form-horizontal" action="{url path="/account/update"}" method="post" role="form">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/account"}" />
@@ -37,7 +40,7 @@
<div class="panel-body">
{form_field form=$form field="title"}
<div class="form-group group-title {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-title{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
@@ -46,56 +49,48 @@
<option value="{$ID}" {if $value == $ID}selected{/if} >{$LONG}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{if $error}
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
{elseif $isPost && $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="firstname"}
<div class="form-group group-firstname {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-firstname {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder firstname"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $isPost && $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="lastname"}
<div class="form-group group-lastname {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-lastname {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="Doe" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder lastname"}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $isPost && $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="email"}
<div class="form-group group-email {if $error}has-error{elseif $isPost && $value != "" && !$error}has-success{/if}">
<div class="form-group group-email {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="johndoe@domain.com" value="{$smarty.get.email|default:$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder email"}" value="{$smarty.get.email|default:$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $isPost && $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
@@ -111,7 +106,7 @@
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}"{if $checked} checked{/if} {if $required} aria-required="true" required{/if}>{$label}
</label>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{/if}
</div>
</div>

View File

@@ -1,5 +1,6 @@
{extends file="layout.tpl"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{/block}
@@ -7,7 +8,7 @@
{* Breadcrumb *}
{block name='no-return-functions' append}
{$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}]
['title' => {intl l="Account"}, 'url'=>{url path="/account"}]
]}
{/block}
@@ -32,7 +33,7 @@
<div id="account-info" class="panel-collapse collapse in">
{loop type="customer" name="customer.info"}
<div class="panel-body">
<p class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</p>
<p class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME|ucwords} {$LASTNAME|upper}</p>
{loop type="address" name="address.default" default="true"}
<ul class="list-info">
<li>
@@ -49,12 +50,12 @@
</address>
</li>
<li>
{if $CELLPHONE != ""}
<span class="tel">{$CELLPHONE}</span>
{/if}
{if $PHONE != ""}
<span class="tel">{$PHONE}</span>
{/if}
{if $CELLPHONE != ""}
<span class="mobile">{$CELLPHONE}</span>
{/if}
<span class="email">{mailto address="{$EMAIL}" encode="hex"}</span>
</li>
<li class="group-btn">
@@ -86,7 +87,7 @@
<td>
<ul class="list-address">
<li>
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME} {$LASTNAME}</span>
<span class="fn">{loop type="title" name="customer.title.info" id=$TITLE}{$SHORT}{/loop} {$FIRSTNAME|ucwords} {$LASTNAME|upper}</span>
{if $COMPANY}
<span class="org">{$COMPANY}</span>
{/if}
@@ -118,7 +119,7 @@
<div class="group-btn">
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="{intl l="Edit this address"}"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
{if $DEFAULT != 1}
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address" data-toggle="popover" title="Do you really want to delete this address ?" data-content="And here's some amazing content. It's very engaging. right?" title="{intl l="Remove this address"}" ><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address" data-confirm="{intl l="Do you really want to delete this address ?"}" data-confirm-callback="address.delete" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
{/if}
</div>
</td>

View File

@@ -1,6 +1,7 @@
{extends file="layout.tpl"}
{block name="no-return-functions"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{/block}
@@ -11,7 +12,7 @@
{block name='no-return-functions' append}
{$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Address Update"}, 'url'=>{url path="/address"}]
['title' => {intl l="Address Update"}, 'url'=>{url path="/address/update/{$address_id}"}]
]}
{/block}
@@ -20,16 +21,16 @@
<article class="col-main" role="main" aria-labelledby="main-label">
<h1 id="main-label" class="page-header">{intl l="Create New Address"}</h1>
<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}"}
{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_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/account"}" /> {* the url the user is redirected to on login success *}
<input type="hidden" name="{$name}" value="{url path="/account"}" />
{/form_field}
{form_field form=$form field='error_message'}
<input type="hidden" name="{$name}" value="{intl l="missing or invalid data"}" /> {* the url the user is redirected to on login success *}
<input type="hidden" name="{$name}" value="{intl l="missing or invalid data"}" />
{/form_field}
{form_hidden_fields form=$form}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
@@ -40,15 +41,16 @@
<div class="panel-body">
{form_field form=$form field="label"}
<div class="form-group group-label {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-label{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$LABEL}}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Home address"}" autofocus>
<input type="text" name="{$name}" value="{$value|default:{$LABEL}}" id="{$label_attr.for}" class="form-control" minlength="2" maxlength="255" placeholder="{intl l="Placeholder address label"}"{if $required} aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -57,34 +59,32 @@
{form_field form=$form field="title"}
{assign var="customer_title_id" value="{$value|default:$TITLE}"}
<div class="form-group group-title {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="form-group group-title{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required autofocus>
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<option value="">-- {intl l="Select Title"} --</option>
{loop type="title" name="title.list"}
<option value="{$ID}" {if $customer_title_id == $ID}selected{/if} >{$LONG}</option>
<option value="{$ID}" {if $customer_title_id == $ID}selected{/if}>{$LONG}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="firstname"}
<div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-firstname {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$FIRSTNAME}}" id="{$label_attr.for}" class="form-control" placeholder="John" required>
<input type="text" name="{$name}" value="{$value|default:{$FIRSTNAME}}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder firstname"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -93,15 +93,14 @@
<!--/.form-group-->
{form_field form=$form field="lastname"}
<div class="form-group group-lastname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-lastname {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$LASTNAME}}" id="{$label_attr.for}" class="form-control" placeholder="Doe" required>
<input type="text" name="{$name}" value="{$value|default:{$LASTNAME}}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder lastname"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -109,15 +108,14 @@
{/form_field}
{form_field form=$form field="address1"}
<div class="form-group group-address1 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-address1 {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$ADDRESS1}}" id="{$label_attr.for}" class="form-control" placeholder="Street address" required>
<input type="text" name="{$name}" value="{$value|default:{$ADDRESS1}}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder address1"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -125,15 +123,14 @@
{/form_field}
{form_field form=$form field="address2"}
<div class="form-group group-address2 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="form-group group-address2 {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if} </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$ADDRESS2}}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Complementary address"}">
<input type="text" name="{$name}" value="{$value|default:{$ADDRESS2}}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder address2"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -141,15 +138,14 @@
{/form_field}
{form_field form=$form field="zipcode"}
<div class="form-group group-zipcode {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-zipcode {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$ZIPCODE}}" id="{$label_attr.for}" class="form-control" placeholder="H2T 2V6" required>
<input type="text" name="{$name}" value="{$value|default:{$ZIPCODE}}" id="{$label_attr.for}" class="form-control" maxlength="10" placeholder="{intl l="Placeholder zipcode"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -157,15 +153,14 @@
{/form_field}
{form_field form=$form field="city"}
<div class="form-group group-city {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-city {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$CITY}}" id="{$label_attr.for}" class="form-control" placeholder="New York" required>
<input type="text" name="{$name}" value="{$value|default:{$CITY}}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder city"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -173,35 +168,33 @@
{/form_field}
{form_field form=$form field="country"}
{assign var="customer_country_id" value="{$value|default:$COUNTRY}"}
<div class="form-group group-country {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
{assign var="customer_country_id" value="{$value|default:$COUNTRY}"}
<div class="form-group group-country {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<option value="">-- {intl l="Select Country"} --</option>
{loop type="country" name="country.list"}
<option value="{$ID}" {if $customer_country_id == $ID}selected{/if} >{$TITLE}</option>
<option value="{$ID}" {if $customer_country_id == $ID}selected{/if}>{$TITLE}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="phone"}
<div class="form-group group-phone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="form-group group-phone {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$PHONE}}" id="{$label_attr.for}" class="form-control" placeholder="">
<input type="text" name="{$name}" value="{$value|default:{$PHONE}}" id="{$label_attr.for}" class="form-control" maxlength="20" placeholder="{intl l="Placeholder phone"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -209,15 +202,14 @@
{/form_field}
{form_field form=$form field="cellphone"}
<div class="form-group group-cellphone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="form-group group-cellphone {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value|default:{$CELLPHONE}}" id="{$label_attr.for}" class="form-control" placeholder="">
<input type="text" name="{$name}" value="{$value|default:{$CELLPHONE}}" id="{$label_attr.for}" class="form-control" maxlength="20" placeholder="{intl l="Placeholder cellphone"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -227,21 +219,23 @@
</fieldset>
{form_field form=$form field="is_default"}
{if not $DEFAULT}
<div class="form-group group-primary">
<div class="control-input">
<div class="checkbox">
<label class="control-label" for="{$label_attr.for}">
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="1" {if $DEFAULT}checked{/if}> {$label}
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="1"> {$label}
</label>
</div>
</div>
</div>
<!--/.form-group-->
{/if}
{/form_field}
<div class="form-group group-btn">
<div class="control-btn">
<button type="submit" class="btn btn-submit">{intl l="Create"}</button>
<button type="submit" class="btn btn-submit">{intl l="Update"}</button>
</div>
</div>
<!--/.form-group-->

View File

@@ -1,6 +1,7 @@
{extends file="layout.tpl"}
{block name="no-return-functions"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{/block}
@@ -11,7 +12,7 @@
{block name='no-return-functions' append}
{$breadcrumbs = [
['title' => {intl l="Account"}, 'url'=>{url path="/account"}],
['title' => {intl l="Address"}, 'url'=>{url path="/address"}]
['title' => {intl l="Add a New Address"}, 'url'=>{url path="/address/create"}]
]}
{/block}
@@ -24,11 +25,11 @@
{form name="thelia.front.address.create"}
<form id="form-address" class="form-horizontal" action="{url path="/address/create"}" method="post" role="form">
{form_field form=$form field='success_url'}
<input type="hidden" name="{$name}" value="{url path="/account"}" /> {* the url the user is redirected to on login success *}
<input type="hidden" name="{$name}" value="{url path="/account"}" />
{/form_field}
{form_field form=$form field='error_message'}
<input type="hidden" name="{$name}" value="{intl l="missing or invalid data"}" /> {* the url the user is redirected to on login success *}
<input type="hidden" name="{$name}" value="{intl l="missing or invalid data"}" />
{/form_field}
{form_hidden_fields form=$form}
{if $form_error}<div class="alert alert-danger">{$form_error_message}</div>{/if}
@@ -39,15 +40,16 @@
<div class="panel-body">
{form_field form=$form field="label"}
<div class="form-group group-label {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-label{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Home address"}" autofocus>
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" minlength="2" maxlength="255" placeholder="{intl l="Placeholder address label"}"{if $required} aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -55,34 +57,32 @@
{/form_field}
{form_field form=$form field="title"}
<div class="form-group group-title {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="form-group group-title{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required autofocus>
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<option value="">-- {intl l="Select Title"} --</option>
{loop type="title" name="title.list"}
<option value="{$ID}" {if $value == $ID}selected{/if} >{$LONG}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="firstname"}
<div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-firstname {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="John" required>
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder firstname"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -91,15 +91,14 @@
<!--/.form-group-->
{form_field form=$form field="lastname"}
<div class="form-group group-lastname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-lastname {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="Doe" required>
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder lastname"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -107,15 +106,14 @@
{/form_field}
{form_field form=$form field="address1"}
<div class="form-group group-address1 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-address1 {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="Street address" required>
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder address1"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -123,15 +121,14 @@
{/form_field}
{form_field form=$form field="address2"}
<div class="form-group group-address2 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="form-group group-address2 {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if} </label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="Complementary address"}">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder address2"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -139,15 +136,14 @@
{/form_field}
{form_field form=$form field="zipcode"}
<div class="form-group group-zipcode {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-zipcode {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="H2T 2V6" required>
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="10" placeholder="{intl l="Placeholder zipcode"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -155,15 +151,14 @@
{/form_field}
{form_field form=$form field="city"}
<div class="form-group group-city {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: <span class="required">*</span></label>
<div class="form-group group-city {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="New York" required>
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder city"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -171,34 +166,32 @@
{/form_field}
{form_field form=$form field="country"}
<div class="form-group group-country {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label} <span class="required">*</span></label>
<div class="form-group group-country {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control" required>
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<option value="">-- {intl l="Select Country"} --</option>
{loop type="country" name="country.list"}
<option value="{$ID}" {if $value == $ID}selected{/if} >{$TITLE}</option>
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="phone"}
<div class="form-group group-phone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="form-group group-phone {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="20" placeholder="{intl l="Placeholder phone"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>
@@ -206,15 +199,14 @@
{/form_field}
{form_field form=$form field="cellphone"}
<div class="form-group group-cellphone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}: </label>
<div class="form-group group-cellphone {if $error}has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}:{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" placeholder="">
<input type="text" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="20" placeholder="{intl l="Placeholder cellphone"}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{/if}
</div>
</div>

Binary file not shown.

Before

Width:  |  Height:  |  Size: 698 KiB

After

Width:  |  Height:  |  Size: 248 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 766 KiB

After

Width:  |  Height:  |  Size: 237 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 298 KiB

After

Width:  |  Height:  |  Size: 121 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.4 KiB

View File

@@ -1,7 +1,20 @@
/* JQUERY PREVENT CONFLICT */
(function($) {
/* ------------------------------------------------------------------
/* ------------------------------------------------------------------
callback Function -------------------------------------------------- */
var confirmCallback = {
'address.delete': function($elm){
$.post($elm.attr('href'), function(data){
if(data.success)
$elm.closest('tr').remove();
else
bootbox.alert(data.message);
});
}
}
/* ------------------------------------------------------------------
onLoad Function -------------------------------------------------- */
$(document).ready(function(){
@@ -48,20 +61,26 @@
});
// Confirm Dialog
$(document).on('click.confirm', '[data-toggle="confirm"]', function (e) {
var $this = $(this),
href = $this.attr('href'),
title = $this.attr('data-confirm-title') ? $this.attr('data-confirm-title') : 'Are you sure?';
$(document).on('click.confirm', '[data-confirm]', function (e) {
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?';
bootbox.confirm(title, function(confirm) {
bootbox.confirm(title, function(confirm) {
if(confirm){
if(href){
window.location.href = href;
//Check if callback and if it's a function
if (callback && $.isFunction(confirmCallback[callback])) {
confirmCallback[callback]($this);
} else {
// If forms
var $form = $this.closest("form");
if($form.size() > 0){
$form.submit();
if(href){
window.location.href = href;
} else {
// If forms
var $form = $this.closest("form");
if($form.size() > 0){
$form.submit();
}
}
}
}
@@ -195,7 +214,7 @@
});
// Apply validation
$('#form-contact, #form-register').validate({
$('#form-contact, #form-register, #form-address').validate({
highlight: function(element) {
$(element).closest('.form-group').addClass('has-error');
},
@@ -203,14 +222,14 @@
$(element).closest('.form-group').removeClass('has-error');
},
errorElement: 'span',
errorClass: 'help-block',
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);
}
}
}*/
});

View File

@@ -2,7 +2,8 @@
.account-info {
.list-info {
address { margin-bottom: 0; }
.mobile,
.tel,
.email {
display: block;

View File

@@ -4,7 +4,7 @@
#delivery-address {
.panel-heading {
position: relative;
> .btn-add-address { position: absolute; top: 3px; right: 5px; margin:0; padding: 0; text-transform: none; }
> .btn-add-address { position: absolute; top: 7px; right: 10px; margin:0; padding: 0; text-transform: none; }
}
}

View File

@@ -3,19 +3,6 @@
// Main Title
.page-header { margin-top: 0; }
// 404 Page
.page_404{
color: @brand-primary;
font-size: 9em; font-weight: bold;
text-align: center;
span{
color : #CCC;
display: block;
font-size: 15px; font-weight: normal;
}
}
// Collapse
.no-js .collapse { display: block!important; }

View File

@@ -30,5 +30,5 @@
// Thelia : Pages
@import "page-home.less";
@import "page-error.less";
//@import "page-login.less";
//@import "page-error.less";

View File

@@ -0,0 +1,15 @@
// 404 Page
.page-404 {
.main { padding: 10px 0 100px; }
#main-label {
color: @brand-primary;
font-size: 9em; font-weight: bold;
text-align: center;
span{
color : #CCC;
display: block;
font-size: 15px; font-weight: normal;
}
}
}

View File

@@ -25,6 +25,13 @@ body { padding-top: 80px; }
}
}
.has-error .help-block {
&:before {
.icon(@remove);
margin-right: .3em;
}
}
label { font-weight: 600; }
// Dropdowns
@@ -1045,6 +1052,7 @@ td.product,
.fn { font-size: 16px; font-weight: 600; }
.list-info {
.mobile,
.tel,
.email {
&:before {
@@ -1054,7 +1062,8 @@ td.product,
vertical-align: middle;
}
}
.tel:before { .icon(@mobile-phone); font-size: 30px; }
.mobile:before { .icon(@mobile-phone); font-size: 30px; }
.tel:before { .icon(@phone); font-size: 22px; }
.email:before { .icon(@envelope); font-size: 18px; }
}
.group-btn {

View File

@@ -18,12 +18,7 @@
{nocache}
{ifloop rel="cartloop"}
<div class="btn-group checkout-progress">
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{include file="misc/checkout-progress.tpl" step="cart"}
<table class="table table-cart">
<colgroup>
@@ -49,7 +44,7 @@
<span class="visible-xs">{intl l="Qty"}</span>
</th>
<th class="subprice">
<span class="hidden-xs">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></span>
<span class="hidden-xs">{intl l="Total"}</span>
<span class="visible-xs">{intl l="Total"}</span>
</th>
</tr>
@@ -105,7 +100,7 @@
<div class="form-group group-qty">
<form action="{url path="/cart/update"}" method="post" role="form">
<input type="hidden" name="cart_item" value="{$ITEM_ID}">
<select name="quantity" class="form-control js-update-quantity">
<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}
@@ -163,16 +158,4 @@
{/ifloop}
</div>
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
jQuery(function($cart) {
$cart('.js-update-quantity').on('change', function(e) {
var newQuantity = $cart(this).val();
$cart(this).parent().submit();
})
});
</script>
{/block}

View File

@@ -25,12 +25,12 @@
<div class="panel-body">
<div class="row">
{form_field form=$form field="name"}
<div class="form-group group-name col-sm-6 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-name col-sm-6{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="What's your name?"}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder contact name"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
@@ -39,44 +39,38 @@
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="email"}
<div class="form-group group-email col-sm-6 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-email col-sm-6{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="So I can get back to you."}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder contact email"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
</div>
{form_field form=$form field="subject"}
<div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-firstname{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="{intl l="The subject of your message."}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder contact subject"}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="message"}
<div class="form-group group-message {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-message{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<textarea name="{$name}" id="{$label_attr.for}" placeholder="{intl l='And your message...'}" rows="6" class="form-control"{if $required} aria-required="true" required{/if}>{$value}</textarea>
<textarea name="{$name}" id="{$label_attr.for}" placeholder="{intl l="Placeholder contact message"}" rows="6" class="form-control"{if $required} aria-required="true" required{/if}>{$value}</textarea>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->

View File

@@ -21,13 +21,12 @@
<img src="{$IMAGE_URL}" alt="{$TITLE}">
{/loop}
{/ifloop}
</td>
<td class="product">
<h3 class="name" style="margin:0"><a href="{$URL}">
{$TITLE}
</a></h3>
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove" data-tip="tooltip" data-title="Delete" data-original-title=""><i class="icon-trash"></i> <span>Remove</span></a>
<a href="{url path="/cart/delete/{$ITEM_ID}"}" class="btn btn-remove" data-tip="tooltip" data-title="Delete" data-original-title=""><i class="icon-trash"></i> <span>{intl l="Remove"}</span></a>
</td>
<td class="unitprice text-center">
{if $IS_PROMO == 1}

View File

@@ -30,8 +30,8 @@
<span class="view-mode">
<span class="view-mode-label">{intl l="View as"}:</span>
<span class="view-mode-btn">
<a href="{url path="{navigate to="current"}" mode='grid'}" data-toggle="view" role="button" class="btn btn-grid"><i class="icon-grid"></i></a>
<a href="{url path="{navigate to="current"}" mode="list"}" data-toggle="view" role="button" class="btn btn-list "><i class="icon-list"></i></a>
<a href="{url path="{navigate to="current"}" mode="grid"}" data-toggle="view" role="button" title="{intl l="Grid"}" rel="nofollow" class="btn btn-grid"><i class="icon-grid"></i></a>
<a href="{url path="{navigate to="current"}" mode="list"}" data-toggle="view" role="button" title="{intl l="List"}" rel="nofollow" class="btn btn-list"><i class="icon-list"></i></a>
</span>
</span><!-- /.view-mode -->
@@ -42,9 +42,9 @@
<ul class="pagination">
{if $product_page > 1}
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" class="prev"><i class="icon-prev"></i></a></li>
<li><a href="{url path={navigate to="current"} page={$product_page-1} }" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
{else}
<li><a href="#" class="prev"><i class="icon-prev"></i></a></li>
<li><a href="#" title="{intl l="Previous"}" class="prev"><i class="icon-prev"></i></a></li>
{/if}
{pageloop rel="product_list"}
{if $PAGE != $CURRENT}
@@ -54,9 +54,9 @@
{/if}
{if $PAGE == $LAST}
{if $CURRENT < $LAST}
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" class="next"><i class="icon-next"></i></a></li>
<li><a href="{url path={navigate to="current"} page={$CURRENT+1} }" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
{else}
<li><a href="#" class="next"><i class="icon-next"></i></a></li>
<li><a href="#" title="{intl l="Next"}" class="next"><i class="icon-next"></i></a></li>
{/if}
{/if}

View File

@@ -48,6 +48,12 @@ GNU General Public License : http://www.gnu.org/licenses/
{block name="stylesheet"}{/block}
{* Favicon *}
{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>
@@ -200,7 +206,7 @@ GNU General Public License : http://www.gnu.org/licenses/
</div>
<div class="col">
<span class="icon-credit-card"></span>
{intl l="Secure payment"} <small>{intl l="Multi-payment plateform"}</small>
{intl l="Secure payment"} <small>{intl l="Multi-payment platform"}</small>
</div>
<div class="col">
<span class="icon-info"></span>
@@ -239,7 +245,7 @@ GNU General Public License : http://www.gnu.org/licenses/
</div>
<div class="col">
<section class="block block-default">
<div class="block-heading"><h3 class="block-title">{intl l="Usefull links"}</h3></div>
<div class="block-heading"><h3 class="block-title">{intl l="Useful links"}</h3></div>
<div class="block-content">
<ul>
{loop name="footer_links" type="content" folder="2"}

View File

@@ -31,9 +31,9 @@
<div class="form-group group-email{if $error} has-error{/if}">
<label for="{$label_attr.for}">{$label}</label>
<div class="control-input">
<input type="email" name="{$name}" id="{$label_attr.for}" value="{$value}" class="form-control" {$attr} {if $required}aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
<input type="email" name="{$name}" id="{$label_attr.for}" value="{$value}" class="form-control" maxlength="255" {$attr} {if $required}aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
@@ -57,9 +57,9 @@
<div class="form-group group-password{if $error} has-error{/if}">
<label for="{$label_attr.for}" class="sr-only">{$label}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if !isset($error_focus)} autofocus{/if}>
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" autocomplete="off"{if !isset($error_focus)} autofocus{/if}>
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>
<span class="help-block">{$message}</span>
{/if}
</div>
</div>

View File

@@ -0,0 +1,28 @@
{if $step eq "cart"}
{assign var="step1" value=" active"}
{assign var="step2" value=" disabled"}
{assign var="step3" value=" disabled"}
{assign var="step4" value=" disabled"}
{elseif $step eq "delivery"}
{assign var="step1" value=""}
{assign var="step2" value=" active"}
{assign var="step3" value=" disabled"}
{assign var="step4" value=" disabled"}
{elseif $step eq "invoice"}
{assign var="step1" value=""}
{assign var="step2" value=""}
{assign var="step3" value=" active"}
{assign var="step4" value=" disabled"}
{elseif $step eq "last"}
{assign var="step1" value=" disabled"}
{assign var="step2" value=" disabled"}
{assign var="step3" value=" disabled"}
{assign var="step4" value=" active"}
{/if}
<div class="btn-group checkout-progress">
<a href="{url path="/cart"}" role="button" class="btn btn-step{$step1}"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="{url path="/order/delivery"}" role="button" class="btn btn-step{$step2}"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="{url path="/order/invoice"}" role="button" class="btn btn-step{$step3}"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="{url path="/order/placed"}" role="button" class="btn btn-step{$step4}"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>

View File

@@ -18,7 +18,7 @@
<div class="form-group group-email {if $error}has-error{elseif !$error && $value != ""}has-success{/if}">
<label for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="email" name="{$name}" id="{$label_attr.for}" value="{$value}" class="form-control" {if $required} aria-required="true" required{/if} autofocus>
<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>
{elseif !$error && $value != ""}

View File

@@ -1,6 +1,7 @@
{extends file="layout.tpl"}
{block name="no-return-functions"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{check_cart_not_empty}
{/block}
@@ -23,12 +24,7 @@
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{include file="misc/checkout-progress.tpl" step="delivery"}
{form name="thelia.order.delivery"}
{assign var="isPost" value="{$smarty.post|count}"}
@@ -52,18 +48,19 @@
<table class="table table-address" role="presentation" summary="Address Books">
<tbody>
{loop type="address" name="customer.addresses" customer="current"}
{assign var="isDeliveryAddressChecked" value="0"}
{if $isPost}
{if $value == $ID}
{assign var="isDeliveryAddressChecked" value="true"}
{assign var="isDeliveryAddressChecked" value="1"}
{/if}
{elseif $DEFAULT}
{assign var="isDeliveryAddressChecked" value="true"}
{assign var="isDeliveryAddressChecked" value="1"}
{/if}
<tr>
<th>
<div class="radio">
<label for="delivery-address_{$ID}">
<input type="radio" name="{$name}" value="{$ID}"{if isDeliveryAddressChecked } checked="checked"{/if} id="delivery-address_{$ID}">
<input type="radio" name="{$name}" value="{$ID}"{if $isDeliveryAddressChecked} checked="checked"{/if} id="delivery-address_{$ID}">
{$LABEL|default:"{intl l='Address %nb' nb={$LOOP_COUNT}}"}
</label>
</div>
@@ -101,14 +98,12 @@
<div class="group-btn">
<a href="{url path="/address/update/{$ID}"}" class="btn btn-edit-address" data-toggle="tooltip" title="{intl l="Edit this address"}"><i class="icon-pencil"></i> <span>{intl l="Edit"}</span></a>
{if $DEFAULT != 1}
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address js-remove-address" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
<a href="{url path="/address/delete/{$ID}"}" class="btn btn-remove-address" data-confirm="{intl l="Do you really want to delete this address ?"}" data-confirm-callback="address.delete" title="{intl l="Remove this address"}" data-toggle="tooltip"><i class="icon-remove"></i> <span>{intl l="Cancel"}</span></a>
{/if}
</div>
</td>
</tr>
{/loop}
</tbody>
</table>
</div>
@@ -127,14 +122,15 @@
</div>
<div class="panel-body">
{loop type="delivery" name="deliveries" force_return="true"}
{assign var="isDeliveryMethodChecked" value="0"}
<div class="radio">
{form_field form=$form field='delivery-module'}
{if $isPost}
{if $value == $ID}
{assign var="isDeliveryMethodChecked" value="true"}
{assign var="isDeliveryMethodChecked" value="1"}
{/if}
{elseif $LOOP_COUNT == 1}
{assign var="isDeliveryMethodChecked" value="true"}
{assign var="isDeliveryMethodChecked" value="1"}
{/if}
<label for="delivery-method_{$ID}">
<input type="radio" name="{$name}" id="delivery-method_{$ID}"{if $isDeliveryMethodChecked} checked="checked"{/if} value="{$ID}">
@@ -156,38 +152,4 @@
</article>
</div>
<div class="modal fade" id="address-delete-modal" tabindex="-1" role="dialog" aria-hidden="true">
<div class="modal-dialog">
<div class="modal-content">
<div class="modal-header">
<button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
<h3>{intl l="Delete address"}</h3>
</div>
<div class="modal-body">
{intl l="Do you really want to delete this address ?"}
</div>
<div class="modal-footer">
<a href="#" type="button" class="btn btn-default" data-dismiss="modal" aria-hidden="true"><span class="glyphicon glyphicon-remove"></span> {intl l="No"}</a>
<a href="#" id="address-delete-link" type="submit" class="btn btn-default btn-primary"><span class="glyphicon glyphicon-check"></span> {intl l="Yes"}</a>
</div>
</div>
</div>
</div>
{/block}
{block name="javascript-initialization"}
<script type="text/javascript">
jQuery(function($cart) {
$cart(".js-remove-address").click(function(e){
e.preventDefault();
$cart("#address-delete-link").attr("href", $cart(this).attr("href"));
$cart('#address-delete-modal').modal('show');
})
});
</script>
{/block}

View File

@@ -1,6 +1,7 @@
{extends file="layout.tpl"}
{block name="no-return-functions"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{check_cart_not_empty}
{check_valid_delivery}
@@ -24,12 +25,7 @@
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="{url path="/cart"}" role="button" class="btn btn-step"><span class="step-nb">1</span> <span class="step-label"> <span>{intl l="Your Cart"}</span></a>
<a href="{url path="/order/delivery"}" role="button" class="btn btn-step"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="#" role="button" class="btn btn-step active"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="#" role="button" class="btn btn-step disabled"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{include file="misc/checkout-progress.tpl" step="invoice"}
{form name="thelia.order.coupon"}
@@ -59,10 +55,10 @@
</th>
<th class="qty">
<span class="hidden-xs">{intl l="Quantity"}</span>
<span class="visible-xs">{intl l="Quantity"}</span>
<span class="visible-xs">{intl l="Qty"}</span>
</th>
<th class="subprice">
<span class="hidden-xs">{intl l="Total"} <abbr title="{intl l="Tax Inclusive"}">{intl l="TTC"}</abbr></span>
<span class="hidden-xs">{intl l="Total"}</span>
<span class="visible-xs">{intl l="Total"}</span>
</th>
</tr>
@@ -147,7 +143,7 @@
<button type="submit" class="btn btn-coupon">{intl l="Ok"}</button>
</span>
</div>
{if $error}<span class="help-block"><i class="icon-remove"></i> {$message}</span>{/if}
{if $error}<span class="help-block">{$message}</span>{/if}
</div>
{/form_field}
<!-- /input-group -->
@@ -197,7 +193,7 @@
{form_field form=$form field='invoice-address'}
<div class="panel">
<div class="panel-heading">{intl l="Billing addres"}s</div>
<div class="panel-heading">{intl l="Billing address"}s</div>
{if $error}
<span class="help-block"><span class="icon-remove"></span> {$message}</span>

View File

@@ -1,5 +1,10 @@
{extends file="layout.tpl"}
{* Security *}
{block name="no-return-functions" prepend}
{check_auth context="front" role="CUSTOMER" login_tpl="login"}
{/block}
{* Body Class *}
{block name="body-class"}page-order-payment{/block}
@@ -18,18 +23,13 @@
<h1 id="main-label" class="page-header">{intl l="Your Cart"}</h1>
<div class="btn-group checkout-progress">
<a href="cart.php" role="button" class="btn btn-step disabled"><span class="step-nb">1</span> <span class="step-label">{intl l="Your Cart"}</span></a>
<a href="cart-step2.php" role="button" class="btn btn-step disabled"><span class="step-nb">2</span> <span class="step-label">{intl l="Billing and delivery"}</span></a>
<a href="cart-step3.php" role="button" class="btn btn-step disabled"><span class="step-nb">3</span> <span class="step-label">{intl l="Check my order"}</span></a>
<a href="cart-step4.php" role="button" class="btn btn-step active"><span class="step-nb">4</span> <span class="step-label">{intl l="Secure payment"}</span></a>
</div>
{include file="misc/checkout-progress.tpl" step="last"}
{loop type="order" name="placed-order" id=$placed_order_id}
<div id="payment-success" class="panel">
<div class="panel-heading">
<h3 class="panel-title">{intl l="You chose to pay by"} : <span class="payment-method">{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</span></h3>
<h3 class="panel-title">{intl l="You choose to pay by"} : <span class="payment-method">{loop name="payment-module" type="module" id=$PAYMENT_MODULE}{$TITLE}{/loop}</span></h3>
</div>
<div class="panel-body">
<h3>{intl l="Thank you for the trust you place in us."}</h3>

View File

@@ -23,9 +23,9 @@
<div class="form-group group-email {if $error}has-error{elseif !$error && $value != ""}has-success{/if}">
<label for="{$label_attr.for}">{$label}</label>
<div class="control-input">
<input type="email" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" aria-required="true" autofocus required>
<input type="email" name="{$name}" value="{$value}" id="{$label_attr.for}" class="form-control" maxlength="255" aria-required="true" autofocus required>
{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="You will receive a link to reset your password."}</span>
{/if}

View File

@@ -32,7 +32,7 @@
<div class="panel-body">
{form_field form=$form field="title"}
<div class="form-group group-title {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-title{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !$value || $error} autofocus{/if}>
@@ -42,83 +42,71 @@
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif !$value}
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="firstname"}
<div class="form-group group-firstname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-firstname{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="John" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder firstname"}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="lastname"}
<div class="form-group group-lastname {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-lastname{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="Doe" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder lastname"}" value="{$value}" {if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="email"}
<div class="form-group group-email {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-email{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="johndoe@domain.com" value="{$smarty.get.email|default:$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="email" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder email"}" value="{$smarty.get.email|default:$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="phone"}
<div class="form-group group-phone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-phone{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="20" placeholder="{intl l="Placeholder phone"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="cellphone"}
<div class="form-group group-cellphone {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-cellphone{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="20" placeholder="{intl l="Placeholder cellphone"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
@@ -133,82 +121,72 @@
<div class="panel-body">
{form_field form=$form field="company"}
<div class="form-group group-company {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-company{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="Google" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder company"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="address1"}
<div class="form-group group-address1 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-address1{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="76 Ninth Avenue" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder address1"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="address2"}
<div class="form-group group-address2 {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-address2{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder address2"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="city"}
<div class="form-group group-city {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-city{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="New York" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="255" placeholder="{intl l="Placeholder city"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="zipcode"}
<div class="form-group group-zip {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-zip{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" placeholder="NY 10011" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
<input type="text" name="{$name}" id="{$label_attr.for}" class="form-control" maxlength="10" placeholder="{intl l="Placeholder zipcode"}" value="{$value}"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="country"}
<div class="form-group group-country {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-country{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<select name="{$name}" id="{$label_attr.for}" class="form-control"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
@@ -225,10 +203,8 @@
{/loop}
</select>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
@@ -242,30 +218,26 @@
<div class="panel-body">
{form_field form=$form field="password"}
<div class="form-group group-password {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-password{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
{/form_field}
{form_field form=$form field="password_confirm"}
<div class="form-group group-password_confirm {if $error}has-error{elseif $value != "" && !$error}has-success{/if}">
<div class="form-group group-password_confirm{if $error} has-error{/if}">
<label class="control-label" for="{$label_attr.for}">{$label}{if $required} <span class="required">*</span>{/if}</label>
<div class="control-input">
<input type="password" name="{$name}" id="{$label_attr.for}" class="form-control" autocomplete="off"{if $required} aria-required="true" required{/if}{if !isset($error_focus) && $error} autofocus{/if}>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{assign var="error_focus" value="true"}
{elseif $value != "" && !$error}
<span class="help-block"><i class="icon-ok"></i></span>
{/if}
</div>
</div><!--/.form-group-->
@@ -281,7 +253,7 @@
<input type="checkbox" name="{$name}" id="{$label_attr.for}" value="{$value}"{if $checked} checked{/if} {if $required} aria-required="true" required{/if}>I've read and agreed on <a href="#">Terms &amp; Conditions</a></a>.
</label>
{if $error }
<span class="help-block"><i class="icon-remove"></i> {$message}</span>
<span class="help-block">{$message}</span>
{/if}
</div>
</div>