Source
const service_write_access = document.querySelector('input[name="service_write_access"]:checked').value;
<?php declare(strict_types = 0);
/*
** Zabbix
** 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 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>
const view = {
readonly: false,
init({readonly}) {
this.readonly = readonly;
const usertype_select = document.getElementById('user-type');
if (usertype_select !== null) {
usertype_select.addEventListener('change', this.events.usertypeChange);
this.updateAccessUiElementsFieldsGroup(usertype_select.value);
}
document
.getElementById('api-access')
.addEventListener('change', this.events.apiaccessChange);
document
.getElementById('service-write-access')
.addEventListener('change', this.events.serviceWriteAccessChange);
this.updateServicesWriteAccessFields();
jQuery('#service_write_list_')
.multiSelect('getSelectButton')
.addEventListener('click', () => {
this.selectServiceAccessList(jQuery('#service_write_list_'));
});
document
.getElementById('service-read-access')
.addEventListener('change', this.events.serviceReadAccessChange);
this.updateServicesReadAccessFields();
jQuery('#service_read_list_')