From 5781694b9f8d1615a0da1ce6188a7e057beb3579 Mon Sep 17 00:00:00 2001 From: rMalie Date: Sat, 19 May 2012 10:43:01 +0000 Subject: [PATCH] // Fix multishop checkbox on theme selection git-svn-id: http://dev.prestashop.com/svn/v1/branches/1.5.x@15423 b9a71923-0436-4b27-9f14-aed3839534dd --- admin-dev/themes/default/template/helpers/options/options.tpl | 4 ++-- cache/class_index.php | 1 - classes/helper/HelperOptions.php | 4 ++++ controllers/admin/AdminThemesController.php | 1 + 4 files changed, 7 insertions(+), 3 deletions(-) diff --git a/admin-dev/themes/default/template/helpers/options/options.tpl b/admin-dev/themes/default/template/helpers/options/options.tpl index 919d32b16..89342beeb 100644 --- a/admin-dev/themes/default/template/helpers/options/options.tpl +++ b/admin-dev/themes/default/template/helpers/options/options.tpl @@ -58,7 +58,7 @@

{$categoryData['info']}

{/if} - {if $use_multishop} + {if !$categoryData['hide_multishop_checkbox'] && $use_multishop} {l s='Check / uncheck all'} {l s='(check boxes if you want to set a custom value for this shop or group shop context)'}
{/if} @@ -68,7 +68,7 @@ {else}
- {if ($field['multishop_default'])} + {if $field['multishop_default'] && empty($field['no_multishop_checkbox'])}
diff --git a/cache/class_index.php b/cache/class_index.php index ac1332efc..d2876e362 100644 --- a/cache/class_index.php +++ b/cache/class_index.php @@ -510,7 +510,6 @@ 'ProfileCore' => 'classes/Profile.php', 'QuickAccess' => 'override/classes/QuickAccess.php', 'QuickAccessCore' => 'classes/QuickAccess.php', - 'Range' => 'override/classes/range/Range.php', 'RangePrice' => 'override/classes/range/RangePrice.php', 'RangePriceCore' => 'classes/range/RangePrice.php', 'RangeWeight' => 'override/classes/range/RangeWeight.php', diff --git a/classes/helper/HelperOptions.php b/classes/helper/HelperOptions.php index 15527e4f1..0429cb9f3 100644 --- a/classes/helper/HelperOptions.php +++ b/classes/helper/HelperOptions.php @@ -63,8 +63,12 @@ class HelperOptionsCore extends Helper if (!isset($category_data['fields'])) $category_data['fields'] = array(); + $category_data['hide_multishop_checkbox'] = true; foreach ($category_data['fields'] as $key => $field) { + if (empty($field['no_multishop_checkbox'])) + $category_data['hide_multishop_checkbox'] = false; + // Set field value unless explicitly denied if (!isset($field['auto_value']) || $field['auto_value']) $field['value'] = $this->getOptionValue($key, $field); diff --git a/controllers/admin/AdminThemesController.php b/controllers/admin/AdminThemesController.php index 88ea2ec6c..bc2f96dc1 100644 --- a/controllers/admin/AdminThemesController.php +++ b/controllers/admin/AdminThemesController.php @@ -109,6 +109,7 @@ class AdminThemesControllerCore extends AdminController 'themes' => Theme::getThemes(), 'id_theme' => $this->context->shop->id_theme, 'can_display_themes' => $this->can_display_themes, + 'no_multishop_checkbox' => true, ), ), ),