Source
<input type="hidden" name="provision_media[#{row_index}][userdirectory_mediaid]" value="#{userdirectory_mediaid}">
<?php declare(strict_types = 0);
/*
** 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
*/
?>
window.ldap_edit_popup = new class {
constructor() {
this.overlay = null;
this.dialogue = null;
this.form = null;
}
init({provision_groups, provision_media}) {
this.overlay = overlays_stack.getById('ldap_edit');
this.dialogue = this.overlay.$dialogue[0];
this.form = this.overlay.$dialogue.$body[0].querySelector('form');
this.allow_jit_chbox = document.getElementById('provision_status');
this.provision_groups_table = document.getElementById('ldap-user-groups-table');
this.toggleAllowJitProvisioning(this.allow_jit_chbox.checked);
this.toggleGroupConfiguration();
this._addEventListeners();
this._renderProvisionGroups(provision_groups);
this._renderProvisionMedia(provision_media);
new CFormFieldsetCollapsible(document.getElementById('advanced-configuration'));
}
_addEventListeners() {
this.allow_jit_chbox.addEventListener('change', (e) => {
this.toggleAllowJitProvisioning(e.target.checked);
});
document.querySelector('#group-configuration').addEventListener('change', () => {
this.toggleGroupConfiguration();
});
this.provision_groups_table.addEventListener('click', (e) => {
if (e.target.classList.contains('js-add')) {
this.editProvisionGroup();
}
else if (e.target.classList.contains('js-edit')) {
this.editProvisionGroup(e.target.closest('tr'));
}
else if (e.target.classList.contains('js-remove')) {