Source
<?php
/*
** Zabbix
** Copyright (C) 2001-2023 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
*/
$form = (new CForm('post'))
->addItem((new CVar(CCsrfTokenHelper::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"});'