Source
(new CTextBox('userGroups[#{usrgrpid}][usrgrpid]', '#{usrgrpid}'))->setAttribute('type', 'hidden'),
<?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
*/
$form = (new CForm('post'))
->addItem((new CVar(CSRF_TOKEN_NAME, CCsrfTokenHelper::get('dashboard')))->removeId())
->setId('dashboard-share-form')
->setName('dashboard_share_form')
->addItem(getMessages());
$table_user_groups = (new CTable())
->setHeader([_('User groups'), _('Permissions'), _('Action')])
->addRow(
(new CRow(
(new CCol(
(new CButtonLink(_('Add')))->onClick(
'return PopUp("popup.generic", '.json_encode([
'srctbl' => 'usrgrp',
'srcfld1' => 'usrgrpid',
'srcfld2' => 'name',
'dstfrm' => $form->getName(),
'multiselect' => '1'
]).', {dialogue_class: "modal-popup-generic"});'
)
))->setColSpan(3)
))->setId('user-group-list-footer')
)
->addStyle('width: 100%;');
$table_users = (new CTable())
->setHeader([_('Users'), _('Permissions'), _('Action')])
->addRow(
(new CRow(
(new CCol(
(new CButtonLink(_('Add')))->onClick(
'return PopUp("popup.generic", '.json_encode([
'srctbl' => 'users',
'srcfld1' => 'userid',
'srcfld2' => 'fullname',
'dstfrm' => $form->getName(),
'multiselect' => '1'
]).', {dialogue_class: "modal-popup-generic"});'
)
))->setColSpan(3)
))->setId('user-list-footer')
)
->addStyle('width: 100%;');