Skip to content

Commit

Permalink
Fix html tags + make getReasonsObject inline
Browse files Browse the repository at this point in the history
Co-authored-by: Julien Waechter <[email protected]>
  • Loading branch information
theblackhole and greenjava authored Oct 30, 2020
1 parent f495cf7 commit 0193146
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 9 deletions.
8 changes: 2 additions & 6 deletions src/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -73,9 +73,7 @@ <h1 class="flex flex-wrap">
<div class="bg-primary d-none" id="snackbar">
L'attestation est téléchargée sur votre appareil.
</div>
</div>

<div class="wrapper">
<div id="formgroup-storedata"
class="form-check text-center">
<input class="form-check-input"
Expand All @@ -88,7 +86,6 @@ <h1 class="flex flex-wrap">
Stocker mes données sur l'appareil afin de remplir automatiquement mes futures attestations
</label>
</div>
</div>

<a id="cleardata"
class="center delete-data-link"
Expand All @@ -100,9 +97,8 @@ <h1 class="flex flex-wrap">
</div>


<div class="">
<p id="footnotes">
<span id="footnote1">
<div id="footnotes">
<p id="footnote1">
[1] Les personnes souhaitant bénéficier de l'une de ces exceptions doivent se munir s'il y a lieu, lors de leurs déplacements hors de leur domicile, d'un document leur permettant de justifier que le déplacement considéré entre dans le champ de l'une de ces exceptions.
</p>
<p id="footnote2">
Expand Down
5 changes: 2 additions & 3 deletions src/js/form-util.js
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,12 @@ export function getReasons (reasonInputs) {
}

export function getReasonsObject (reasonInputs) {
const reasons = reasonInputs
return reasonInputs
.filter((reason) => reason.checked)
.reduce(function (map, reason) {
.reduce((map, reason) => {
map[reason.value] = reason.checked
return map
}, {})
return reasons
}

export function prepareInputs (formInputs, reasonInputs, reasonFieldset, reasonAlert, snackbar, releaseDateInput, releaseTimeInput) {
Expand Down

0 comments on commit 0193146

Please sign in to comment.