Skip to content
Snippets Groups Projects

Prázdné protokoly

2 files
+ 42
40
Compare changes
  • Side-by-side
  • Inline

Files

{# Společný JavaScript a checkbox povolující zakládání pro tabulky řešení #}
{% if edit %}
<script type="text/javascript">
window.addEventListener("load", function() {
for (const ch of document.querySelectorAll("input[type=checkbox]")) {
ch.onchange();
}
for (const i of document.querySelectorAll("input[type=text]")) {
i.oninput();
}
});
function update_disabled_fields(allow_create) {
for (const i of document.querySelectorAll("input[type=text]")) {
if (i.dataset.sol == "0") {
i.disabled = !allow_create;
}
}
}
</script>
{% endif %}
{% if edit_create %}
<div class="form-group"><div class="checkbox">
<label>
<input
type="checkbox"
name="create_sols"
onchange="update_disabled_fields(this.checked)"
value="y"
{% if not edit_create %}
disabled
{% elif not ctx.contest.online_submit %}
checked
{% endif %}
>
Zakládat nová řešení
</label>
</div></div>
{% endif %}
Loading