From 4346d9e57c8f1fe7339e8bcd3cd2c7fc8ec61828 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Edouard=20Gaulu=C3=A9?= Date: Mon, 6 May 2013 00:32:16 +0200 Subject: [PATCH] [*] FO : AuthController can now have its own template --- controllers/front/AuthController.php | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/controllers/front/AuthController.php b/controllers/front/AuthController.php index f5b8563b4..8eec13284 100644 --- a/controllers/front/AuthController.php +++ b/controllers/front/AuthController.php @@ -139,6 +139,9 @@ class AuthControllerCore extends FrontController 'HOOK_CREATE_ACCOUNT_TOP' => Hook::exec('displayCustomerAccountFormTop') )); + // Just set $this->template value here in case it's used by Ajax + $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); + if ($this->ajax) { // Call a hook to display more information on form @@ -150,12 +153,11 @@ class AuthControllerCore extends FrontController $return = array( 'hasError' => !empty($this->errors), 'errors' => $this->errors, - 'page' => $this->context->smarty->fetch(_PS_THEME_DIR_.'authentication.tpl'), + 'page' => $this->context->smarty->fetch($this->template), 'token' => Tools::getToken(false) ); die(Tools::jsonEncode($return)); } - $this->setTemplate(_PS_THEME_DIR_.'authentication.tpl'); } /**