123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317 |
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <title>LandGreen</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>
- <script src="../static/js/set_liquid.js"></script>
- <link rel="stylesheet" href="../static/css/set_liquid.css">
- <script>
- $(function(){
- {% if params.tank1_duration1 %}
- if({{params.tank1_from_hr1}} != '00' && {{params.tank1_to_hr1}} != '00'){
- var tank1 = $(".set-schedule")[0];
- var tank1_div = $("#tank1_div");
- tank1.style.display = 'none';
- tank1_div.css('visibility','visible');
- $('select[name=tank1_duration1]').val('{{params.tank1_duration1}}');
- $('select[name=tank1_from_hr1]').val('{{params.tank1_from_hr1}}');
- $('select[name=tank1_from_min1]').val('{{params.tank1_from_min1}}');
- $('select[name=tank1_to_hr1]').val('{{params.tank1_to_hr1}}');
- $('select[name=tank1_to_min1]').val('{{params.tank1_to_min1}}');
- };
- {% endif %}
- {% if params.tank1_duration2 %}
- var add = document.getElementById('tank1_add1');
- Add(add);
- $('select[name=tank1_duration' + i + ']').val('{{params.tank1_duration2}}');
- $('select[name=' + 'tank1_from_hr' + i + ']').val('{{params.tank1_from_hr2}}');
- $('select[name=' + 'tank1_from_min' + i + ']').val('{{params.tank1_from_min2}}');
- $('select[name=' + 'tank1_to_hr' + i + ']').val('{{params.tank1_to_hr2}}');
- $('select[name=' + 'tank1_to_min' + i + ']').val('{{params.tank1_to_min2}}');
- {% endif %}
- {% if params.tank1_duration3 %}
- var add = document.getElementById('tank1_add' + i);
- Add(add);
- $('select[name=tank1_duration' + i + ']').val('{{params.tank1_duration3}}');
- $('select[name=' + 'tank1_from_hr' + i + ']').val('{{params.tank1_from_hr3}}');
- $('select[name=' + 'tank1_from_min' + i + ']').val('{{params.tank1_from_min3}}');
- $('select[name=' + 'tank1_to_hr' + i + ']').val('{{params.tank1_to_hr3}}');
- $('select[name=' + 'tank1_to_min' + i + ']').val('{{params.tank1_to_min3}}');
- {% endif %}
- {% if params.tank2_duration1 %}
- if({{params.tank2_from_hr1}} != '00' && {{params.tank2_to_hr1}} != '00'){
- var tank2 = $(".set-schedule")[1];
- var tank2_div = $("#tank2_div");
- tank2.style.display = 'none';
- tank2_div.css('visibility','visible');
- $('select[name=tank2_duration1]').val('{{params.tank2_duration1}}');
- $('select[name=tank2_from_hr1]').val('{{params.tank2_from_hr1}}');
- $('select[name=tank2_from_min1]').val('{{params.tank2_from_min1}}');
- $('select[name=tank2_to_hr1]').val('{{params.tank2_to_hr1}}');
- $('select[name=tank2_to_min1]').val('{{params.tank2_to_min1}}');
- };
- {% endif %}
- {% if params.tank2_duration2 %}
- var add = document.getElementById('tank2_add1');
- Add(add);
- $('select[name=tank2_duration' + i + ']').val('{{params.tank2_duration2}}');
- $('select[name=' + 'tank2_from_hr' + i + ']').val('{{params.tank2_from_hr2}}');
- $('select[name=' + 'tank2_from_min' + i + ']').val('{{params.tank2_from_min2}}');
- $('select[name=' + 'tank2_to_hr' + i + ']').val('{{params.tank2_to_hr2}}');
- $('select[name=' + 'tank2_to_min' + i + ']').val('{{params.tank2_to_min2}}');
- {% endif %}
- {% if params.tank2_duration3 %}
- var add = document.getElementById('tank2_add' + i);
- Add(add);
- $('select[name=tank2_duration' + i + ']').val('{{params.tank1_duration3}}');
- $('select[name=' + 'tank2_from_hr' + i + ']').val('{{params.tank2_from_hr3}}');
- $('select[name=' + 'tank2_from_min' + i + ']').val('{{params.tank2_from_min3}}');
- $('select[name=' + 'tank2_to_hr' + i + ']').val('{{params.tank2_to_hr3}}');
- $('select[name=' + 'tank2_to_min' + i + ']').val('{{params.tank2_to_min3}}');
- {% endif %}
- });
- </script>
- </head>
- <body>
- <nav class="fixed-top">
- <nav class="navbar navbar-expand-md nav-top justify-content-center">
- <div>
- <span class="website_title">Fitolab Formula-G1</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="/online_fitolab">Online Fitolab</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">About Fitolab</a>
- </li>
- <li class="nav-item">
- <a class="nav-link" href="#">Contact Us</a>
- </li>
- <li class="li-block"></li>
- <li class="nav-item">
- <a class="nav-link" href="#">{{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">
- <div class="page-title text-center">
- Settings parametrs of liquid
- </div>
- <form method="post" action="/setting_liquid">
- <div class="container-fluid">
- <div class="row">
- <div class="col flex">
- <div class="tank1 col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">Water cycle from Tank1</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="tank1_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="tank1_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-xs-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="tank1_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="tank1_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="tank1_del1" class="delete" type="button" value="Delete" onclick="Delete(tank1_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-xs-3">
- <span style="margin-left: 23px;">To</span>
- </div>
- <div class="col-xs-6">
- <select name="tank1_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="tank1_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="tank1_add1" class="add" type="button" value="Add" onclick="Add(tank1_add1);">
- </div>
- <div class="col-xs-3"></div>
- </div>
- </div>
- </div>
- </div>
- </div>
- </div>
- <div style="width:35px;"></div>
- <div class="tank2 col-xl-5 col-lg-5 col-md-5 col-sm-8 col-xs-8">
- <h2 class="item-title">Water cycle from Tank2</h2>
- <input class="set-schedule" type="button" value="Set up the schedule">
- <br>
- <div id="tank2_div" class="row" style="visibility:hidden;">
- <div class="col-12 row">
- <div class="col-xl-5 col-lg-5 col-md-4" style="margin-top:10px;">
- <span>Duration</span>
- <select name="tank2_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" style="margin-top:10px;">
- <div>
- <div class="from row">
- <div class="col-xs-3">
- <span>From</span>
- </div>
- <div class="col-xs-6">
- <select name="tank2_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="tank2_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="tank2_del1" class="delete" type="button" value="Delete" onclick="Delete(tank2_del1);">
- </div>
- </div>
- <div class="to row">
- <div class="col-xs-3">
- <span style="margin-left: 23px;">To</span>
- </div>
- <div class="col-xs-6">
- <select name="tank2_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="tank2_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="tank2_add1" class="add" type="button" value="Add" onclick="Add(tank2_add1);">
- </div>
- <div class="col-xs-3"></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">
- <input type="submit" class="form-control" value="Confirm">
- </div>
- </div>
- <div class="col"></div>
- </div>
- </div>
- </form>
- </div>
- </body>
- </html>
|