diff --git a/cara/apps/calculator/static/form.html b/cara/apps/calculator/static/form.html index b3944bc1..bd4c9df8 100644 --- a/cara/apps/calculator/static/form.html +++ b/cara/apps/calculator/static/form.html @@ -42,7 +42,7 @@ Beta v1.0.0 Please send feedback to - Air supply flow rate + Air supply flow rate Air changes per hour @@ -89,14 +89,14 @@ Beta v1.0.0 Please send feedback to Finish: - When is the event? - - Single event - Date: - - - Recurrent usage - + When is the event? + + Single event + Date: + + + Recurrent usage + January February March diff --git a/cara/apps/calculator/static/js/form.js b/cara/apps/calculator/static/js/form.js index 7e6cabed..d11f3ace 100644 --- a/cara/apps/calculator/static/js/form.js +++ b/cara/apps/calculator/static/js/form.js @@ -21,7 +21,6 @@ function show_hide(show, hide, obj) { show.style.display = "none"; obj.checked = false; no_ventilation.checked = true; - unrequire_fields(obj); } else if (show.style.display === "none") { show.style.display = "block"; hide.style.display = "none"; @@ -71,18 +70,6 @@ function require_fields(obj){ break; } } -function unrequire_fields(obj){ - switch(obj.id) { - case "mechanical": - require_mechanical_ventilation(false); - break; - case "natural": - require_natural_ventilation(false); - break; - default: - break; -} } - function require_room_volume(option) { $("#room_volume").prop('required',option); } @@ -106,21 +93,7 @@ function require_natural_ventilation(option) { $("#interval").prop('required',option); $("#event_type_single").prop('required',option); $("#event_type_recurrent").prop('required',option); - - document.getElementById("event_type_single").disabled = !option; - document.getElementById("event_type_recurrent").disabled = !option; - - if (option) { - var elements = document.getElementsByClassName("natural disabled"); - for(var i = elements.length - 1; i >= 0; --i) - elements[i].className = "natural enabled"; - } - else { - $(".natural disabled").disabled = true - var elements = document.getElementsByClassName("natural enabled"); - for(var i = elements.length - 1; i >= 0; --i) - elements[i].className = "natural disabled"; -} } +} function require_air_changes(option) { $("#air_changes").prop('required',option);