diff options
author | Robin ALEXANDER <colisee@hotmail.com> | 2022-02-03 10:55:20 +0100 |
---|---|---|
committer | Robin ALEXANDER <colisee@hotmail.com> | 2022-02-03 10:55:20 +0100 |
commit | 852665779c24880e97c1a560e8f19a11f2ee28a3 (patch) | |
tree | 51e4d4ec58dc1753ec8708bfc38943b86bba9d0e /gui/views | |
parent | 6db5087d69445592e193267fbe2e13b96b4c41d7 (diff) | |
download | dabmux-852665779c24880e97c1a560e8f19a11f2ee28a3.tar.gz dabmux-852665779c24880e97c1a560e8f19a11f2ee28a3.tar.bz2 dabmux-852665779c24880e97c1a560e8f19a11f2ee28a3.zip |
Introduce selectable values for ad-hoc parameters
Diffstat (limited to 'gui/views')
-rw-r--r-- | gui/views/rcparam.tpl | 28 |
1 files changed, 21 insertions, 7 deletions
diff --git a/gui/views/rcparam.tpl b/gui/views/rcparam.tpl index 3bf3e5c..c415d7a 100644 --- a/gui/views/rcparam.tpl +++ b/gui/views/rcparam.tpl @@ -9,17 +9,31 @@ <script type="text/javascript" src="/static/intercooler-1.0.1.min.js"></script> </head> - <body> - <h1 class="w3-container w3-blue-grey">Remote-Control of module {{module}}</h1> - <div class="w3-container"> - <form class="w3-container w3-card-4" ic-on-error="alert(str)" ic-post-to="/rc/{{module}}/{{param}}"> + <body class="w3-container"> + <h1 class="w3-blue-grey">Remote-Control: module {{module}}</h1> + <div class="w3-card-4"> + <form class="w3-container" ic-on-error="alert(str)" ic-post-to="/rc/{{module}}/{{param}}"> <p /> - <label>Parameter <b>{{param}}</b></label> - <input name="newvalue" type="text" value="{{value}}"> + % if (len(list) == 0): + <label>{{param}}:</label> + <input name="newvalue" type="text" value="{{value}}" autofocus> + % else: + <label>{{label}}:</label> + <select id="newvalue" name="newvalue"> + % for l in list: + % if (bytes(l["value"], 'utf-8') == value): + <option selected value={{l["value"]}}>{{l["desc"]}}</option> + % else: + <option value={{l["value"]}}>{{l["desc"]}}</option> + % end + % end + </select> + % end <p /> <button class="w3-button w3-blue-grey">Update</button> + <p /> </form> </div> </body> -</html> +</html>
\ No newline at end of file |