Source
$custom_intervals->addRow([$type_input, [$delay_input, $schedule_input], $period_input, $button], 'form_row');
<?php declare(strict_types = 0);
/*
** Zabbix
** Copyright (C) 2001-2023 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
*/
// Create form.
$form = (new CForm())
->addItem((new CVar(CCsrfTokenHelper::CSRF_TOKEN_NAME, CCsrfTokenHelper::get(
$data['prototype'] ? 'itemprototype' : 'item'
)))->removeId())
->setId('massupdate-form')
->setName('massupdate-form')
->addVar('ids', $data['ids'])
->addVar('action', $data['action'])
->addVar('prototype', $data['prototype'])
->addVar('update', '1')
->addVar('location_url', $data['location_url'])
->addVar('context', $data['context'], uniqid('context_'))
->disablePasswordAutofill();
// Create item form list.
$item_form_list = (new CFormList('item-form-list'))
// Append type to form list.
->addRow(
(new CVisibilityBox('visible[type]', 'type', _('Original')))
->setLabel(_('Type'))
->setAttribute('autofocus', 'autofocus'),
(new CSelect('type'))
->setId('type')
->setValue(ITEM_TYPE_ZABBIX)
->addOptions(CSelect::createOptionsFromArray($data['item_types']))
);
// Append hosts interface select to form list.
if ($data['single_host_selected'] && $data['context'] === 'host') {
$item_form_list->addRow(
(new CVisibilityBox('visible[interfaceid]', 'interfaceDiv', _('Original')))
->setLabel(_('Host interface'))
->setAttribute('data-multiple-interface-types', $data['multiple_interface_types']),
(new CDiv([
getInterfaceSelect($data['interfaces'])
->setId('interface-select')
->setValue('0')