Skip to content
Snippets Groups Projects
Commit 94f35fe9 authored by colemanw's avatar colemanw
Browse files

CRM-12578 - Add configuration to disable civicrm.css. Deprecate extras.css.

parent 90e57b47
No related branches found
No related tags found
No related merge requests found
...@@ -40,6 +40,7 @@ ...@@ -40,6 +40,7 @@
class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting { class CRM_Admin_Form_Setting_Url extends CRM_Admin_Form_Setting {
protected $_settings = array( protected $_settings = array(
'cvv_backoffice_required' => CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME, 'cvv_backoffice_required' => CRM_Core_BAO_Setting::CONTRIBUTE_PREFERENCES_NAME,
'disable_core_css' => CRM_Core_BAO_Setting::URL_PREFERENCES_NAME,
); );
/** /**
* Function to build the form * Function to build the form
......
...@@ -493,8 +493,9 @@ class CRM_Core_Resources { ...@@ -493,8 +493,9 @@ class CRM_Core_Resources {
if (!empty($config->customCSSURL)) { if (!empty($config->customCSSURL)) {
$this->addStyleUrl($config->customCSSURL, -99, $region); $this->addStyleUrl($config->customCSSURL, -99, $region);
} }
else { if (!CRM_Core_BAO_Setting::getItem(CRM_Core_BAO_Setting::URL_PREFERENCES_NAME, 'disable_core_css')) {
$this->addStyleFile('civicrm', 'css/civicrm.css', -99, $region); $this->addStyleFile('civicrm', 'css/civicrm.css', -99, $region);
// extras.css is deprecated. Don't use it.
$this->addStyleFile('civicrm', 'css/extras.css', -98, $region); $this->addStyleFile('civicrm', 'css/extras.css', -98, $region);
} }
} }
......
/* $Id$ */ /**
* @deprecated
/* * This file is deprecated and support will be removed for it in version 4.5
** Put your local CSS modifications in this file * Don't use it. Instead configure a custom css url at /civicrm/admin/setting/url?reset=1
** if you don't want to modify system provided */
** civicrm.css.
*/
...@@ -78,6 +78,19 @@ return array ( ...@@ -78,6 +78,19 @@ return array (
'help_text' => null, 'help_text' => null,
'validate_callback' => 'CRM_Utils_Rule::url', '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,
),
);
);
...@@ -53,6 +53,15 @@ ...@@ -53,6 +53,15 @@
{$form.customCSSURL.html|crmAddClass:'huge40'} {help id='id-css_url'} {$form.customCSSURL.html|crmAddClass:'huge40'} {help id='id-css_url'}
</td> </td>
</tr> </tr>
<tr class="crm-url-form-block-disable_core_css">
<td class="label">
{$form.disable_core_css.label}
</td>
<td>
{$form.disable_core_css.html}<br />
<p class="description">{ts}{$disable_core_css_description}{/ts}</p>
</td>
</tr>
<tr class="crm-url-form-block-extensionsURL"> <tr class="crm-url-form-block-extensionsURL">
<td class="label"> <td class="label">
{$form.extensionsURL.label} {$form.extensionsURL.label}
......
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