Profile and Useful was misspelled

Add missing language key into the dictionary
This commit is contained in:
touffies
2013-11-04 16:35:01 +01:00
parent 2e21713d40
commit 65a8953143
13 changed files with 189 additions and 40 deletions

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

@@ -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)
;
}

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

@@ -26,11 +26,11 @@ use Symfony\Component\Validator\ExecutionContextInterface;
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()