Added windows_open for form submission
This commit is contained in:
parent
f9f1ebc7b2
commit
d9dfdbac77
2 changed files with 10 additions and 7 deletions
|
|
@ -49,15 +49,16 @@ Beta v1.0.0 <span style="float:right; font-weight:bold">Please send feedback to
|
|||
</div>
|
||||
|
||||
<div id="DIVnatural_ventilation" style="display:none">
|
||||
<input type="hidden" id="windows_open" name="windows_open" value=""/>
|
||||
Number of windows: <input type="number" id="windows_number" name="windows_number" min="0"><br>
|
||||
Height of window: <input type="number" step=0.01 id="window_height" name="window_height" placeholder="meters" min="0"><br>
|
||||
Width of window: <input type="number" step=0.01 id="window_width" name="window_width" placeholder="meters" min="0"><br>
|
||||
Opening distance: <input type="number" step=0.01 id="opening_distance" name="opening_distance" placeholder="meters" min="0"><br>
|
||||
Windows open: <input type="radio" id="always" name="windows_open" value="always">
|
||||
Windows open: <input type="radio" id="always" name="RADIO_windows_open" value="always", onChange="update_windows_open(this)">
|
||||
<label for="always">Always</label>
|
||||
<input type="radio" id="interval" name="windows_open" value="interval">
|
||||
<input type="radio" id="interval" name="RADIO_windows_open" value="interval", onChange="update_windows_open(this)">
|
||||
<label for="interval">10 min / 2h</label>
|
||||
<!--input type="radio" id="breaks" name="windows_open" value="breaks">
|
||||
<!--input type="radio" id="breaks" name="RADIO_windows_open" value="breaks">
|
||||
<label for="breaks">Breaks</label--><br>
|
||||
</div>
|
||||
|
||||
|
|
|
|||
|
|
@ -29,6 +29,11 @@ function show_hide(show, hide, obj) {
|
|||
ventilation_type.value = obj.id;
|
||||
} }
|
||||
|
||||
function update_windows_open(obj) {
|
||||
var windows_open = document.getElementById("windows_open");
|
||||
windows_open.value = obj.id;
|
||||
}
|
||||
|
||||
/* -------Required fields------- */
|
||||
function require_fields(obj){
|
||||
switch(obj.id) {
|
||||
|
|
@ -84,10 +89,7 @@ function require_room_dimensions(option) {
|
|||
function require_mechanical_ventilation(option) {
|
||||
$("#air_type_changes").prop('required',option);
|
||||
$("#air_type_supply").prop('required',option);
|
||||
if (!option) {
|
||||
var mechanical_ventilation_type = document.getElementById("mechanical_ventilation_type");
|
||||
mechanical_ventilation_type.value = "";
|
||||
} }
|
||||
}
|
||||
|
||||
function require_natural_ventilation(option) {
|
||||
$("#windows_number").prop('required',option);
|
||||
|
|
|
|||
Loading…
Reference in a new issue