Source
_('Any existing template entities not present in the import file will be deleted. Click OK to proceed.')
<?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
*/
?>
window.popup_import = new class {
constructor() {
this.overlay = null;
this.dialogue = null;
this.form = null;
}
init() {
this.overlay = overlays_stack.getById('popup_import');
this.dialogue = this.overlay.$dialogue[0];
this.form = this.overlay.$dialogue.$body[0].querySelector('form');
this.warningListeners();
this.advancedConfigurationListeners();
}
warningListeners() {
const rules_images = document.getElementById('rules_images_updateExisting')
if (rules_images) {
rules_images.addEventListener('change', (e) => {
this.updateWarning(e.target, <?= json_encode(_('Images for all maps will be updated!')) ?>)
})
}
}
advancedConfigurationListeners() {
const advanced_configuration = document.getElementById('advanced_options');
if (!advanced_configuration) {
return;
}
advanced_configuration.addEventListener('change', () => {
this.form.querySelectorAll('.js-advanced-configuration').forEach((e) => {
return e.classList.toggle("display-none");
});
});
document
.getElementById('update_all')