addField( new CWidgetFieldMultiSelectSlaView($data['fields']['slaid'], $data['captions']['slas']['slaid']) ) ->addField( new CWidgetFieldMultiSelectServiceView($data['fields']['serviceid'], $data['captions']['services']['serviceid'] ) ) ->addField( new CWidgetFieldIntegerBoxView($data['fields']['show_periods']) ) ->addField( (new CWidgetFieldDatePickerView($data['fields']['date_from'])) ->setDateFormat(ZBX_DATE) ->setPlaceholder(_('YYYY-MM-DD')) ) ->addField( (new CWidgetFieldDatePickerView($data['fields']['date_to'])) ->setDateFormat(ZBX_DATE) ->setPlaceholder(_('YYYY-MM-DD')) ) ->includeJsFile('widget.edit.js.php') ->addJavaScript('widget_slareport_form.init('.json_encode([ 'serviceid_field_id' => $data['fields']['serviceid']->getName() ], JSON_THROW_ON_ERROR).');') ->show();