From 8fae1c89e1b29380ae9425c2c865025662dce42a Mon Sep 17 00:00:00 2001 From: Jeroen De Meerleer Date: Fri, 30 Jul 2021 15:14:04 +0200 Subject: [PATCH] ENHANCEMENT: you cannot trust datetime-local, yet --- assets/job/add.js | 6 ++++-- templates/job/add.html.twig | 4 ++-- templates/job/edit.html.twig | 4 ++-- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/assets/job/add.js b/assets/job/add.js index ac3d3aa..2a3e43d 100644 --- a/assets/job/add.js +++ b/assets/job/add.js @@ -153,8 +153,10 @@ function handleSecretCheckbox(event) { function initEternalCheckbox() { document.querySelector('.lastrun-eternal').addEventListener('click', event => { - document.querySelector('#lastrunselector').prop('disabled', document.querySelector(this).prop('checked')); - document.querySelector('#lastrunselector').prop('value', ''); + let nextrunselector = document.querySelector('#lastrunselector'); + nextrunselector.disabled = event.target.checked; + nextrunselector.placeholder = event.target.checked ? '' : nextrunselector.dataset.placeholder; + nextrunselector.value = ''; }) } diff --git a/templates/job/add.html.twig b/templates/job/add.html.twig index 891f3d5..2ee342b 100644 --- a/templates/job/add.html.twig +++ b/templates/job/add.html.twig @@ -30,7 +30,7 @@
- +
@@ -40,7 +40,7 @@
Eternal - + diff --git a/templates/job/edit.html.twig b/templates/job/edit.html.twig index 6105a16..ef6b3ce 100644 --- a/templates/job/edit.html.twig +++ b/templates/job/edit.html.twig @@ -27,7 +27,7 @@
- +
@@ -36,7 +36,7 @@
Eternal - +