From b2f243836af5c658de0add16507187735f0d5cb3 Mon Sep 17 00:00:00 2001 From: Quentin Dunand Date: Fri, 30 Oct 2020 18:31:08 +0100 Subject: [PATCH] Rebase + rebase fixes + fix save data checkbox click input Remove add current time devSwoop code added before (not relevant with this new version) --- src/index.html | 2 +- src/js/form-util.js | 4 ---- src/js/form.js | 10 ---------- 3 files changed, 1 insertion(+), 15 deletions(-) diff --git a/src/index.html b/src/index.html index bfca1fce..7b41d72e 100644 --- a/src/index.html +++ b/src/index.html @@ -84,7 +84,7 @@

id="field-storedata" value="storedata"> diff --git a/src/js/form-util.js b/src/js/form-util.js index 0c197376..bceea2fd 100644 --- a/src/js/form-util.js +++ b/src/js/form-util.js @@ -187,10 +187,6 @@ export function prepareInputs (formInputs, reasonInputs, reasonFieldset, reasonA }) }) - $('#formgroup-storedata').addEventListener('click', () => { - (storeDataInput.checked) ? storeDataInput.checked = false : storeDataInput.checked = true - }) - $('#cleardata').addEventListener('click', () => { clearSecureLS() clearForm() diff --git a/src/js/form.js b/src/js/form.js index 1965a8c0..085b9de9 100644 --- a/src/js/form.js +++ b/src/js/form.js @@ -11,12 +11,6 @@ const createTitle = () => { const p = createElement('p', { className: 'msg-info', innerHTML: 'Tous les champs sont obligatoires.' }) return [h2, p] } -// createElement('div', { className: 'form-group' }) - -const getCurrentTime = () => { - const date = new Date(); - return date.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' }); -} const createFormGroup = ({ autocomplete = false, @@ -60,10 +54,6 @@ const createFormGroup = ({ const input = createElement('input', inputAttrs) - if (name === 'heuresortie') { - input.value = getCurrentTime() - } - const validityAttrs = { className: 'validity', }