diff --git a/.gitignore b/.gitignore index 7093028..8a92444 100644 --- a/.gitignore +++ b/.gitignore @@ -4,3 +4,4 @@ db.sqlite3 db1.sqlite3 __pycache__ migrations +venv \ No newline at end of file diff --git a/home/views.py b/home/views.py index d95b018..59094d9 100644 --- a/home/views.py +++ b/home/views.py @@ -426,10 +426,10 @@ def allocationForm(request): message = "" if alloc_form.start_time and alloc_form.start_time>now() and alloc_form.end_time and alloc_form.end_time
Period of Allocation: {{ allocation_form_details.period.start_date }} to {{ allocation_form_details.period.end_date }}
+
+
+ NOTE: High-Tea is NOT available for students registering for Jain food. +
- +
+ + {%if caterer_list.count > 0%}
@@ -122,6 +128,29 @@

document.getElementById("warning-response").innerHTML = ""; } }); + + const jainChoice = document.getElementById('jain'); + const highTeaChoice = document.getElementById('high_tea'); + const notice = document.getElementById('notice'); + + jainChoice.addEventListener('change', function () { + const selectedOption = jainChoice.value; + console.log(selectedOption); + + if(selectedOption === "True") + { + highTeaChoice.value = "False"; + } + }) + + highTeaChoice.addEventListener('change', function () { + const selectedOption = highTeaChoice.value; + + if(selectedOption === "True") + { + jainChoice.value = "False"; + } + }) // document.getElementById('preference').addEventListener("change",function(event){ // if(event.target.name=='first_pref'){ // caterer = event.target.value; @@ -194,4 +223,4 @@

// } // }}); -{% endblock %} +{% endblock %} \ No newline at end of file