diff --git a/admin-dev/themes/default/template/controllers/attributes_groups/helpers/list/list_header.tpl b/admin-dev/themes/default/template/controllers/attributes_groups/helpers/list/list_header.tpl new file mode 100644 index 000000000..a4d913f19 --- /dev/null +++ b/admin-dev/themes/default/template/controllers/attributes_groups/helpers/list/list_header.tpl @@ -0,0 +1,34 @@ +{* +* 2007-2011 PrestaShop +* +* NOTICE OF LICENSE +* +* This source file is subject to the Academic Free License (AFL 3.0) +* that is bundled with this package in the file LICENSE.txt. +* It is also available through the world-wide-web at this URL: +* http://opensource.org/licenses/afl-3.0.php +* If you did not receive a copy of the license and are unable to +* obtain it through the world-wide-web, please send an email +* to license@prestashop.com so we can send you a copy immediately. +* +* DISCLAIMER +* +* Do not edit or add to this file if you wish to upgrade PrestaShop to newer +* versions in the future. If you wish to customize PrestaShop for your +* needs please refer to http://www.prestashop.com for more information. +* +* @author PrestaShop SA +* @copyright 2007-2011 PrestaShop SA +* @version Release: $Revision$ +* @license http://opensource.org/licenses/afl-3.0.php Academic Free License (AFL 3.0) +* International Registered Trademark & Property of PrestaShop SA +*} + +{extends file="helpers/list/list_header.tpl"} +{block name=leadin} + +{/block} \ No newline at end of file diff --git a/controllers/admin/AdminAttributesGroupsController.php b/controllers/admin/AdminAttributesGroupsController.php index eb60553c2..c2016958e 100644 --- a/controllers/admin/AdminAttributesGroupsController.php +++ b/controllers/admin/AdminAttributesGroupsController.php @@ -557,13 +557,13 @@ class AdminAttributesGroupsControllerCore extends AdminController else if (!$object = new Attribute((int)Tools::getValue($this->identifier))) $this->errors[] = Tools::displayError('An error occurred while updating status for object.').' '.$this->table.' '.Tools::displayError('(cannot load object)'); - if (Tools::getValue('position') && Tools::getValue('id_attribute')) + if (Tools::getValue('position') !== false && Tools::getValue('id_attribute')) { $_POST['id_attribute_group'] = $object->id_attribute_group; if (!$object->updatePosition((int)Tools::getValue('way'), (int)Tools::getValue('position'))) $this->errors[] = Tools::displayError('Failed to update the position.'); else - Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminAttributesGroups')); + Tools::redirectAdmin(self::$currentIndex.'&conf=5&token='.Tools::getAdminTokenLite('AdminAttributesGroups').'#details_details_'.$object->id_attribute_group); } else if (Tools::isSubmit('deleteattribute') && Tools::getValue('id_attribute')) {