[CHANGE] Modernize and convert to ES6+

This commit is contained in:
Peter Pfeufer 2023-10-31 22:00:43 +01:00
parent 9e47d19337
commit 21f0a96422
No known key found for this signature in database
GPG Key ID: 6051D2C6AD4EBC27

View File

@ -8,9 +8,9 @@ $(document).ready(() => {
inputAbsoluteTime.parent().prev('label').hide(); inputAbsoluteTime.parent().prev('label').hide();
inputCountdown.prop('required', true); inputCountdown.prop('required', true);
$('input#id_absolute_checkbox').change(function () { $('input#id_absolute_checkbox').change((event) => {
if ($(this).prop('checked')) { if ($(event.target).prop('checked')) {
// check box enabled // Checkbox is checked
inputAbsoluteTime.parent().show(); inputAbsoluteTime.parent().show();
inputAbsoluteTime.parent().prev('label').show(); inputAbsoluteTime.parent().prev('label').show();
inputCountdown.parent().hide(); inputCountdown.parent().hide();