Source
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2022 Zabbix SIA
**
** This program is free software; you can redistribute it and/or modify
** it under the terms of the GNU General Public License as published by
** the Free Software Foundation; either version 2 of the License, or
** (at your option) any later version.
**
** This program is distributed in the hope that it will be useful,
** but WITHOUT ANY WARRANTY; without even the implied warranty of
** MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
** GNU General Public License for more details.
**
** You should have received a copy of the GNU General Public License
** along with this program; if not, write to the Free Software
** Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
**/
/**
* @var CView $this
* @var array $data
*/
$form = (new CForm())
->cleanItems()
->setName('services_form');
// Enable form submitting on Enter.
$form->addItem((new CInput('submit', null))->addStyle('display: none;'));
$controls = (new CForm())
->cleanItems()
->setName('services_filter_form')
->addVar('title', $data['title'])
->addVar('exclude_serviceids', $data['exclude_serviceids'])
->addVar('multiple', $data['is_multiple'] ? null : 0)
->addItem(
(new CList())
->addClass(ZBX_STYLE_INLINE_FILTER)
->addItem(new CLabel(_('Name'), 'services-filter-name'), ZBX_STYLE_INLINE_FILTER_LABEL)
->addItem(
(new CTextBox('filter_name', $data['filter']['name']))
->setId('services-filter-name')
->setAttribute('autofocus', 'autofocus')
->setWidth(ZBX_TEXTAREA_FILTER_STANDARD_WIDTH)
)
->addItem(new CSubmitButton(_('Filter')))
->addItem(
(new CSimpleButton(_('Reset')))
->setAttribute('type', 'reset')
->addClass(ZBX_STYLE_BTN_ALT)
)
);
$services = (new CTableInfo())
->setHeader([
$data['is_multiple'] ? (new CColHeader(new CCheckBox('serviceid_all')))->addClass(ZBX_STYLE_CELL_WIDTH) : null,
_('Name'),
_('Tags'),
_('Problem tags')