RomanL 5 лет назад
Родитель
Сommit
070a108806

+ 2 - 1
install/sql/system.sql

@@ -361,7 +361,8 @@ INSERT INTO `sys_options`(`category_id`, `name`, `caption`, `value`, `type`, `ex
 (@iCategoryId, 'sys_site_splash_enabled', '', '', 'checkbox', '', '', '', 26),
 
 (@iCategoryId, 'sys_site_cover_common', '', '0', 'digit', '', '', '', 27),
-(@iCategoryId, 'sys_unit_cover_profile', '', '0', 'digit', '', '', '', 28);
+(@iCategoryId, 'sys_unit_cover_profile', '', '0', 'digit', '', '', '', 28),
+(@iCategoryId, 'sys_site_cover_disabled', '', '', 'checkbox', '', '', '', 29);
 
 
 --

+ 2 - 0
studio/classes/BxDolStudioDesigner.php

@@ -205,6 +205,8 @@ class BxDolStudioDesigner extends BxTemplStudioWidget
 			$this->oDb->setParam($aCover['setting'], $iIdNew);
 			$oStorage->afterUploadCleanup($iIdNew, $iProfile);
         }
+		
+		$this->oDb->setParam('sys_site_cover_disabled', $oForm->getCleanValue('disabled') == 'on' ? 'on' : '');
 
 		return $this->getJsResult('_adm_dsg_scs_save', true, true, BX_DOL_URL_STUDIO . 'designer.php?page=' . BX_DOL_STUDIO_DSG_TYPE_COVER);
     }

+ 10 - 0
studio/template/scripts/BxBaseStudioDesigner.php

@@ -422,6 +422,16 @@ class BxBaseStudioDesigner extends BxDolStudioDesigner
                     'type' => 'hidden',
                     'name' => 'page',
                     'value' => $this->sPage
+                ),
+				'disabled' => array(
+                    'type' => 'checkbox',
+                    'name' => 'enabled',
+                    'caption' => _t('_adm_dsg_txt_cover_disabled'),
+                    'value' => 'on',
+                    'checked' => getParam('sys_site_cover_disabled') == 'on',
+                    'db' => array (
+                        'pass' => 'Xss',
+                    ),
                 ),
                 'preview' => array(
                     'type' => 'custom',

+ 3 - 0
template/scripts/BxBaseCover.php

@@ -32,6 +32,9 @@ class BxBaseCover extends BxDolCover
      */
     public function display ()
     {
+		if (getParam('sys_site_cover_disabled') == 'on')
+			return '';
+		
         $this->_addJsCss();
 
         if(!empty($this->_aOptions) && is_array($this->_aOptions))