addField( (new CWidgetFieldRadioButtonList('show', _('Show'), [ TRIGGERS_OPTION_RECENT_PROBLEM => _('Recent problems'), TRIGGERS_OPTION_IN_PROBLEM => _('Problems'), TRIGGERS_OPTION_ALL => _('Any') ]))->setDefault(TRIGGERS_OPTION_RECENT_PROBLEM) ) ->addField($this->isTemplateDashboard() ? null : new CWidgetFieldMultiSelectGroup('groupids', _('Host groups')) ) ->addField($this->isTemplateDashboard() ? null : new CWidgetFieldMultiSelectHost('hostids', _('Hosts')) ) ->addField( (new CWidgetFieldRadioButtonList('evaltype', _('Problem tags'), [ TAG_EVAL_TYPE_AND_OR => _('And/Or'), TAG_EVAL_TYPE_OR => _('Or') ]))->setDefault(TAG_EVAL_TYPE_AND_OR) ) ->addField( new CWidgetFieldTags('tags') ) ->addField( new CWidgetFieldCheckBox('show_suppressed', _('Show suppressed problems')) ) ->addField( (new CWidgetFieldRadioButtonList( 'style', $this->isTemplateDashboard() ? _('Host location') : _('Hosts location'), [ STYLE_LEFT => _('Left'), STYLE_TOP => _('Top') ] ))->setDefault(STYLE_LEFT) ); } }