From ce22fda6df5c99f16d26a91b4301145bbaa19411 Mon Sep 17 00:00:00 2001 From: Coleman Watts Date: Wed, 20 Aug 2014 10:39:52 +0100 Subject: [PATCH] Fix crmReplace clobbering standard form element css classes --- CRM/Contribute/Form/AdditionalPayment.php | 2 +- CRM/Contribute/Form/Contribution.php | 2 +- CRM/Financial/Form/FinancialAccount.php | 2 +- CRM/Grant/Form/Search.php | 2 +- templates/CRM/Contribute/Form/AdditionalPayment.tpl | 4 ++-- templates/CRM/Contribute/Form/Contribution.tpl | 6 +++--- templates/CRM/Financial/Form/FinancialAccount.tpl | 2 +- templates/CRM/Grant/Form/Search.tpl | 2 +- 8 files changed, 11 insertions(+), 11 deletions(-) diff --git a/CRM/Contribute/Form/AdditionalPayment.php b/CRM/Contribute/Form/AdditionalPayment.php index 04f9fdcf28..0a0c20f662 100644 --- a/CRM/Contribute/Form/AdditionalPayment.php +++ b/CRM/Contribute/Form/AdditionalPayment.php @@ -299,7 +299,7 @@ class CRM_Contribute_Form_AdditionalPayment extends CRM_Contribute_Form_Abstract ); $this->add('text', 'check_number', ts('Check Number'), $attributes['financial_trxn_check_number']); - $trxnId = $this->add('text', 'trxn_id', ts('Transaction ID'), $attributes['trxn_id']); + $this->add('text', 'trxn_id', ts('Transaction ID'), array('class' => 'twelve') + $attributes['trxn_id']); //add receipt for offline contribution $this->addElement('checkbox', 'is_email_receipt', ts('Send Receipt?')); diff --git a/CRM/Contribute/Form/Contribution.php b/CRM/Contribute/Form/Contribution.php index 34420056ca..045ca49e4f 100644 --- a/CRM/Contribute/Form/Contribution.php +++ b/CRM/Contribute/Form/Contribution.php @@ -682,7 +682,7 @@ class CRM_Contribute_Form_Contribution extends CRM_Contribute_Form_AbstractEditP ); } - $trxnId = $this->add('text', 'trxn_id', ts('Transaction ID'), $attributes['trxn_id']); + $trxnId = $this->add('text', 'trxn_id', ts('Transaction ID'), array('class' => 'twelve') + $attributes['trxn_id']); //add receipt for offline contribution $this->addElement('checkbox', 'is_email_receipt', ts('Send Receipt?')); diff --git a/CRM/Financial/Form/FinancialAccount.php b/CRM/Financial/Form/FinancialAccount.php index 25bb316754..6f8f0efc80 100644 --- a/CRM/Financial/Form/FinancialAccount.php +++ b/CRM/Financial/Form/FinancialAccount.php @@ -112,7 +112,7 @@ class CRM_Financial_Form_FinancialAccount extends CRM_Contribute_Form { $financialAccountType = CRM_Core_PseudoConstant::get('CRM_Financial_DAO_FinancialAccount', 'financial_account_type_id'); if (!empty($financialAccountType)) { $element = $this->add('select', 'financial_account_type_id', ts('Financial Account Type'), - array('' => '- select -') + $financialAccountType, TRUE); + array('' => '- select -') + $financialAccountType, TRUE, array('class' => 'crm-select2 huge')); if ($this->_isARFlag) { $element->freeze(); $elementAccounting->freeze(); diff --git a/CRM/Grant/Form/Search.php b/CRM/Grant/Form/Search.php index 2cbfa3b428..9be73990f1 100644 --- a/CRM/Grant/Form/Search.php +++ b/CRM/Grant/Form/Search.php @@ -169,7 +169,7 @@ class CRM_Grant_Form_Search extends CRM_Core_Form_Search { */ function buildQuickForm() { parent::buildQuickForm(); - $this->addElement('text', 'sort_name', ts('Name or Email'), CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'sort_name')); + $this->addElement('text', 'sort_name', ts('Name or Email'), array('class' => 'twenty') + CRM_Core_DAO::getAttribute('CRM_Contact_DAO_Contact', 'sort_name')); CRM_Grant_BAO_Query::buildSearchForm($this); diff --git a/templates/CRM/Contribute/Form/AdditionalPayment.tpl b/templates/CRM/Contribute/Form/AdditionalPayment.tpl index 4986af3e96..581125fa89 100644 --- a/templates/CRM/Contribute/Form/AdditionalPayment.tpl +++ b/templates/CRM/Contribute/Form/AdditionalPayment.tpl @@ -126,12 +126,12 @@ {if $showCheckNumber || !$isOnline} {$form.check_number.label} - {$form.check_number.html|crmReplace:class:six} + {$form.check_number.html} {/if} {$form.trxn_id.label} - {$form.trxn_id.html|crmReplace:class:twelve} {help id="id-trans_id"} + {$form.trxn_id.html} {help id="id-trans_id"} {if $email and $outBound_option != 2} diff --git a/templates/CRM/Contribute/Form/Contribution.tpl b/templates/CRM/Contribute/Form/Contribution.tpl index d80e903199..9726b629fa 100644 --- a/templates/CRM/Contribute/Form/Contribution.tpl +++ b/templates/CRM/Contribute/Form/Contribution.tpl @@ -204,7 +204,7 @@ {$form.cancel_reason.label} - {$form.cancel_reason.html|crmReplace:class:huge} + {$form.cancel_reason.html} @@ -298,12 +298,12 @@ {if $showCheckNumber || !$isOnline} {$form.check_number.label} - {$form.check_number.html|crmReplace:class:six} + {$form.check_number.html} {/if} {$form.trxn_id.label} - {$form.trxn_id.html|crmReplace:class:twelve} {help id="id-trans_id"} + {$form.trxn_id.html} {help id="id-trans_id"} {if $email and $outBound_option != 2} diff --git a/templates/CRM/Financial/Form/FinancialAccount.tpl b/templates/CRM/Financial/Form/FinancialAccount.tpl index 03e8149e80..5d3a51021f 100644 --- a/templates/CRM/Financial/Form/FinancialAccount.tpl +++ b/templates/CRM/Financial/Form/FinancialAccount.tpl @@ -49,7 +49,7 @@ {$form.financial_account_type_id.label} - {$form.financial_account_type_id.html|crmReplace:class:twenty} + {$form.financial_account_type_id.html} {$form.accounting_code.label} diff --git a/templates/CRM/Grant/Form/Search.tpl b/templates/CRM/Grant/Form/Search.tpl index 3c0ae60120..f20ce65a30 100644 --- a/templates/CRM/Grant/Form/Search.tpl +++ b/templates/CRM/Grant/Form/Search.tpl @@ -37,7 +37,7 @@ -- 2.25.1
- {$form.sort_name.label}  {$form.sort_name.html|crmReplace:class:'twenty'}   {$form.buttons.html}
+ {$form.sort_name.label}  {$form.sort_name.html}   {$form.buttons.html}