diff --git a/admin-dev/themes/default/template/helpers/form/form.tpl b/admin-dev/themes/default/template/helpers/form/form.tpl index ff07026f2..30b00e753 100644 --- a/admin-dev/themes/default/template/helpers/form/form.tpl +++ b/admin-dev/themes/default/template/helpers/form/form.tpl @@ -31,7 +31,7 @@ {if isset($fields.title)}

{$fields.title}

{/if} {block name="defaultForm"} -
+ {if $form_id} {/if} diff --git a/classes/helper/HelperForm.php b/classes/helper/HelperForm.php index 4abbfa503..9198fc495 100644 --- a/classes/helper/HelperForm.php +++ b/classes/helper/HelperForm.php @@ -46,7 +46,7 @@ class HelperFormCore extends Helper public $title = null; /** @var string Used to override default 'submitAdd' parameter in form action attribute */ - public $submit_action = ''; + public $submit_action; public $token; public $languages = null; @@ -69,7 +69,7 @@ class HelperFormCore extends Helper public function generate() { $this->tpl = $this->createTemplate($this->base_tpl); - if ($this->submit_action == '') + if (is_null($this->submit_action)) $this->submit_action = 'submitAdd'.$this->table; $this->context->controller->addJS(_PS_JS_DIR_.'form.js'); diff --git a/controllers/front/AddressController.php b/controllers/front/AddressController.php index 8e6069725..f7cd4e4da 100644 --- a/controllers/front/AddressController.php +++ b/controllers/front/AddressController.php @@ -214,7 +214,7 @@ class AddressControllerCore extends FrontController if ($result = $address->save()) { // Update id address of the current cart if necessary - if ($address_old->isUsed()) + if (isset($address_old) && $address_old->isUsed()) { if ($this->context->cart->id_address_invoice == $address_old->id) { diff --git a/modules/blockcms/blockcms.php b/modules/blockcms/blockcms.php index f0ba78685..04a12223e 100755 --- a/modules/blockcms/blockcms.php +++ b/modules/blockcms/blockcms.php @@ -262,6 +262,8 @@ class BlockCms extends Module } $helper = $this->initForm(); + $helper->submit_action = ''; + $helper->title = $this->l('CMS Block configuration'); $helper->fields_value = $this->fields_value; $this->_html .= $helper->generateForm($this->fields_form); @@ -649,7 +651,6 @@ class BlockCms extends Module { $this->_html = ''; $this->_postProcess(); - $this->_html .= '

'.$this->l('CMS Block configuration').'

'; if (Tools::isSubmit('addBlockCMS') || Tools::isSubmit('editBlockCMS')) $this->displayAddForm();