Source
$buttons[] = (new CButtonDelete(_('Delete web scenario?'), url_params(['form', 'httptestid', 'hostid', 'context']),
<?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
*/
$widget = (new CWidget())->setTitle(_('Web monitoring'));
// append host summary to widget header
if (!empty($this->data['hostid'])) {
$widget->setNavigation(getHostNavigation('web', $this->data['hostid']));
}
$url = (new CUrl('httpconf.php'))
->setArgument('context', $data['context'])
->getUrl();
// create form
$http_form = (new CForm('post', $url))
->setId('http-form')
->setName('httpForm')
->setAttribute('aria-labeledby', ZBX_STYLE_PAGE_TITLE)
->addVar('form', $this->data['form'])
->addVar('hostid', $this->data['hostid'])
->addVar('templated', $this->data['templated']);
if (!empty($this->data['httptestid'])) {
$http_form->addVar('httptestid', $this->data['httptestid']);
}
/*
* Scenario tab
*/
$http_form_list = new CFormList();
// Parent http tests
if (!empty($this->data['templates'])) {
$http_form_list->addRow(_('Parent web scenarios'), $this->data['templates']);
}
// Name
$name_text_box = (new CTextBox('name', $this->data['name'], $this->data['templated'], 64))
->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH)
->setAriaRequired();