aw-lights/templates/control.html
2021-08-22 00:14:50 -04:00

16 lines
568 B
HTML

<!-- TODO: When refreshing, the selected element does not change -->
<!-- TODO: Do not use .to_string() for comparison -->
<select id="template-name" rust-input="change-template">
{%- let selected_name = parameters.get_name() -%}
{% for name in Parameters::get_names() -%}
<option value="{{ name }}"
{%- if selected_name == name.to_string() %} selected="selected"{% endif -%}
>{{ name }}</option>
{% endfor -%}
</select>
<form rust-submit="form">
{{ parameters.render() }}
<button type="submit">Submit</button>
</form>