aw-lights/templates/control.html

16 lines
568 B
HTML
Raw Normal View History

2021-08-21 15:24:21 -04:00
<!-- TODO: When refreshing, the selected element does not change -->
2021-08-21 17:22:03 -04:00
<!-- TODO: Do not use .to_string() for comparison -->
2021-08-21 21:45:55 -04:00
<select id="template-name" rust-input="change-template">
2021-08-22 00:14:50 -04:00
{%- let selected_name = parameters.get_name() -%}
{% for name in Parameters::get_names() -%}
2021-08-21 15:24:21 -04:00
<option value="{{ name }}"
2021-08-22 00:14:50 -04:00
{%- if selected_name == name.to_string() %} selected="selected"{% endif -%}
2021-08-21 15:24:21 -04:00
>{{ name }}</option>
2021-08-22 00:14:50 -04:00
{% endfor -%}
2021-08-21 15:24:21 -04:00
</select>
2021-08-21 14:02:08 -04:00
<form rust-submit="form">
2021-08-21 15:24:21 -04:00
{{ parameters.render() }}
<button type="submit">Submit</button>
2021-08-21 14:02:08 -04:00
</form>