Spaces:
Runtime error
Runtime error
wilenPxs commited on
Commit ·
93681fd
1
Parent(s): 87b004b
UI: libelle du bouton adapte au mode (Generer les declinaisons QCM/QAT)
Browse files- app/web/templates/index.html +15 -2
app/web/templates/index.html
CHANGED
|
@@ -354,10 +354,10 @@
|
|
| 354 |
<label class="field-label">Types de déclinaison</label>
|
| 355 |
<div style="display:flex;gap:14px;padding:9px 2px;font-size:13px;">
|
| 356 |
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;">
|
| 357 |
-
<input type="checkbox" id="type-qcm" checked> QCM
|
| 358 |
</label>
|
| 359 |
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;">
|
| 360 |
-
<input type="checkbox" id="type-qat"> QAT
|
| 361 |
</label>
|
| 362 |
</div>
|
| 363 |
</div>
|
|
@@ -500,6 +500,19 @@ function prettyModelName(slug) {
|
|
| 500 |
function onModeChange() {
|
| 501 |
const decl = document.getElementById("mode-select").value === "declinaisons";
|
| 502 |
document.getElementById("decl-types").hidden = !decl;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 503 |
}
|
| 504 |
|
| 505 |
/* ─── Tabs ─── */
|
|
|
|
| 354 |
<label class="field-label">Types de déclinaison</label>
|
| 355 |
<div style="display:flex;gap:14px;padding:9px 2px;font-size:13px;">
|
| 356 |
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;">
|
| 357 |
+
<input type="checkbox" id="type-qcm" checked onchange="updateRunLabel()"> QCM
|
| 358 |
</label>
|
| 359 |
<label style="display:flex;align-items:center;gap:6px;cursor:pointer;">
|
| 360 |
+
<input type="checkbox" id="type-qat" onchange="updateRunLabel()"> QAT
|
| 361 |
</label>
|
| 362 |
</div>
|
| 363 |
</div>
|
|
|
|
| 500 |
function onModeChange() {
|
| 501 |
const decl = document.getElementById("mode-select").value === "declinaisons";
|
| 502 |
document.getElementById("decl-types").hidden = !decl;
|
| 503 |
+
updateRunLabel();
|
| 504 |
+
}
|
| 505 |
+
|
| 506 |
+
function updateRunLabel() {
|
| 507 |
+
const btn = document.getElementById("run-btn");
|
| 508 |
+
if (document.getElementById("mode-select").value !== "declinaisons") {
|
| 509 |
+
btn.textContent = "Lancer la pythonisation";
|
| 510 |
+
return;
|
| 511 |
+
}
|
| 512 |
+
const qcm = document.getElementById("type-qcm").checked;
|
| 513 |
+
const qat = document.getElementById("type-qat").checked;
|
| 514 |
+
const what = (qcm && qat) ? "QCM + QAT" : qat ? "QAT" : qcm ? "QCM" : "…";
|
| 515 |
+
btn.textContent = `Générer les déclinaisons ${what}`;
|
| 516 |
}
|
| 517 |
|
| 518 |
/* ─── Tabs ─── */
|