Source
$maintenance_status = (new CSpan(_x('Approaching', 'maintenance status')))->addClass(ZBX_STYLE_ORANGE);
<?php declare(strict_types = 0);
/*
** Copyright (C) 2001-2025 Zabbix SIA
**
** This program is free software: you can redistribute it and/or modify it under the terms of
** the GNU Affero General Public License as published by the Free Software Foundation, version 3.
**
** 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 Affero General Public License for more details.
**
** You should have received a copy of the GNU Affero General Public License along with this program.
** If not, see <https://www.gnu.org/licenses/>.
**/
/**
* @var CView $this
* @var array $data
*/
$this->addJsFile('class.calendar.js');
$this->includeJsFile('maintenance.list.js.php');
$filter = (new CFilter())
->addVar('action', 'maintenance.list')
->setResetUrl((new CUrl('zabbix.php'))->setArgument('action', 'maintenance.list'))
->setProfile($data['filter_profile'])
->setActiveTab($data['filter_active_tab'])
->addFilterTab(_('Filter'), [
(new CFormGrid())
->addItem([
new CLabel(_('Host groups'), 'filter_groups__ms'),
new CFormField(
(new CMultiSelect([
'name' => 'filter_groups[]',
'object_name' => 'hostGroup',
'data' => $data['filter']['groups'],
'popup' => [
'parameters' => [
'srctbl' => 'host_groups',
'srcfld1' => 'groupid',
'dstfrm' => 'zbx_filter',
'dstfld1' => 'filter_groups_',
'editable' => 1
]
]
]))
->setId('filter_groups_')
->setWidth(ZBX_TEXTAREA_MEDIUM_WIDTH)
->setAttribute('autofocus', 'autofocus')
)
])
->addItem([
new CLabel(_('Name'), 'filter_name'),
new CFormField(
(new CTextBox('filter_name', $data['filter']['name']))
->setWidth(ZBX_TEXTAREA_MEDIUM_WIDTH)
)
]),
(new CFormGrid())->addItem([
new CLabel(_('State')),
new CFormField(