*/
function buildQuickForm() {
parent::buildQuickForm();
- $this->setAttribute('class', 'crm-search-form crm-ajax-selection-form');
+ $this->addClass('crm-ajax-selection-form');
CRM_Core_Resources::singleton()
// jsTree is needed for tags popup
->addScriptFile('civicrm', 'packages/jquery/plugins/jstree/jquery.jstree.js', 0, 'html-header', FALSE)
static function generateID() {
}
+ /**
+ * Add one or more css classes to the form
+ * @param $className
+ */
+ public function addClass($className) {
+ $classes = $this->getAttribute('class');
+ $this->setAttribute('class', ($classes ? "$classes " : '') . $className);
+ }
+
/**
* register all the standard rules that most forms potentially use
*