Update opolka/ScoDoc from ScoDoc/ScoDoc #2

Merged
opolka merged 1272 commits from ScoDoc/ScoDoc:master into master 2024-05-27 09:11:04 +02:00
Showing only changes of commit e2891e37cd - Show all commits

View File

@ -19,7 +19,7 @@
<div class="justi-label">
<legend for="justi_date_debut" required>Date de début</legend>
<input type="datetime-local" name="justi_date_debut" id="justi_date_debut">
<span>Journée entière</span> <input type="checkbox" name="justi_journee" id="justi_journee">
<span>Journée(s) entière(s)</span> <input type="checkbox" name="justi_journee" id="justi_journee">
</div>
<div class="justi-label" id="date_fin">
<legend for="justi_date_fin" required>Date de fin</legend>
@ -221,21 +221,22 @@
function dayOnly() {
if (document.getElementById('justi_journee').checked) {
document.getElementById("date_fin").style.display = "none";
document.getElementById("justi_date_debut").type = "date"
document.getElementById("justi_date_fin").type = "date"
} else {
document.getElementById("date_fin").style.display = "block";
document.getElementById("justi_date_debut").type = "datetime-local"
document.getElementById("justi_date_fin").type = "datetime-local"
}
}
function getDates() {
if (document.getElementById('justi_journee').checked) {
const date_str = document.getElementById("justi_date_debut").value
const date_str_deb = document.getElementById("justi_date_debut").value
const date_str_fin = document.getElementById("justi_date_debut").value
return {
"deb": `${date_str}T${assi_morning}`,
"fin": `${date_str}T${assi_evening}`,
"deb": `${date_str_deb}T${assi_morning}`,
"fin": `${date_str_fin}T${assi_evening}`,
}
}