Source
const has_all_checked = this.form.querySelector('input[name="serviceid"]:not(:checked)') === null;
<?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
*/
?>
window.services_popup = {
is_multiple: null,
overlay: null,
dialogue: null,
form: null,
init({is_multiple}) {
this.is_multiple = is_multiple;
this.overlay = overlays_stack.getById('services');
this.dialogue = this.overlay.$dialogue[0];
this.form = this.overlay.$dialogue.$body[0].querySelector('form');
const filter_form = this.overlay.$dialogue.$controls[0].querySelector('form');
filter_form.addEventListener('submit', (e) => {
e.preventDefault();
PopUp('popup.services', getFormFields(filter_form), {
dialogueid: 'services',
dialogue_class: 'modal-popup-generic',
trigger_element: e.target
});
}, {passive: false});
filter_form.addEventListener('reset', (e) => {
e.preventDefault();
filter_form.elements.filter_name.value = '';
PopUp('popup.services', getFormFields(filter_form), {
dialogueid: 'services',
dialogue_class: 'modal-popup-generic',
trigger_element: e.target
});
}, {passive: false});