Source
$change_container->setAttribute('data-type', ZBX_ACTION_ADD.','.ZBX_ACTION_REPLACE),
<?php
/*
** Zabbix
** 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 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 CPartial $this
*/
$change_container = new CDiv(new CPartial('configuration.valuemap', [
'context' => $data['context'],
'valuemaps' => [],
'readonly' => false,
'form' => 'massupdate'
]));
$update_existing = (new CDiv(
(new CCheckBox('valuemap_update_existing'))->setLabel(_('Update existing'))
))->addClass(ZBX_STYLE_CHECKBOX_BLOCK);
$add_missing = (new CDiv(
(new CCheckBox('valuemap_add_missing'))->setLabel(_('Add missing'))
))->addClass(ZBX_STYLE_CHECKBOX_BLOCK);
$rename_container = (new CTable())
->setId('valuemap-rename-table')
->addClass(ZBX_STYLE_TEXTAREA_FLEXIBLE_CONTAINER)
->addStyle('width:100%;')
->setHeader([
_('From'),
_('To'),
_('Action')
])
->setFooter(new CCol(
(new CButton('null', _('Add')))
->addClass(ZBX_STYLE_BTN_LINK)
->addClass('element-table-add')
));
$remove_container = (new CDiv())->addClass('valuemap-remove');
$remove_container->addItem([
(new CMultiSelect([
'name' => 'valuemap_remove[]',
'object_name' => 'valuemap_names',
'data' => [],
'popup' => [
'parameters' => [