IcingaUserForm: state/filter prototype, dummy...
...and still subject to changes
This commit is contained in:
parent
7b01082140
commit
ea0f58f611
|
@ -48,6 +48,21 @@ class IcingaUserForm extends DirectorObjectForm
|
|||
$this->translate('Send notifications'),
|
||||
$this->translate('Whether to send notifications for this user')
|
||||
);
|
||||
|
||||
$this->addElement('multiselect', 'states', array(
|
||||
'label' => $this->translate('States'),
|
||||
'description' => $this->translate('The host/service states you want to get notifications for'),
|
||||
'multiOptions' => $this->enumStateFilters(),
|
||||
'size' => 6,
|
||||
));
|
||||
|
||||
$this->addElement('multiselect', 'types', array(
|
||||
'label' => $this->translate('Event types'),
|
||||
'description' => $this->translate('The event types you want to get notifications for'),
|
||||
'multiOptions' => $this->enumTypeFilters(),
|
||||
'size' => 6,
|
||||
));
|
||||
|
||||
/*
|
||||
$this->addElement('text', 'groups', array(
|
||||
'label' => $this->translate('Usergroups'),
|
||||
|
|
|
@ -28,4 +28,16 @@ class IcingaUser extends IcingaObject
|
|||
protected $booleans = array(
|
||||
'enable_notifications' => 'enable_notifications'
|
||||
);
|
||||
|
||||
protected $states = array();
|
||||
|
||||
protected function setStates($value)
|
||||
{
|
||||
$states = $value;
|
||||
sort($states);
|
||||
if ($this->states !== $states) {
|
||||
$this->states = $states;
|
||||
$this->hasBeenModified = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue