Add excursion option
Change-Id: I70133582d92c3a6385fefb46a99743d47f68cd46
diff --git a/static/main.js b/static/main.js
index 3f8c7ac..ee19a8a 100644
--- a/static/main.js
+++ b/static/main.js
@@ -15,10 +15,14 @@
event.preventDefault();
event.stopPropagation();
}
+ update_total_due();
form.classList.add('was-validated');
}, false);
});
}, false);
+ window.addEventListener('popstate', function(event) {
+ update_total_due();
+ }, false);
})();
function update_total_due() {
@@ -39,6 +43,9 @@
if ($('#conference_dinner').is(":checked")) {
costs += parseInt($("#conference_dinner_price").text(), 10);
}
+ if ($('#excursion').is(":checked")) {
+ costs += parseInt($("#excursion_price").text(), 10);
+ }
const lunches = ["lunch_day_1", "lunch_day_2", "lunch_day_3"];
lunches.forEach(function(lunch) {
if ($("input[name='" + lunch + "']:checked").val() != "--") {