Source
<?php
/*
** 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 CPartial $this
*/
$change_container = new CDiv(new CPartial('configuration.valuemap', [
'context' => $data['context'],
'valuemaps' => [],
'readonly' => false,
'form' => 'massupdate',
'table_id' => 'valuemap-table'
]));
$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 CButtonLink(_('Add')))->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' => [
'srctbl' => 'valuemap_names',
'srcfld1' => 'valuemapid',
'dstfrm' => 'massupdate-form',
'dstfld1' => 'valuemap_remove_',
'hostids' => $data['hostids'],
'context' => $data['context'],