| 1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597 | <!DOCTYPE html><html lang="en"><head>    <meta charset="UTF-8">    <title>Aisky-coffee</title>    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">    <!-- 新 Bootstrap4 核心 CSS 文件 -->    <link rel="stylesheet" href="https://cdn.bootcss.com/bootstrap/4.1.0/css/bootstrap.min.css">    <!-- jQuery文件。务必在bootstrap.min.js 之前引入 -->    <script src="https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js"></script>    <!-- popper.min.js 用于弹窗、提示、下拉菜单 -->    <script src="https://cdn.bootcss.com/popper.js/1.12.5/umd/popper.min.js"></script>    <!-- 最新的 Bootstrap4 核心 JavaScript 文件 -->    <script src="https://cdn.bootcss.com/bootstrap/4.1.0/js/bootstrap.min.js"></script>    <!--可用來建立使用者小圖示-->    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css">        <script>            $(function(){                 //打菌                {% if params.bacterias %}                    var bacteria_num = 0;                    {% for bacteria in params.bacterias %}                        if('{{bacteria.start}}' != '00:00' && '{{bacteria.end}}' != '00:00' && bacteria_num == 0){                        var bac = $(".set-schedule")[0];                        var bac_div = $("#bacteria_div");                        bac.style.display = 'none';                        bac_div.css('visibility','visible');                            $('select[name=bacteria_duration1]').val('{{bacteria.duration}}');                            $('select[name=bacteria_from_hr1]').val('{{bacteria.start}}'.split(':')[0]);                            $('select[name=bacteria_from_min1]').val('{{bacteria.start}}'.split(':')[1]);                            $('select[name=bacteria_to_hr1]').val('{{bacteria.end}}'.split(':')[0]);                            $('select[name=bacteria_to_min1]').val('{{bacteria.end}}'.split(':')[1]);                            bacteria_num ++;                        }else if(bacteria_num > 0){                            if(bacteria_num == 1){                                var add = document.getElementById('bacteria_add1');                                bacteria_num ++;                            }else{                                var add = document.getElementById('bacteria_add' + i);                            };                            Add(add);                            $('select[name=bacteria_duration' + i + ']').val('{{bacteria.duration}}');                            $('select[name=' + 'bacteria_from_hr' + i + ']').val('{{bacteria.start}}'.split(':')[0]);                            $('select[name=' + 'bacteria_from_min' + i + ']').val('{{bacteria.start}}'.split(':')[1]);                            $('select[name=' + 'bacteria_to_hr' + i + ']').val('{{bacteria.end}}'.split(':')[0]);                            $('select[name=' + 'bacteria_to_min' + i + ']').val('{{bacteria.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                //消毒                {% if params.disinfects %}                    var disinfect_num = 0;                    {% for disinfect in params.disinfects %}                        if('{{disinfect.start}}' != '00:00' && '{{disinfect.end}}' != '00:00' && disinfect_num == 0){                            var di = $(".set-schedule")[1];                            var di_div = $("#disinfect_div");                            di.style.display = 'none';                            di_div.css('visibility','visible');                            $('select[name=disinfect_duration1]').val('{{disinfect.duration}}');                            $('select[name=disinfect_from_hr1]').val('{{disinfect.start}}'.split(':')[0]);                            $('select[name=disinfect_from_min1]').val('{{disinfect.start}}'.split(':')[1]);                            $('select[name=disinfect_to_hr1]').val('{{disinfect.end}}'.split(':')[0]);                            $('select[name=disinfect_to_min1]').val('{{disinfect.end}}'.split(':')[1]);                            disinfect_num ++;                        }else if(disinfect_num > 0){                            if(disinfect_num == 1){                                var add = document.getElementById('disinfect_add1');                                disinfect_num ++;                            }else{                                var add = document.getElementById('disinfect_add' + i);                            };                            Add(add);                            $('select[name=disinfect_duration' + i + ']').val('{{disinfect.duration}}');                            $('select[name=' + 'disinfect_from_hr' + i + ']').val('{{disinfect.start}}'.split(':')[0]);                            $('select[name=' + 'disinfect_from_min' + i + ']').val('{{disinfect.start}}'.split(':')[1]);                            $('select[name=' + 'disinfect_to_hr' + i + ']').val('{{disinfect.end}}'.split(':')[0]);                            $('select[name=' + 'disinfect_to_min' + i + ']').val('{{disinfect.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                //加熱                {% if params.heatings %}                    var heating_num = 0;                    {% for heating in params.heatings %}                        if('{{heating.start}}' != '00:00' && '{{heating.end}}' != '00:00' && heating_num == 0){                            var heat = $(".set-schedule")[2];                            var heat_div = $("#heating_div");                            heat.style.display = 'none';                            heat_div.css('visibility','visible');                            $('select[name=heating_duration1]').val('{{heating.duration}}');                            $('select[name=heating_from_hr1]').val('{{heating.start}}'.split(':')[0]);                            $('select[name=heating_from_min1]').val('{{heating.start}}'.split(':')[1]);                            $('select[name=heating_to_hr1]').val('{{heating.end}}'.split(':')[0]);                            $('select[name=heating_to_min1]').val('{{heating.end}}'.split(':')[1]);                            heating_num ++;                        }else if(heating_num > 0){                            if(heating_num == 1){                                var add = document.getElementById('heating_add1');                                heating_num ++;                            }else{                                var add = document.getElementById('heating_add' + i);                            };                            Add(add);                            $('select[name=heating_duration' + i + ']').val('{{heating.duration}}');                            $('select[name=' + 'heating_from_hr' + i + ']').val('{{heating.start}}'.split(':')[0]);                            $('select[name=' + 'heating_from_min' + i + ']').val('{{heating.start}}'.split(':')[1]);                            $('select[name=' + 'heating_to_hr' + i + ']').val('{{heating.end}}'.split(':')[0]);                            $('select[name=' + 'heating_to_min' + i + ']').val('{{heating.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                //攪拌                {% if params.stirs %}                    var stir_num = 0;                    {% for stir in params.stirs %}                        if('{{stir.start}}' != '00:00' && '{{stir.end}}' != '00:00' && stir_num == 0){                            var stir = $(".set-schedule")[3];                            var stir_div = $("#stir_div");                            stir.style.display = 'none';                            stir_div.css('visibility','visible');                            $('select[name=stir_duration1]').val('{{stir.duration}}');                            $('select[name=stir_from_hr1]').val('{{stir.start}}'.split(':')[0]);                            $('select[name=stir_from_min1]').val('{{stir.start}}'.split(':')[1]);                            $('select[name=stir_to_hr1]').val('{{stir.end}}'.split(':')[0]);                            $('select[name=stir_to_min1]').val('{{stir.end}}'.split(':')[1]);                            stir_num ++;                        }else if(stir_num > 0){                            if(stir_num == 1){                                var add = document.getElementById('stir_add1');                                stir_num ++;                            }else{                                var add = document.getElementById('stir_add' + i);                            };                            Add(add);                            $('select[name=stir_duration' + i + ']').val('{{stir.duration}}');                            $('select[name=' + 'stir_from_hr' + i + ']').val('{{stir.start}}'.split(':')[0]);                            $('select[name=' + 'stir_from_min' + i + ']').val('{{stir.start}}'.split(':')[1]);                            $('select[name=' + 'stir_to_hr' + i + ']').val('{{stir.end}}'.split(':')[0]);                            $('select[name=' + 'stir_to_min' + i + ']').val('{{stir.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                //注水                {% if params.waters %}                    var water_num = 0;                    {% for water in params.waters %}                        if('{{water.start}}' != '00:00' && '{{water.end}}' != '00:00' && water_num == 0){                            var water = $(".set-schedule")[4];                            var water_div = $("#water_div");                            water.style.display = 'none';                            water_div.css('visibility','visible');                            $('select[name=water_duration1]').val('{{water.duration}}');                            $('select[name=water_from_hr1]').val('{{water.start}}'.split(':')[0]);                            $('select[name=water_from_min1]').val('{{water.start}}'.split(':')[1]);                            $('select[name=water_to_hr1]').val('{{water.end}}'.split(':')[0]);                            $('select[name=water_to_min1]').val('{{water.end}}'.split(':')[1]);                            water_num ++;                        }else if(water_num > 0){                            if(water_num == 1){                                var add = document.getElementById('water_add1');                                water_num ++;                            }else{                                var add = document.getElementById('water_add' + i);                            };                            Add(add);                            $('select[name=water_duration' + i + ']').val('{{water.duration}}');                            $('select[name=' + 'water_from_hr' + i + ']').val('{{water.start}}'.split(':')[0]);                            $('select[name=' + 'water_from_min' + i + ']').val('{{water.start}}'.split(':')[1]);                            $('select[name=' + 'water_to_hr' + i + ']').val('{{water.end}}'.split(':')[0]);                            $('select[name=' + 'water_to_min' + i + ']').val('{{water.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                 //開上閥                {% if params.tops %}                    var top_num = 0;                    {% for top in params.tops %}                        if('{{top.start}}' != '00:00' && '{{top.end}}' != '00:00' && top_num == 0){                            var h_valve = $(".set-schedule")[5];                            var h_valve_div = $("#highValve_div");                            h_valve.style.display = 'none';                            h_valve_div.css('visibility','visible');                            $('select[name=highValve_duration1]').val('{{top.duration}}');                            $('select[name=highValve_from_hr1]').val('{{top.start}}'.split(':')[0]);                            $('select[name=highValve_from_min1]').val('{{top.start}}'.split(':')[1]);                            $('select[name=highValve_to_hr1]').val('{{top.end}}'.split(':')[0]);                            $('select[name=highValve_to_min1]').val('{{top.end}}'.split(':')[1]);                            top_num ++;                        }else if(top_num > 0){                            if(top_num == 1){                                var add = document.getElementById('highValve_add1');                                top_num ++;                            }else{                                var add = document.getElementById('highValve_add' + i);                            };                            Add(add);                            $('select[name=highValve_duration' + i + ']').val('{{top.duration}}');                            $('select[name=' + 'highValve_from_hr' + i + ']').val('{{top.start}}'.split(':')[0]);                            $('select[name=' + 'highValve_from_min' + i + ']').val('{{top.start}}'.split(':')[1]);                            $('select[name=' + 'highValve_to_hr' + i + ']').val('{{top.end}}'.split(':')[0]);                            $('select[name=' + 'highValve_to_min' + i + ']').val('{{top.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                //開下閥                {% if params.bottoms %}                    var bottom_num = 0;                    {% for bottom in params.bottoms %}                        if('{{bottom.start}}' != '00:00' && '{{bottom.end}}' != '00:00' && bottom_num == 0){                            var l_valve = $(".set-schedule")[6];                            var l_valve_div = $("#lowValve_div");                            l_valve.style.display = 'none';                            l_valve_div.css('visibility','visible');                            $('select[name=lowValve_duration1]').val('{{bottom.duration}}');                            $('select[name=lowValve_from_hr1]').val('{{bottom.start}}'.split(':')[0]);                            $('select[name=lowValve_from_min1]').val('{{bottom.start}}'.split(':')[1]);                            $('select[name=lowValve_to_hr1]').val('{{bottom.end}}'.split(':')[0]);                            $('select[name=lowValve_to_min1]').val('{{bottom.end}}'.split(':')[1]);                            bottom_num ++;                        }else if(bottom_num > 0){                            if(bottom_num == 1){                                var add = document.getElementById('lowValve_add1');                                bottom_num ++;                            }else{                                var add = document.getElementById('lowValve_add' + i);                            };                            Add(add);                            $('select[name=lowValve_duration' + i + ']').val('{{bottom.duration}}');                            $('select[name=' + 'lowValve_from_hr' + i + ']').val('{{bottom.start}}'.split(':')[0]);                            $('select[name=' + 'lowValve_from_min' + i + ']').val('{{bottom.start}}'.split(':')[1]);                            $('select[name=' + 'lowValve_to_hr' + i + ']').val('{{bottom.end}}'.split(':')[0]);                            $('select[name=' + 'lowValve_to_min' + i + ']').val('{{bottom.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}                //溫度                {% if params.tems %}                    var tem_num = 0;                    {% for tem in params.tems %}                        if('{{tem.start}}' != '00:00' && '{{tem.end}}' != '00:00' && tem_num == 0){                            var tem = $(".set-schedule")[7];                            var tem_div = $("#tem_div");                            tem.style.display = 'none';                            tem_div.css('visibility','visible');                            $('select[name=tem_duration1]').val('{{tem.duration}}');                            $('select[name=tem_from_hr1]').val('{{tem.start}}'.split(':')[0]);                            $('select[name=tem_from_min1]').val('{{tem.start}}'.split(':')[1]);                            $('select[name=tem_to_hr1]').val('{{tem.end}}'.split(':')[0]);                            $('select[name=tem_to_min1]').val('{{tem.end}}'.split(':')[1]);                            tem_num ++;                        }else if(tem_num > 0){                            if(tem_num == 1){                                var add = document.getElementById('tem_add1');                                tem_num ++;                            }else{                                var add = document.getElementById('tem_add' + i);                            };                            Add(add);                            $('select[name=tem_duration' + i + ']').val('{{tem.duration}}');                            $('select[name=' + 'tem_from_hr' + i + ']').val('{{tem.start}}'.split(':')[0]);                            $('select[name=' + 'tem_from_min' + i + ']').val('{{tem.start}}'.split(':')[1]);                            $('select[name=' + 'tem_to_hr' + i + ']').val('{{tem.end}}'.split(':')[0]);                            $('select[name=' + 'tem_to_min' + i + ']').val('{{tem.end}}'.split(':')[1]);                        };                    {% endfor %}                {% endif %}            });        </script>        <script>        var i = 1;        function Cancel(){            window.location.href='/b_cargo2';        };        function Add(evt){            evt.style.display="none";            i ++;            var div = document.createElement('div');            var from_hr = 'from_hr' + i;            var from_min = 'from_min' + i;            var to_hr = 'to_hr' + i;            var to_min = 'to_min' + i;            var id = evt.getAttribute('id');            var len = id.length;            var add = id.split('_')[0] + '_add' + i;            var del = id.split('_')[0] + '_del' + i;            var html = '';            var begin = id.split('_')[0];            div.className = "col-12 row";            div.style.marginTop = "10px";                html += '<div class="col-xl-5 col-lg-5 col-md-4"  style="margin-top:10px;">';                html += '<span>Duration</span>';                if(begin == 'bacteria'){                    html += ' <select name="bacteria_duration' + i + '" class="duration">';                }else if(begin == 'disinfect'){                    html += ' <select name="disinfect_duration' + i + '" class="duration">';                }else if(begin == 'heating'){                    html += ' <select name="heating_duration' + i + '" class="duration">';                }else if(begin == 'stir'){                    html += ' <select name="stir_duration' + i + '" class="duration">';                }else if(begin == 'water'){                    html += ' <select name="water_duration' + i + '" class="duration">';                }else if(begin == 'highValve'){                    html += ' <select name="highValve_duration' + i + '" class="duration">';                }else if(begin == 'lowValve'){                    html += ' <select name="lowValve_duration' + i + '" class="duration">';                }else if(begin == 'tem'){                    html += ' <select name="tem_duration' + i + '" class="duration">';                }else{                };                html += '<option selected value="30min">30 min</option><option value="60min">60 min</option><option value="90min">90 min</option><option value="120min">120 min</option><option value="150min">150 min</option></select>';                html += '</div>';			    html += '<div class="from-to col-xl-7 col-lg-7 col-md-8"  style="margin-top:10px;">';			    html += '<div>';          	    html +=	'<div class="from row">';                html +=	'<div class="col-3">';                html +=	'<span>From</span>';                html +=	'</div>';                html +=	'<div  class="col-xs-6">';                if(id.split('_')[0] == 'bacteria'){                    html +=	'<select name="bacteria_from_hr' + i + '">';                }else if(id.split('_')[0] == 'disinfect'){                    html +=	'<select name="disinfect_from_hr' + i + '">';                }else if(id.split('_')[0] == 'heating'){                    html +=	'<select name="heating_from_hr' + i + '">';                }else if(id.split('_')[0] == 'stir'){                    html +=	'<select name="stir_from_hr' + i + '">';                }else if(id.split('_')[0] == 'water'){                    html +=	'<select name="water_from_hr' + i + '">';                }else if(id.split('_')[0] == 'highValve'){                    html +=	'<select name="highValve_from_hr' + i + '">';                }else if(id.split('_')[0] == 'lowValve'){                    html +=	'<select name="lowValve_from_hr' + i + '">';                }else if(id.split('_')[0] == 'tem'){                    html +=	'<select name="tem_from_hr' + i + '">';                }else{                };                for(var hr = 0; hr < 24; hr++){                    if(hr < 10){                        html +=	'<option value="0' + hr + '">0' + hr + '</option>';                    }else{                        html +=	'<option value="' + hr + '">' + hr + '</option>';                    };                };                    html += '</select>';                if(id.split('_')[0] == 'bacteria'){                    html +=	' : <select name="bacteria_from_min' + i + '">';                }else if(id.split('_')[0] == 'disinfect'){                    html +=	' : <select name="disinfect_from_min' + i + '">';                }else if(id.split('_')[0] == 'heating'){                    html +=	' : <select name="heating_from_min' + i + '">';                }else if(id.split('_')[0] == 'stir'){                    html +=	' : <select name="stir_from_min' + i + '">';                }else if(id.split('_')[0] == 'water'){                    html +=	' : <select name="water_from_min' + i + '">';                }else if(id.split('_')[0] == 'highValve'){                    html +=	' : <select name="highValve_from_min' + i + '">';                }else if(id.split('_')[0] == 'lowValve'){                    html +=	' : <select name="lowValve_from_min' + i + '">';                }else if(id.split('_')[0] == 'tem'){                    html +=	' : <select name="tem_from_min' + i + '">';                }else{                };                for(var min = 0; min < 60; min++){                    if(min < 10){                        html +=	'<option value="0' + min + '">0' + min + '</option>';                    }else{                        html +=	'<option value="' + min + '">' + min + '</option>';                    };                };                    html +=	'</select>';                html +=	'</div>';                html +=	'<div  class="col-xs-3">';                    html +=	'<input  id=' + del + ' class="delete" type="button" value="Delete" onclick="Delete(' + del + ');">';                html +=	'</div>';            html +=	'</div>';            html +=	'<div class="to row">';                html +=	'<div  class="col-3">';                html +=	'<span>To</span>';                html +=	'</div>';                html +=	'<div  class="col-xs-6">';                if(id.split('_')[0] == 'bacteria'){                    html +=	'<select name="bacteria_to_hr' + i + '">';                }else if(id.split('_')[0] == 'disinfect'){                    html +=	'<select name="disinfect_to_hr' + i + '">';                }else if(id.split('_')[0] == 'heating'){                    html +=	'<select name="heating_to_hr' + i + '">';                }else if(id.split('_')[0] == 'stir'){                    html +=	'<select name="stir_to_hr' + i + '">';                }else if(id.split('_')[0] == 'water'){                    html +=	'<select name="water_to_hr' + i + '">';                }else if(id.split('_')[0] == 'highValve'){                    html +=	'<select name="highValve_to_hr' + i + '">';                }else if(id.split('_')[0] == 'lowValve'){                    html +=	'<select name="lowValve_to_hr' + i + '">';                }else if(id.split('_')[0] == 'tem'){                    html +=	'<select name="tem_to_hr' + i + '">';                }else{                };                for(var hr = 0; hr < 24; hr++){                    if(hr < 10){                        html +=	'<option value="0' + hr + '">0' + hr + '</option>';                    }else{                        html +=	'<option value="' + hr + '">' + hr + '</option>';                    };                };                    html +=	'</select>';                if(id.split('_')[0] == 'bacteria'){                    html +=	' : <select name="bacteria_to_min' + i + '">';                }else if(id.split('_')[0] == 'disinfect'){                    html +=	' : <select name="disinfect_to_min' + i + '">';                }else if(id.split('_')[0] == 'heating'){                    html +=	' : <select name="heating_to_min' + i + '">';                }else if(id.split('_')[0] == 'stir'){                    html +=	' : <select name="stir_to_min' + i + '">';                }else if(id.split('_')[0] == 'water'){                    html +=	' : <select name="water_to_min' + i + '">';                }else if(id.split('_')[0] == 'highValve'){                    html +=	' : <select name="highValve_to_min' + i + '">';                }else if(id.split('_')[0] == 'lowValve'){                    html +=	' : <select name="lowValve_to_min' + i + '">';                }else if(id.split('_')[0] == 'tem'){                    html +=	' : <select name="tem_to_min' + i + '">';                }else{                };                for(var min = 0; min < 60; min++){                    if(min < 10){                        html +=	'<option value="0' + min + '">0' + min + '</option>';                    }else{                        html +=	'<option value="' + min + '">' + min + '</option>';                    };                };                    html +=	'</select><br>';                    html +=	'<input  id=' + add + ' class="add" type="button" value="Add" onclick="Add(' + add + ');">';                html +=	'</div>';                html +=	'<div  class="col-xs-3"></div>';            html +=	'</div>';            html += '</div>';            html += '</div>';            div.innerHTML = html;            div.style.marginTop = '15px';            div.style.zIndex = '100';            evt.parentNode.parentNode.parentNode.parentNode.parentNode.parentNode.appendChild(div);        };        function Delete(evt){            var id = evt.getAttribute('id');            var add = id.split('_')[0] + '_' + 'add';            var clo_xs_3 = evt.parentNode;            var from = clo_xs_3.parentNode;            var begin = id.split('_')[0];            var div = from.parentNode.parentNode.parentNode;            var next_div = div.nextElementSibling;            var pre_div = div.previousElementSibling;            if(next_div && pre_div == null){                    div.parentNode.removeChild(div);                    next_div.style.marginTop = '0px';            }else if(next_div && pre_div){                    div.parentNode.removeChild(div);            }else if(next_div == null && pre_div == null){                 div.parentNode.parentNode.children[1].style.display = 'inline-block';                 div.parentNode.style.visibility = 'hidden';                 var name = id.split('_')[0];                 var from_hr = name + '_from_hr' + 1;                 var from_min = name + '_from_min' + 1;                 var to_hr = name + '_to_hr' + 1;                 var to_min = name + '_to_min' + 1;                 $('select[name=' + from_hr + ']').val('00');                 $('select[name=' + from_min + ']').val('00');                 $('select[name=' + to_hr + ']').val('00');                 $('select[name=' + to_min + ']').val('00');            }else{                div.parentNode.removeChild(div);                i --;                add = add + i;                add = document.getElementById(add);                if(add == null){                    add = pre_div.children[1].children[0].children[1].children[1].children[3];                };                add.style.display = 'block';            };        };        function Cancel(){            window.location.href='/cargo2';        };        $(function(){            var bacteria = $(".set-schedule")[0];            var bacteria_div = $("#bacteria_div");            var disinfect = $(".set-schedule")[1];            var disinfect_div = $("#disinfect_div");            var heating = $(".set-schedule")[2];            var heating_div = $("#heating_div");            var stir = $(".set-schedule")[3];            var stir_div = $("#stir_div");            var water = $(".set-schedule")[4];            var water_div = $("#water_div");            var highValve = $(".set-schedule")[5];            var highValve_div = $("#highValve_div");            var lowValve = $(".set-schedule")[6];            var lowValve_div = $("#lowValve_div");            var tem = $(".set-schedule")[7];            var tem_div = $("#tem_div");            bacteria.onclick = function(){                bacteria.style.display = 'none';                bacteria_div.css('visibility','visible');            };            disinfect.onclick = function(){                disinfect.style.display = 'none';                disinfect_div.css('visibility','visible');            };            heating.onclick = function(){                heating.style.display = 'none';                heating_div.css('visibility','visible');            };            stir.onclick = function(){                stir.style.display = 'none';                stir_div.css('visibility','visible');            };            water.onclick = function(){                water.style.display = 'none';                water_div.css('visibility','visible');            };            highValve.onclick = function(){                highValve.style.display = 'none';                highValve_div.css('visibility','visible');            };            lowValve.onclick = function(){                lowValve.style.display = 'none';                lowValve_div.css('visibility','visible');            };            tem.onclick = function(){                tem.style.display = 'none';                tem_div.css('visibility','visible');            };        });    </script>    <style>        body {	        margin:0;        }        .navbar-dark .navbar-nav .nav-link {            color: white;            cursor: pointer;	        text-decoration:none;            width: 110px;            height: 46px;        }        .nav-top {	        line-height:40px;	        background-color: #C4C4C4;        }        .website_title{            font-family: Roboto;            font-style: normal;            font-weight: normal;            font-size: 30px;            color: #000000;        }        .navbar-nav > li{	        float: none;	        display: inline-block;	        width: 100px;            margin: 0 auto;            text-align: center;        }        .navbar-nav > li a{            font-size: 20px;        }        .main-page {            margin-top: 200px;        }        .page-title {            font-family: Roboto;            font-style: normal;            font-weight: bold;            font-size: 36px;            color: #000000;        }        form {            margin-top: 70px;        }        .flex {            display: flex;            flex-direction: row;            flex-wrap: wrap;            justify-content: center;        }        .flex span {            font-family: Roboto;            font-style: normal;            font-weight: normal;            font-size: 18px;            margin-left: 20px;            color: #000000;        }        .duration {            background: #FFFFFF;            border: 1px solid #000000;            box-sizing: border-box;            border-radius: 5px;            width: 110px;            height: 40px;            font-size: 20px;            margin-left: 15px;            text-align: center;        }        .from select, .to select {            width: 65px;            height: 35px;            margin-left: 2px;        }        .to {          margin-top: 10px;          margin-left: 10px;        }        .from {            margin-left: 10px;        }        .from > div:first-child, .to > div:first-child {            padding-right: 0px;            text-align: right;            margin-right: 5px;        }        .bacteria, .disinfect, .heating, .stir, .water, .highValve, .lowValve, .tem {          height: 400px;          border: 2px solid #E5E5E5;          border-radius: 5px;          margin-top:35px;          margin-left:35px;        }        .item-title {          display: inline-block;          margin-top: 20px;          margin-left: 20px;          font-family: Roboto;          font-style: normal;          font-weight: bold;          font-size: 24px;          color: #000000;        }        .set-schedule {            width: 200px;            height: 45px;            background: #008CBA;            border: 1px solid #CFCFCF;            box-sizing: border-box;            color: #FFFFFF;            border-radius: 5px;            font-size: 17px;            margin-left:10px;        }        .delete {            background: #E43030;            border: 1px solid #CFCFCF;            box-sizing: border-box;            border-radius: 5px;            margin-left: 5px;            width: 65px;            height: 33px;            font-size: 16px;            text-align: center;            line-height: 16px;            color: #FFFFFF;        }        .add {            background: #008CBA;            border: 1px solid #CFCFCF;            box-sizing: border-box;            border-radius: 5px;            margin-top: 10px;            margin-left: 82px;;            width: 65px;            height: 33px;            font-size: 16px;            text-align: center;            line-height: 16px;            color: #FFFFFF;        }        .page-bottom {            margin-top: 100px;        }        .form-control {            background: #008CBA;            border: 1px solid #CFCFCF;            box-sizing: border-box;            border-radius: 5px;            width: 120px;            height: 58px;            text-align: center;            line-height: 50px;            color: #FFFFFF;            display: inline-block;        }        @media(max-width:373px){            .card {                margin-right: 0px;            }            .bacteria, .disinfect, .heating, .stir, .water, .highValve, .lowValve, .tem {                margin-left: 0px;            }            .col {                padding-right: 0px;                padding-left: 0px;            }            .from,.to {                margin-left: 0px;            }            .flex span {                margin-left: 0px;            }            .from select, .to select {                width: 45px;            }            .add {                width: 50px;                margin-left: 62px;            }            .delete {                width: 58px;            }            .col-xs-8:not(:first-child) {                margin-top: 150px;            }            .form-group {                margin-top: 50px;            }        }        @media(max-width:577px){        }        @media(min-width:576px){        }         @media(min-width:768px){            .navbar-nav > li {                 margin-left: 0px;            }            .navbar-nav .li-block {                display:none;            }         }         @media(min-width:991px){            .navbar-nav > li {                 margin-left: 20px;            }            .navbar-nav .li-block {                display:none;            }            .page-bottom input:last-child {                margin-left: 100px;            }         }         @media(min-width:1200px){            .navbar-nav > li {                 margin-left: 50px;            }            .navbar-nav .li-block {                display: inline-block;                width: 100px;            }            .page-bottom input:last-child {                margin-left: 100px;            }         }         @media(min-width:1400px){            .navbar-nav .li-block {                display: inline-block;                width: 200px;            }            .page-bottom input:last-child {                margin-left: 100px;            }         }         @media(min-width:1689px) {            .navbar-nav > li {                 margin-left: 50px;            }            .navbar-nav .li-block {                display: inline-block;                width: 500px;            }            .page-bottom input:last-child {                margin-left: 100px;            }         }    </style></head><body>    <nav class="fixed-top">        <nav class="navbar navbar-expand-md nav-top justify-content-center">            <div>                <span class="website_title">發酵槽{{params.tid}}</span>            </div>        </nav>        <nav class="navbar navbar-expand-md bg-dark navbar-dark nav-bottom">            <button class="navbar-toggler" type="button" data-toggle="collapse" data-target="#collapsibleNavbar">                <span class="navbar-toggler-icon"></span>            </button>            <div class="collapse navbar-collapse" id="collapsibleNavbar">                <ul class="navbar-nav">                    <li class="nav-item">                        <a class="nav-link" href="/">首頁</a>                    </li>                    <li class="nav-item">                        <a class="nav-link" href="#">關於我們</a>                    </li>                    <li class="nav-item">                        <a class="nav-link" href="#">資訊</a>                    </li>                    <li class="nav-item">                        <a class="nav-link" href="#">聯絡方法</a>                    </li>                    <li class="nav-item">                        <a class="nav-link" href="/cargo_list">咖啡貨櫃</a>                    </li>                    <li class="nav-item">                        <a class="nav-link" href="/video">影像串流</a>                    </li>                    <li class="li-block"></li>                    <li class="nav-item">                        <a class="nav-link" href="#"><i class="fa fa-user-o"></i> {{params.username}}</a>                    </li>                    <li class="nav-item">                        <a class="nav-link" href="/logout">Logout</a>                    </li>                </ul>            </div>        </nav>    </nav>    <div class="main-page">        <form method="post" action="/b_tank/{{params.tid}}">            <div class="container-fluid">                <div class="row">                    <div class="col flex">                         <div class="bacteria col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">打菌</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="bacteria_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="bacteria_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="bacteria_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="bacteria_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="bacteria_del1" class="delete" type="button" value="Delete" onclick="Delete(bacteria_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="bacteria_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="bacteria_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="bacteria_add1" class="add" type="button" value="Add" onclick="Add(bacteria_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                        </div>                        <div class="disinfect col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">消毒</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="disinfect_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="disinfect_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="disinfect_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="disinfect_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="disinfect_del1" class="delete" type="button" value="Delete" onclick="Delete(disinfect_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="disinfect_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="disinfect_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="disinfect_add1" class="add" type="button" value="Add" onclick="Add(disinfect_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                         </div>                        <div class="heating col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">加熱</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="heating_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="heating_duration1" class="duration">                                            <option value="30min" selected>30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="heating_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="heating_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="heating_del1" class="delete" type="button" value="Delete" onclick="Delete(heating_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="heating_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="heating_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="heating_add1" class="add" type="button" value="Add" onclick="Add(heating_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                         </div>                        <div class="stir col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">攪拌</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="stir_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="stir_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="stir_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="stir_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="stir_del1" class="delete" type="button" value="Delete" onclick="Delete(stir_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="stir_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="stir_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="stir_add1" class="add" type="button" value="Add" onclick="Add(stir_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                         </div>                        <div class="water col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">注水</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="water_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="water_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="water_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="water_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="water_del1" class="delete" type="button" value="Delete" onclick="Delete(water_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="water_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="water_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="water_add1" class="add" type="button" value="Add" onclick="Add(water_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                         </div>                        <div class="highValve col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">開上閥</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="highValve_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="highValve_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="highValve_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="highValve_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="highValve_del1" class="delete" type="button" value="Delete" onclick="Delete(highValve_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="highValve_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="highValve_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="highValve_add1" class="add" type="button" value="Add" onclick="Add(highValve_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                         </div>                        <div class="lowValve col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">開下閥</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="lowValve_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="lowValve_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="lowValve_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="lowValve_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="lowValve_del1" class="delete" type="button" value="Delete" onclick="Delete(lowValve_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="lowValve_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="lowValve_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="lowValve_add1" class="add" type="button" value="Add" onclick="Add(lowValve_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                         </div>                        <div class="tem col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">                            <h2 class="item-title">溫度</h2>                            <input class="set-schedule" type="button" value="Set up the schedule">                            <br>                            <div id="tem_div" class="row" style="visibility:hidden;">                                <div class="col-12 row">                                    <div class="col-xl-5 col-lg-5 col-md-4 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <span>Duration</span>                                        <select name="tem_duration1" class="duration">                                            <option selected value="30min">30 min</option>                                            <option value="60min">60 min</option>                                            <option  value="90min">90 min</option>                                            <option  value="120min">120 min</option>                                            <option  value="150min">150 min</option>                                        </select>                                    </div>                                    <div class="from-to col-xl-7 col-lg-7 col-md-8 col-sm-12 col-xs-12"  style="margin-top:10px;">                                        <div>                                            <div class="from row">                                                <div class="col-3">                                                    <span>From</span>                                                </div>                                                <div  class="col-xs-6">                                                    <select name="tem_from_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="tem_from_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                </div>                                                <div class="col-xs-3">                                                    <input  id="tem_del1" class="delete" type="button" value="Delete" onclick="Delete(tem_del1);">                                                </div>                                            </div>                                            <div class="to row">                                                <div class="col-3">                                                    <span>To</span>                                                </div>                                                <div class="col-xs-6">                                                    <select name="tem_to_hr1">                                                        {% for hr in range(0, 24) %}                                                            {% if hr < 10 %}                                                                <option value="0{{hr}}">0{{hr}}</option>                                                            {% else %}                                                                <option value="{{hr}}">{{hr}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select>                                                    : <select name="tem_to_min1">                                                        {% for min in range(0, 60) %}                                                            {% if min < 10 %}                                                                <option value="0{{min}}">0{{min}}</option>                                                            {% else %}                                                                <option value="{{min}}">{{min}}</option>                                                            {% endif %}                                                        {% endfor %}                                                    </select><br>                                                    <input id="tem_add1" class="add" type="button" value="Add" onclick="Add(tem_add1);">                                                </div>                                                <div  class="col-xs-3"></div>                                            </div>                                        </div>                                    </div>                                </div>                            </div>                        </div>                    </div>                </div>            </div>            <div class="row page-bottom">                <div class="col"></div>                    <div class="col-xl-4 col-lg-6 col-md-8 col-sm-10 col-xs-10" style="text-align:center;">                        <div class="form-group">                            <input type="button" class="form-control" value="Cancel" onclick="Cancel();">                            <input type="submit" class="form-control" value="Confirm">                        </div>                    </div>                <div class="col"></div>            </div>        </form>    </div></body></html>
 |