[ticket/17100] Move onchange for date select to admin ajax.js

PHPBB3-17100
This commit is contained in:
Marc Alexander 2023-04-10 10:52:37 +02:00
parent 3b20b84e5a
commit 69f65956a9
No known key found for this signature in database
GPG key ID: 50E0D2423696F995

View file

@ -340,6 +340,19 @@ $(function() {
});
}
// Handle date option changes
const dateoptionSelect = document.getElementById('dateoptions');
if (dateoptionSelect) {
dateoptionSelect.addEventListener('change', function() {
const dateoptionInput = document.getElementById(this.getAttribute('data-dateoption'));
if (this.value === 'custom') {
dateoptionInput.value = this.getAttribute('data-dateoption-default');
} else {
dateoptionInput.value = this.value;
}
})
}
if ($('#acp_help_phpbb')) {
phpbb.prepareSendStats();
}