Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update branch #1

Merged
merged 9 commits into from
Nov 2, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/confidentialite.html
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ <h4 class="titre-4">Cookies utilisés</h4>
d’attestation de déplacement :
</p>
<table class="cookies">
<caption>Liste des cookies utilisés sur ce site/caption>
<caption>Liste des cookies utilisés sur ce site</caption>
<thead>
<tr class="header-row">
<th scope="col">Nom du Cookie</th>
Expand Down Expand Up @@ -182,8 +182,8 @@ <h4 class="titre-4">
<a class="footer-line footer-link">Confidentialité</a>
<a href="https://www.interieur.gouv.fr/Infos-du-site/Mentions-legales" target="_blank" title="Mentions légales - nouvelle page"
class="footer-line footer-link">Mentions légales</a>
<a href="https://www.gouvernement.fr/info-coronavirus" target="_blank" title="Information du gouvernement sur le Covid-19 - nouvelle page" class="footer-line footer-link">Informations du
gouvernement sur le Covid-19</a>
<a href="https://www.gouvernement.fr/info-coronavirus" target="_blank" title="Information du gouvernement sur la Covid-19 - nouvelle page" class="footer-line footer-link">Informations du
gouvernement sur la Covid-19</a>
<p class="footer-line">
Plus d’infos au<a class="num-08" href="tel:0800130000">
0 800 130 000</a>
Expand Down
4 changes: 2 additions & 2 deletions src/form.html
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<!DOCTYPE html>
<html lang="en">
<html lang="fr">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Expand All @@ -11,4 +11,4 @@
</div>
<script src="./js/form.js"></script>
</body>
</html>
</html>
9 changes: 9 additions & 0 deletions src/js/form.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,11 @@ const createTitle = () => {
}
// createElement('div', { className: 'form-group' })

const getCurrentTime = () => {
const date = new Date();
return date.toLocaleTimeString('fr-FR', { hour: '2-digit', minute: '2-digit' });
}

Comment on lines +16 to +20
Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be removed if LAB-MI#91 is accepted.

const createFormGroup = ({
autocomplete = false,
autofocus = false,
Expand Down Expand Up @@ -55,6 +60,10 @@ const createFormGroup = ({

const input = createElement('input', inputAttrs)

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

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