Skip to content

Commit

Permalink
Rebase + rebase fixes + fix save data checkbox click input
Browse files Browse the repository at this point in the history
Remove add current time devSwoop code added before (not relevant with this new version)
  • Loading branch information
Quentin Dunand committed Oct 30, 2020
1 parent eace2e8 commit b2f2438
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 15 deletions.
2 changes: 1 addition & 1 deletion src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ <h1 class="flex flex-wrap">
id="field-storedata"
value="storedata">
<label class="form-check-label"
for="checkbox-storedata">
for="field-storedata">
Stocker mes données sur l'appareil afin de remplir automatiquement mes futures attestations
</label>
</div>
Expand Down
4 changes: 0 additions & 4 deletions src/js/form-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
10 changes: 0 additions & 10 deletions src/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -60,10 +54,6 @@ const createFormGroup = ({

const input = createElement('input', inputAttrs)

if (name === 'heuresortie') {
input.value = getCurrentTime()
}

const validityAttrs = {
className: 'validity',
}
Expand Down

0 comments on commit b2f2438

Please sign in to comment.