addField( (new CWidgetFieldMultiSelectItem('itemids', _('Items'))) ->setFlags(CWidgetField::FLAG_NOT_EMPTY | CWidgetField::FLAG_LABEL_ASTERISK) ) ->addField( (new CWidgetFieldRadioButtonList('style', _('Items location'), [ STYLE_LEFT => _('Left'), STYLE_TOP => _('Top') ]))->setDefault(STYLE_LEFT) ) ->addField( (new CWidgetFieldIntegerBox('show_lines', _('Show lines'), ZBX_MIN_WIDGET_LINES, ZBX_MAX_WIDGET_LINES )) ->setDefault(ZBX_DEFAULT_WIDGET_LINES) ->setFlags(CWidgetField::FLAG_LABEL_ASTERISK) ) ->addField( new CWidgetFieldCheckBox('show_as_html', _('Show text as HTML')) ) ->addField($this->isTemplateDashboard() ? null : new CWidgetFieldCheckBox('dynamic', _('Enable host selection')) ); } }