Source
(new CLabel([_s('%1$s group pattern', $source), $name_hint_icon], 'name'))->setAsteriskMark(),
<?php declare(strict_types = 0);
/*
** 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
* @var array $data
*/
$form_action = (new CUrl('zabbix.php'))
->setArgument('action', 'popup.usergroupmapping.check')
->getUrl();
$form = (new CForm('post', $form_action))
->setId('user-group-mapping-edit-form')
->setName('user-group-mapping-edit-form');
// Enable form submitting on Enter.
$form->addItem((new CSubmitButton())->addClass(ZBX_STYLE_FORM_SUBMIT_HIDDEN));
$usergroup_multiselect = (new CMultiSelect([
'name' => 'user_groups[]',
'object_name' => 'usersGroups',
'multiple' => true,
'data' => $data['user_groups'],
'popup' => [
'parameters' => [
'srctbl' => 'usrgrp',
'srcfld1' => 'usrgrpid',
'srcfld2' => 'name',
'dstfrm' => $form->getName(),
'dstfld1' => 'user_groups'
]
]
]))
->setWidth(ZBX_TEXTAREA_MEDIUM_WIDTH)
->setId('user_groups');
$inline_js = $usergroup_multiselect->getPostJS();
$user_role_multiselect = (new CMultiSelect([
'name' => 'roleid',
'object_name' => 'roles',
'data' => $data['user_role'],
'multiple' => false,
'popup' => [
'parameters' => [