Source
(new CCheckBox('all_maps'))->onClick("checkAll('".$sysmapForm->getName()."', 'all_maps', 'maps');")
<?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 CView $this
* @var array $data
*/
$html_page = (new CHtmlPage())
->setTitle(_('Maps'))
->setDocUrl(CDocHelper::getUrl(CDocHelper::MONITORING_SYSMAP_LIST))
->setControls(
(new CTag('nav', true,
(new CList())
->addItem(
(new CForm('get'))
->addItem(
(new CSubmit('form', _('Create map')))->setEnabled($data['allowed_edit'])
)
)
->addItem(
(new CButton('form', _('Import')))
->onClick(
'return PopUp("popup.import", '.
json_encode([ 'rules_preset' => 'map',
CSRF_TOKEN_NAME => CCsrfTokenHelper::get('import')
]).
', {
dialogueid: "popup_import",
dialogue_class: "modal-popup-generic"
});'
)
->setEnabled($data['allowed_edit'])
->removeId()
)
))->setAttribute('aria-label', _('Content controls'))
)
->addItem(
(new CFilter())
->setResetUrl(new CUrl('sysmaps.php'))
->setProfile($data['profileIdx'])
->setActiveTab($data['active_tab'])
->addFilterTab(_('Filter'), [
(new CFormList())->addRow(_('Name'),
(new CTextBox('filter_name', $data['filter']['name']))
->setWidth(ZBX_TEXTAREA_FILTER_STANDARD_WIDTH)
->setAttribute('autofocus', 'autofocus')
)
])
);