Admin: real sliding switch for enrollment, role=switch
This commit is contained in:
+3
-2
@@ -48,9 +48,10 @@ function render() {
|
||||
|
||||
const tb = $("#toggle-enroll");
|
||||
// the switch itself carries the state, no status wording
|
||||
tb.textContent = "Inscriptions";
|
||||
tb.replaceChildren(h("span", { class: "switch", "aria-hidden": "true" }), "Inscriptions");
|
||||
tb.className = "enroll-toggle " + (p.enrollment_open ? "on" : "off");
|
||||
tb.setAttribute("aria-pressed", String(p.enrollment_open));
|
||||
tb.setAttribute("role", "switch");
|
||||
tb.setAttribute("aria-checked", String(p.enrollment_open));
|
||||
|
||||
$("#open-screen").classList.toggle("connected", state.screens > 0);
|
||||
$("#open-screen").title = state.screens ? "Projecteur connecté" : "Aucun projecteur connecté";
|
||||
|
||||
Reference in New Issue
Block a user