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
*/
// Create form.
$form = (new CForm())
->setId('massupdate-form')
->setAttribute('aria-labeledby', ZBX_STYLE_PAGE_TITLE)
->addVar('action', $data['prototype'] ? 'popup.massupdate.triggerprototype' : 'popup.massupdate.trigger')
->addVar('ids', $data['ids'])
->addVar('update', '1')
->addVar('location_url', $data['location_url'])
->addVar('context', $data['context'])
->disablePasswordAutofill();
if ($data['prototype']) {
$form
->addVar('parent_discoveryid', $data['parent_discoveryid'])
->addVar('prototype', $data['prototype']);
}
/*
* Trigger tab
*/
$trigger_form_list = (new CFormList('trigger-form-list'))
->addRow(
(new CVisibilityBox('visible[priority]', 'priority-div', _('Original')))
->setLabel(_('Severity'))
->setAttribute('autofocus', 'autofocus'),
(new CDiv(
new CSeverity('priority', 0)
))->setId('priority-div')
)
->addRow(
(new CVisibilityBox('visible[manual_close]', 'manual-close-div', _('Original')))
->setLabel(_('Allow manual close')),
(new CDiv(
(new CRadioButtonList('manual_close', ZBX_TRIGGER_MANUAL_CLOSE_NOT_ALLOWED))
->addValue(_('No'), ZBX_TRIGGER_MANUAL_CLOSE_NOT_ALLOWED)
->addValue(_('Yes'), ZBX_TRIGGER_MANUAL_CLOSE_ALLOWED)
->setModern(true)