forked from ScoDoc/ScoDoc
Assiduites : saisie différée créneau par défaut fixes #819
This commit is contained in:
parent
8e74a143fa
commit
ff92a8f61e
@ -274,6 +274,7 @@
|
|||||||
|
|
||||||
<script>
|
<script>
|
||||||
const assi_etat_defaut = "{{assi_etat_defaut}}";
|
const assi_etat_defaut = "{{assi_etat_defaut}}";
|
||||||
|
const periode_defaut = {{periode_defaut}};
|
||||||
{% if scu.is_assiduites_module_forced(request.args.get('formsemestre_id', None)) %}
|
{% if scu.is_assiduites_module_forced(request.args.get('formsemestre_id', None)) %}
|
||||||
window.forceModule = true;
|
window.forceModule = true;
|
||||||
{% else %}
|
{% else %}
|
||||||
@ -293,6 +294,7 @@
|
|||||||
|
|
||||||
|
|
||||||
function createColumn(dateStart = "", dateEnd = "", moduleimpl_id = "") {
|
function createColumn(dateStart = "", dateEnd = "", moduleimpl_id = "") {
|
||||||
|
// TODO Choix dates : utiliser même chose que page ajout_assiduite_etud
|
||||||
let table = document.getElementById("studentTable");
|
let table = document.getElementById("studentTable");
|
||||||
let th = document.createElement("div");
|
let th = document.createElement("div");
|
||||||
th.classList.add("th", "error");
|
th.classList.add("th", "error");
|
||||||
@ -452,7 +454,7 @@
|
|||||||
const el = element.parentElement.querySelector("#dateEnd");
|
const el = element.parentElement.querySelector("#dateEnd");
|
||||||
const el2 = element.parentElement.querySelector("#dateStart");
|
const el2 = element.parentElement.querySelector("#dateStart");
|
||||||
const newDate = new Date(el2.valueAsDate)
|
const newDate = new Date(el2.valueAsDate)
|
||||||
.add(2, "hours");
|
.add(periode_defaut, "hours");
|
||||||
el.valueAsDate = newDate;
|
el.valueAsDate = newDate;
|
||||||
|
|
||||||
const colid = element.parentElement.parentElement.getAttribute('col');
|
const colid = element.parentElement.parentElement.getAttribute('col');
|
||||||
|
@ -2078,10 +2078,17 @@ def _differee(
|
|||||||
dept_id=g.scodoc_dept_id,
|
dept_id=g.scodoc_dept_id,
|
||||||
)
|
)
|
||||||
|
|
||||||
|
periode_defaut = sco_preferences.get_preference(
|
||||||
|
"periode_defaut",
|
||||||
|
formsemestre_id=formsemestre_id,
|
||||||
|
dept_id=g.scodoc_dept_id,
|
||||||
|
)
|
||||||
|
|
||||||
return render_template(
|
return render_template(
|
||||||
"assiduites/widgets/differee.j2",
|
"assiduites/widgets/differee.j2",
|
||||||
etudiants=etudiants,
|
etudiants=etudiants,
|
||||||
assi_etat_defaut=assi_etat_defaut,
|
assi_etat_defaut=assi_etat_defaut,
|
||||||
|
periode_defaut=periode_defaut,
|
||||||
forcer_module=forcer_module,
|
forcer_module=forcer_module,
|
||||||
moduleimpl_select=moduleimpl_select,
|
moduleimpl_select=moduleimpl_select,
|
||||||
date=date,
|
date=date,
|
||||||
|
Loading…
Reference in New Issue
Block a user