Source
var inputs = '#label_type_hostgroup, #label_type_host, #label_type_trigger, #label_type_map, #label_type_image';
<?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
*/
?>
<script type="text/x-jquery-tmpl" id="url-tpl">
<?= (new CRow([
(new CTextBox('urls[#{id}][name]'))->setWidth(ZBX_TEXTAREA_SMALL_WIDTH),
(new CTextBox('urls[#{id}][url]'))->setWidth(ZBX_TEXTAREA_STANDARD_WIDTH),
(new CSelect('urls[#{id}][elementtype]'))
->addOptions(CSelect::createOptionsFromArray(sysmap_element_types())),
(new CCol(
(new CButton(null, _('Remove')))
->onClick('$("#url-row-#{id}").remove();')
->addClass(ZBX_STYLE_BTN_LINK)
))->addClass(ZBX_STYLE_NOWRAP)
]))->setId('url-row-#{id}')
?>
</script>
<script type="text/x-jquery-tmpl" id="user_group_row_tpl">
<?= (new CRow([
new CCol([
(new CTextBox('userGroups[#{usrgrpid}][usrgrpid]', '#{usrgrpid}'))->setAttribute('type', 'hidden'),
(new CSpan('#{name}'))
]),
new CCol(
(new CTag('ul', false, [
new CTag('li', false, [
(new CInput('radio', 'userGroups[#{usrgrpid}][permission]', PERM_READ))
->setId('user_group_#{usrgrpid}_permission_'.PERM_READ),
(new CTag('label', false, _('Read-only')))
->setAttribute('for', 'user_group_#{usrgrpid}_permission_'.PERM_READ)
]),
new CTag('li', false, [
(new CInput('radio', 'userGroups[#{usrgrpid}][permission]', PERM_READ_WRITE))
->setId('user_group_#{usrgrpid}_permission_'.PERM_READ_WRITE),
(new CTag('label', false, _('Read-write')))
->setAttribute('for', 'user_group_#{usrgrpid}_permission_'.PERM_READ_WRITE)
])
]))->addClass(CRadioButtonList::ZBX_STYLE_CLASS)
),