From: Coleman Watts Date: Mon, 9 Mar 2015 17:51:20 +0000 (-0400) Subject: Add separate stylesheet for search forms X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=562fda4b8858de88ab2a709c3aefdedd5db0dd87;p=civicrm-core.git Add separate stylesheet for search forms --- diff --git a/CRM/Core/Form/Search.php b/CRM/Core/Form/Search.php index ed97121dd7..74fc820fb7 100644 --- a/CRM/Core/Form/Search.php +++ b/CRM/Core/Form/Search.php @@ -101,7 +101,9 @@ class CRM_Core_Form_Search extends CRM_Core_Form { $this->assign('includeWysiwygEditor', TRUE); } - $resources->addScriptFile('civicrm', 'js/crm.searchForm.js', 1, 'html-header'); + $resources + ->addScriptFile('civicrm', 'js/crm.searchForm.js', 1, 'html-header') + ->addStyleFile('civicrm', 'css/searchForm.css', 1, 'html-header'); $this->addButtons(array( array( diff --git a/CRM/Financial/Form/BatchTransaction.php b/CRM/Financial/Form/BatchTransaction.php index b4592c364e..df5ea259e3 100644 --- a/CRM/Financial/Form/BatchTransaction.php +++ b/CRM/Financial/Form/BatchTransaction.php @@ -48,6 +48,9 @@ class CRM_Financial_Form_BatchTransaction extends CRM_Contribute_Form { protected $_batchStatusId; public function preProcess() { + // This reuses some styles from search forms + CRM_Core_Resources::singleton()->addStyleFile('civicrm', 'css/searchForm.css', 1, 'html-header'); + self::$_entityID = CRM_Utils_Request::retrieve('bid', 'Positive') ? CRM_Utils_Request::retrieve('bid', 'Positive') : $_POST['batch_id']; $this->assign('entityID', self::$_entityID); if (isset(self::$_entityID)) { diff --git a/css/civicrm.css b/css/civicrm.css index dac9ffd071..77886eb8c8 100644 --- a/css/civicrm.css +++ b/css/civicrm.css @@ -1220,20 +1220,6 @@ input.crm-form-entityref { content: "\00BB"; } -.crm-container div#searchForm { - height: auto; - width: 100%; -} - -.crm-container div#searchForm table.form-layout { - border-spacing: 0; -} - -.crm-container div#searchForm table.form-layout td { - padding: 4px; - border: 1px solid #DDDDDD; -} - /* editor specific classes */ #crm-container dd.editor { margin-top: 0.7em; diff --git a/css/searchForm.css b/css/searchForm.css new file mode 100644 index 0000000000..1b8567b292 --- /dev/null +++ b/css/searchForm.css @@ -0,0 +1,15 @@ +/* Styles specific to search forms and search results */ + +.crm-container div#searchForm { + height: auto; + width: 100%; +} + +.crm-container div#searchForm table.form-layout { + border-spacing: 0; +} + +.crm-container div#searchForm table.form-layout td { + padding: 4px; + border: 1px solid #DDDDDD; +} \ No newline at end of file