From 8d5d128425ca6652e8f7d5dc3ef915bcffec9f0e Mon Sep 17 00:00:00 2001
From: Martin Mares <mj@ucw.cz>
Date: Mon, 28 Aug 2023 10:31:02 +0200
Subject: [PATCH] =?UTF-8?q?Formul=C3=A1=C5=99=20na=20zad=C3=A1v=C3=A1n?=
 =?UTF-8?q?=C3=AD=20bod=C5=AF:=20JS=20hack?=
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

---
 mo/web/templates/org_submit_list.html | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/mo/web/templates/org_submit_list.html b/mo/web/templates/org_submit_list.html
index 36544b60..b86b4ad5 100644
--- a/mo/web/templates/org_submit_list.html
+++ b/mo/web/templates/org_submit_list.html
@@ -225,8 +225,24 @@ Existuje více než jedna verze oprav, finální je podbarvená.
 	{{ wtf.form_field(form.delete, class='btn btn-danger') }}
 </div>
 {% endif %}
+
 </form>
 
+<script type="text/javascript">
+	const in_points = document.getElementById("points")
+	const in_is_empty = document.getElementById("is_empty")
+
+	function update_is_empty() {
+		in_points.disabled = in_is_empty.checked;
+	}
+
+	in_is_empty.onchange = update_is_empty;
+
+	window.addEventListener("load", function() {
+		update_is_empty();
+	});
+</script>
+
 {% endif %}
 
 {% endblock %}
-- 
GitLab