Form: Define classes icinga-forms and icinga-controls by default

This commit is contained in:
Johannes Meyer 2019-07-16 15:57:16 +02:00
parent cb51d9cf55
commit a5f292c2ae

View File

@ -32,6 +32,11 @@ class Form extends Zend_Form
*/ */
const DEFAULT_SUFFIX = '_default'; const DEFAULT_SUFFIX = '_default';
/**
* A form's default CSS classes
*/
const DEFAULT_CLASSES = 'icinga-forms icinga-controls';
/** /**
* Identifier for notifications of type error * Identifier for notifications of type error
*/ */
@ -239,6 +244,10 @@ class Form extends Zend_Form
) )
)); ));
if (! isset($options['attribs']['class'])) {
$options['attribs']['class'] = static::DEFAULT_CLASSES;
}
parent::__construct($options); parent::__construct($options);
} }