From acdb26f94e1b4af695900d07b8fa1152c0e60045 Mon Sep 17 00:00:00 2001 From: mBertholino Date: Mon, 19 Dec 2011 14:36:29 +0000 Subject: [PATCH] // improve adminShopController adminShopUrlController and adminGroupShopController code, in order to have a default Status value activated. --- admin-dev/themes/template/shop/form.tpl | 2 +- controllers/admin/AdminGroupShopController.php | 4 +++- controllers/admin/AdminShopController.php | 5 +++-- controllers/admin/AdminShopUrlController.php | 3 ++- 4 files changed, 9 insertions(+), 5 deletions(-) diff --git a/admin-dev/themes/template/shop/form.tpl b/admin-dev/themes/template/shop/form.tpl index c46ae72a4..639693c3f 100644 --- a/admin-dev/themes/template/shop/form.tpl +++ b/admin-dev/themes/template/shop/form.tpl @@ -24,7 +24,7 @@ * International Registered Trademark & Property of PrestaShop SA *} {extends file="helper/form/form.tpl"} - +{debug} {block name="label"} {if $input.type == 'text' && $input.name == 'name'} diff --git a/controllers/admin/AdminGroupShopController.php b/controllers/admin/AdminGroupShopController.php index fe118bae8..1a200a256 100644 --- a/controllers/admin/AdminGroupShopController.php +++ b/controllers/admin/AdminGroupShopController.php @@ -229,7 +229,9 @@ class AdminGroupShopControllerCore extends AdminController ); if (isset($this->fields_import_form)) $this->tpl_form_vars = array_merge($this->tpl_form_vars, array('form_import' => $this->fields_import_form)); - + $this->fields_value = array( + 'active' => true + ); return parent::renderForm(); } diff --git a/controllers/admin/AdminShopController.php b/controllers/admin/AdminShopController.php index 935229401..e1d1db38b 100755 --- a/controllers/admin/AdminShopController.php +++ b/controllers/admin/AdminShopController.php @@ -43,7 +43,7 @@ class AdminShopControllerCore extends AdminController 'name' => array( 'title' => $this->l('Shop'), 'width' => 'auto', - 'filter_key' => 'a!name' + 'filter_key' => 'b!name' ), 'group_shop_name' => array( 'title' => $this->l('Group Shop'), @@ -326,7 +326,8 @@ class AdminShopControllerCore extends AdminController ); $this->fields_value = array( - 'id_group_shop' => $obj->id_group_shop + 'id_group_shop' => $obj->id_group_shop, + 'active' => true ); $this->tpl_form_vars = array( diff --git a/controllers/admin/AdminShopUrlController.php b/controllers/admin/AdminShopUrlController.php index f03142f3e..8e6b433cf 100644 --- a/controllers/admin/AdminShopUrlController.php +++ b/controllers/admin/AdminShopUrlController.php @@ -229,7 +229,8 @@ class AdminShopUrlControllerCore extends AdminController $this->fields_value = array( 'domain' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain') : $current_shop->domain, 'domain_ssl' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'domain_ssl') : $current_shop->domain_ssl, - 'physical_uri' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'physical_uri') : $current_shop->physical_uri + 'physical_uri' => Validate::isLoadedObject($obj) ? $this->getFieldValue($obj, 'physical_uri') : $current_shop->physical_uri, + 'active' => true ); return parent::renderForm();