From 14f20d2284e065b77ac59ed9c485526077065774 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Thu, 31 Oct 2013 15:26:41 -0700 Subject: [PATCH] CRM-12578 - Move setting from url to core to avoid url encoding. Fix naming of url settings. --- CRM/Admin/Form/Setting/Url.php | 4 ++-- CRM/Core/Resources.php | 2 +- settings/Core.setting.php | 15 ++++++++++++++ settings/Url.setting.php | 26 ++++++------------------ templates/CRM/Admin/Form/Setting/Url.hlp | 5 ++--- 5 files changed, 26 insertions(+), 26 deletions(-) diff --git a/CRM/Admin/Form/Setting/Url.php b/CRM/Admin/Form/Setting/Url.php index 5ac5fffd82..b8149bea4f 100644 --- a/CRM/Admin/Form/Setting/Url.php +++ b/CRM/Admin/Form/Setting/Url.php @@ -40,7 +40,7 @@ class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting { protected $_settings = array( 'cvv_backoffice_required' => CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, - 'disable_core_css' => CRM_Core_BAO_Setting::URL_PREFERENCES_NAME, + 'disable_core_css' => CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, ); /** * Function to build the form @@ -56,7 +56,7 @@ class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting { $this->addElement('text', 'userFrameworkResourceURL', ts('CiviCRM Resource URL')); $this->addElement('text', 'imageUploadURL', ts('Image Upload URL')); - $this->addElement('text', 'customCSSURL', ts('Custom CiviCRM CSS URL')); + $this->addElement('text', 'customCSSURL', ts('Custom css URL')); $this->addElement('text', 'extensionsURL', ts('Extension Resource URL')); $this->addYesNo('enableSSL', ts('Force Secure URLs (SSL)')); $this->addYesNo('verifySSL', ts('Verify SSL Certs')); diff --git a/CRM/Core/Resources.php b/CRM/Core/Resources.php index af15e33c0d..e923bbaab2 100644 --- a/CRM/Core/Resources.php +++ b/CRM/Core/Resources.php @@ -493,7 +493,7 @@ class CRM_Core_Resources { if (!empty($config->customCSSURL)) { $this->addStyleUrl($config->customCSSURL, -99, $region); } - if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::URL_PREFERENCES_NAME, 'disable_core_css')) { + if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::SYSTEM_PREFERENCES_NAME, 'disable_core_css')) { $this->addStyleFile('civicrm', 'css/civicrm.css', -99, $region); // extras.css is deprecated. Don't use it. $this->addStyleFile('civicrm', 'css/extras.css', -98, $region); diff --git a/settings/Core.setting.php b/settings/Core.setting.php index 6aa61302ce..e9a0f7bb51 100644 --- a/settings/Core.setting.php +++ b/settings/Core.setting.php @@ -627,4 +627,19 @@ When enabled, statistics about your CiviCRM installation are reported anonymousl 'description' => null, 'help_text' => null, ), + + 'disable_core_css' => array( + 'group_name' => 'CiviCRM Preferences', + 'group' => 'core', + 'name' => 'disable_core_css', + 'type' => 'Boolean', + 'quick_form_type' => 'YesNo', + 'default' => '0', + 'add' => '4.4', + 'title' => 'Disable CiviCRM css', + 'is_domain' => 1, + 'is_contact' => 0, + 'description' => 'Prevent the stylesheet "civicrm.css" from being loaded.', + 'help_text' => NULL, + ), ); diff --git a/settings/Url.setting.php b/settings/Url.setting.php index f1faea0946..d390d4a8b7 100644 --- a/settings/Url.setting.php +++ b/settings/Url.setting.php @@ -37,8 +37,8 @@ */ return array ( 'userFrameworkResourceURL' => array( - 'group' => 'UrlPreferences', - 'group_name' => 'url', + 'group' => 'url', + 'group_name' => 'URL Preferences', 'name' => 'userFrameworkResourceURL', 'type' => 'String', 'default' => null, @@ -51,8 +51,8 @@ return array ( 'validate_callback' => 'CRM_Utils_Rule::url', ), 'imageUploadURL' => array( - 'group' => 'UrlPreferences', - 'group_name' => 'url', + 'group' => 'url', + 'group_name' => 'URL Preferences', 'name' => 'imageUploadURL', 'type' => 'String', 'default' => null, @@ -65,8 +65,8 @@ return array ( 'validate_callback' => 'CRM_Utils_Rule::url', ), 'customCSSURL' => array( - 'group' => 'UrlPreferences', - 'group_name' => 'url', + 'group' => 'url', + 'group_name' => 'URL Preferences', 'name' => 'customCSSURL', 'type' => 'String', 'default' => null, @@ -78,19 +78,5 @@ return array ( 'help_text' => null, 'validate_callback' => 'CRM_Utils_Rule::url', ), - 'disable_core_css' => array( - 'group' => 'UrlPreferences', - 'group_name' => 'url', - 'name' => 'disableCoreCSS', - 'type' => 'Boolean', - 'quick_form_type' => 'YesNo', - 'default' => '0', - 'add' => '4.4', - 'title' => 'Disable CiviCRM css', - 'is_domain' => 1, - 'is_contact' => 0, - 'description' => 'If you enable this option, the stylesheet "civicrm.css" will not be loaded. You will have to provide your own css to theme CiviCRM', - 'help_text' => NULL, - ), ); diff --git a/templates/CRM/Admin/Form/Setting/Url.hlp b/templates/CRM/Admin/Form/Setting/Url.hlp index ccfba667c9..c61b6ebcf5 100644 --- a/templates/CRM/Admin/Form/Setting/Url.hlp +++ b/templates/CRM/Admin/Form/Setting/Url.hlp @@ -80,9 +80,8 @@ {/htxt} {htxt id='id-css_url-title'} - {ts}Custom CSS{/ts} + {ts}Customizing CSS{/ts} {/htxt} {htxt id='id-css_url'} -

{ts}If you want to modify the look and feel of CiviCRM screens beyond what your CMS theme does, you can replace CiviCRM's primary CSS file (css/civicrm.css) with a customized version. Use this field to specify the URL of the replacement CSS file.{/ts}

-

{ts}You can also define additional CSS styles to be applied to all or specific page elements by adding CSS styles to the 'extra CSS' file: css/extras.css. This file is included in the downloaded codebase, but is empty by default. If you can accomplish required theming results with this approach, you can avoid the work of merging your custom CSS file changes with upgraded versions.{/ts}

+

{ts}You can modify the look and feel of CiviCRM by adding your own stylesheet. For small to medium sized modifications, use your css file to override some of the styles in civicrm.css. Or if you need to make drastic changes, you can choose to disable civicrm.css completely.{/ts}

{/htxt} -- 2.25.1