Source
new CFormActions(new CSubmit('update', _('Update')), [new CButton('reset-defaults', _('Reset defaults'))])
<?php declare(strict_types = 0);
/*
** 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 CView $this
* @var array $data
*/
$this->includeJsFile('administration.timeouts.edit.js.php');
$form = (new CForm())
->addItem((new CVar(CSRF_TOKEN_NAME, CCsrfTokenHelper::get('timeouts')))->removeId())
->setId('timeouts-form')
->setName('timeouts_form')
->setAction(
(new CUrl('zabbix.php'))
->setArgument('action', 'timeouts.update')
->getUrl()
)
->setAttribute('aria-labelledby', CHtmlPage::PAGE_TITLE_ID);
$form_grid = (new CFormGrid())
->addItem(
(new CFormFieldset(_('Timeouts for item types')))
->addItem([
(new CLabel(_('Zabbix agent'), 'timeout_zabbix_agent'))->setAsteriskMark(),
new CFormField(
(new CTextBox('timeout_zabbix_agent', $data['timeout_zabbix_agent'], false,
DB::getFieldLength('config', 'timeout_zabbix_agent')
))
->setWidth(ZBX_TEXTAREA_TINY_WIDTH)
->setAriaRequired()
->setAttribute('autofocus', 'autofocus')
)
])
->addItem([
(new CLabel(_('Simple check'), 'timeout_simple_check'))->setAsteriskMark(),
new CFormField(
(new CTextBox('timeout_simple_check', $data['timeout_simple_check'], false,
DB::getFieldLength('config', 'timeout_simple_check')
))
->setWidth(ZBX_TEXTAREA_TINY_WIDTH)
->setAriaRequired()
)
])
->addItem([
(new CLabel(_('SNMP agent'), 'timeout_snmp_agent'))->setAsteriskMark(),
new CFormField(
(new CTextBox('timeout_snmp_agent', $data['timeout_snmp_agent'], false,
DB::getFieldLength('config', 'timeout_snmp_agent')