Form: Define classes `icinga-forms` and `icinga-controls` by default
This commit is contained in:
parent
cb51d9cf55
commit
a5f292c2ae
|
@ -32,6 +32,11 @@ class Form extends Zend_Form
|
|||
*/
|
||||
const DEFAULT_SUFFIX = '_default';
|
||||
|
||||
/**
|
||||
* A form's default CSS classes
|
||||
*/
|
||||
const DEFAULT_CLASSES = 'icinga-forms icinga-controls';
|
||||
|
||||
/**
|
||||
* 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);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue