Source
'message' => _('Item contains user-defined macros with secret values. Values of these macros should be entered manually.')
<?php
/*
** 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
*/
$form = (new CForm())
->cleanItems()
->setId('preprocessing-test-form');
if ($data['show_prev']) {
$form
->addVar('upd_last', '')
->addVar('upd_prev', '');
}
foreach ($data['inputs'] as $name => $value) {
if ($name === 'interface') {
// SNMPv3 additional details about interface.
if (array_key_exists('useip', $value)) {
$form->addVar('interface[useip]', $value['useip']);
}
if (array_key_exists('interfaceid', $value)) {
$form->addVar('interface[interfaceid]', $value['interfaceid']);
}
continue;
}
elseif ($name === 'host' && array_key_exists('hostid', $value)) {
$form->addVar('hostid', $value['hostid']);
continue;
}
elseif ($name === 'proxy_hostid') {
continue;
}
elseif ($name === 'query_fields' || $name === 'headers' || $name === 'parameters') {
foreach (['name', 'value'] as $key) {
if (array_key_exists($key, $value)) {
$form->addVar($name.'['.$key.']', $value[$key]);
}
}
continue;
}
$form->addItem((new CInput('hidden', $name, $value))->removeId());