Skip to content
Snippets Groups Projects
Commit 14f20d22 authored by colemanw's avatar colemanw
Browse files

CRM-12578 - Move setting from url to core to avoid url encoding. Fix naming of url settings.

parent 94f35fe9
No related branches found
No related tags found
No related merge requests found
......@@ -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'));
......
......@@ -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);
......
......@@ -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,
),
);
......@@ -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,
),
);
......@@ -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'}
<p>{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}</p>
<p>{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: <em>css/extras.css</em>. 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}</p>
<p>{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}</p>
{/htxt}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment