diff options
author | Robin ALEXANDER <colisee@hotmail.com> | 2022-02-05 22:19:42 +0100 |
---|---|---|
committer | Robin ALEXANDER <colisee@hotmail.com> | 2022-02-05 22:19:42 +0100 |
commit | b6376fb8f1379bebd3241f29e356eb0076adfcbd (patch) | |
tree | 59cd1047c817bdb9ac92e16d262fe74597c1123f /gui/views/rcparam.tpl | |
parent | 852665779c24880e97c1a560e8f19a11f2ee28a3 (diff) | |
download | dabmux-b6376fb8f1379bebd3241f29e356eb0076adfcbd.tar.gz dabmux-b6376fb8f1379bebd3241f29e356eb0076adfcbd.tar.bz2 dabmux-b6376fb8f1379bebd3241f29e356eb0076adfcbd.zip |
Switch to Jinja2 from SimpleTemplate
Diffstat (limited to 'gui/views/rcparam.tpl')
-rw-r--r-- | gui/views/rcparam.tpl | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/gui/views/rcparam.tpl b/gui/views/rcparam.tpl index c415d7a..369e8c9 100644 --- a/gui/views/rcparam.tpl +++ b/gui/views/rcparam.tpl @@ -14,21 +14,21 @@ <div class="w3-card-4"> <form class="w3-container" ic-on-error="alert(str)" ic-post-to="/rc/{{module}}/{{param}}"> <p /> - % if (len(list) == 0): + {% if not list %} <label>{{param}}:</label> - <input name="newvalue" type="text" value="{{value}}" autofocus> - % else: + <input name="newvalue" type="text" value="{{value.decode()}}" autofocus> + {% else %} <label>{{label}}:</label> <select id="newvalue" name="newvalue"> - % for l in list: - % if (bytes(l["value"], 'utf-8') == value): + {% for l in list %} + {% if (l["value"] == value.decode()) %} <option selected value={{l["value"]}}>{{l["desc"]}}</option> - % else: + {% else %} <option value={{l["value"]}}>{{l["desc"]}}</option> - % end - % end + {% endif %} + {% endfor %} </select> - % end + {% endif %} <p /> <button class="w3-button w3-blue-grey">Update</button> <p /> |