BEFORE_CHANGECUSTOMER
-BEFORE_CHANGECUSTOMER+
BEFORE_UPDATECUSTOMER
+BEFORE_UPDATECUSTOMER
Sent once the customer change form has been successfully validated, and before customer update in the database.
@@ -1913,8 +1913,8 @@AFTER_CHANGECUSTOMER
-AFTER_CHANGECUSTOMER+
AFTER_UPDATECUSTOMER
+AFTER_UPDATECUSTOMER
Sent just after a successful update of a customer in the database.
diff --git a/documentation/api/files/Action/Category.php.txt b/documentation/api/files/Action/Category.php.txt index b62357b08..ddd3362a5 100755 --- a/documentation/api/files/Action/Category.php.txt +++ b/documentation/api/files/Action/Category.php.txt @@ -109,7 +109,7 @@ class Category extends BaseAction implements EventSubscriberInterface $customer = CustomerQuery::create()->findPk(1); try { $customerEvent = new CustomerEvent($customer); - $event->getDispatcher()->dispatch(TheliaEvents::BEFORE_CHANGECUSTOMER, $customerEvent); + $event->getDispatcher()->dispatch(TheliaEvents::BEFORE_UPDATECUSTOMER, $customerEvent); $data = $form->getData(); @@ -127,7 +127,7 @@ class Category extends BaseAction implements EventSubscriberInterface ); $customerEvent->customer = $customer; - $event->getDispatcher()->dispatch(TheliaEvents::AFTER_CHANGECUSTOMER, $customerEvent); + $event->getDispatcher()->dispatch(TheliaEvents::AFTER_UPDATECUSTOMER, $customerEvent); // Update the logged-in user, and redirect to the success URL (exits) // We don-t send the login event, as the customer si already logged. diff --git a/documentation/api/files/Core/Event/TheliaEvents.php.txt b/documentation/api/files/Core/Event/TheliaEvents.php.txt index e06abc3c7..ca95903a8 100755 --- a/documentation/api/files/Core/Event/TheliaEvents.php.txt +++ b/documentation/api/files/Core/Event/TheliaEvents.php.txt @@ -78,11 +78,11 @@ final class TheliaEvents /** * Sent once the customer change form has been successfully validated, and before customer update in the database. */ - const BEFORE_CHANGECUSTOMER = "action.before_changecustomer"; + const BEFORE_UPDATECUSTOMER = "action.before_changecustomer"; /** * Sent just after a successful update of a customer in the database. */ - const AFTER_CHANGECUSTOMER = "action.after_changecustomer"; + const AFTER_UPDATECUSTOMER = "action.after_changecustomer"; /** * Sent once the category creation form has been successfully validated, and before category insertion in the database. diff --git a/documentation/api/files/Model/Customer.php.txt b/documentation/api/files/Model/Customer.php.txt index cbd507bf4..a220fd0c8 100755 --- a/documentation/api/files/Model/Customer.php.txt +++ b/documentation/api/files/Model/Customer.php.txt @@ -125,7 +125,7 @@ class Customer extends BaseCustomer implements UserInterface public function preUpdate(ConnectionInterface $con = null) { $customerEvent = new CustomerEvent($this); - $this->dispatchEvent(TheliaEvents::BEFORE_CHANGECUSTOMER, $customerEvent); + $this->dispatchEvent(TheliaEvents::BEFORE_UPDATECUSTOMER, $customerEvent); return true; } @@ -133,7 +133,7 @@ class Customer extends BaseCustomer implements UserInterface public function postUpdate(ConnectionInterface $con = null) { $customerEvent = new CustomerEvent($this); - $this->dispatchEvent(TheliaEvents::AFTER_CHANGECUSTOMER, $customerEvent); + $this->dispatchEvent(TheliaEvents::AFTER_UPDATECUSTOMER, $customerEvent); } protected function dispatchEvent($eventName, CustomerEvent $customerEvent) diff --git a/templates/default/address.html b/templates/default/address.html new file mode 100644 index 000000000..afae59197 --- /dev/null +++ b/templates/default/address.html @@ -0,0 +1,99 @@ +{check_auth context="front" roles="CUSTOMER" login_tpl="login"} +{include file="includes/header.html"} +{$page_title="{intl l='My Account'}"} + + +{form name="thelia.address.create"} +{if $form_error}-
+{loop type="address" name="customer_list" customer="current"}
+
- {#LABEL} - {#FIRSTNAME} {#LASTNAME} - edit +{/loop} +