<?php declare(strict_types = 0);
->addItem((new CVar(CSRF_TOKEN_NAME, CCsrfTokenHelper::get('trigger')))->removeId())
->setId('massupdate-form')
->addVar('action', $data['prototype'] ? 'trigger.prototype.massupdate' : 'trigger.massupdate')
->addVar('ids', $data['ids'])
->addVar('location_url', $data['location_url'])
->addVar('context', $data['context'])
->disablePasswordAutofill();
if ($data['prototype']) {
->addVar('parent_discoveryid', $data['parent_discoveryid'])
->addVar('prototype', $data['prototype']);
$trigger_form_list = (new CFormList('trigger-form-list'))
(new CVisibilityBox('visible[priority]', 'priority', _('Original')))
->setLabel(_('Severity'))
->setAttribute('autofocus', 'autofocus'),
(new CSeverity('priority'))->setId('priority')
(new CVisibilityBox('visible[manual_close]', 'manual-close', _('Original')))
->setLabel(_('Allow manual close')),
(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)
$tags_form_list = (new CFormList('tags-form-list'))
(new CVisibilityBox('visible[tags]', 'tags-field', _('Original')))->setLabel(_('Tags')),
(new CRadioButtonList('mass_update_tags', ZBX_ACTION_ADD))
->addValue(_('Add'), ZBX_ACTION_ADD)
->addValue(_('Replace'), ZBX_ACTION_REPLACE)
->addValue(_('Remove'), ZBX_ACTION_REMOVE)
->addStyle('margin-bottom: 10px;'),
renderTagTable([['tag' => '', 'value' => '']])
->setHeader([_('Name'), _('Value'), _('Action')])
$dependencies_form_list = new CFormList('dependencies-form-list');
$dependencies_table = (new CTable())
->setId('dependency-table')
->addClass(ZBX_STYLE_OVERFLOW_ELLIPSIS)
->addStyle('width: 100%;')
->setHeader([_('Name'), (new CColHeader(_('Action')))->setWidth(50)]);
$normal_only = $data['prototype'] ? ['normal_only' => 1] : [];
if ($data['context'] === 'host') {