pnpdevice/templates/relay-create.template.html

22 lines
596 B
HTML
Raw Permalink Normal View History

<html>
<h1>Relay Creation</h1>
<h2>Existing relays</h2>
<table>
<thead><th>Relay</th><th>Pin</th></thead>
<tbody>
{% for relay in relays %}
<tr><td>{{ relay.name }}</td><td>{{ relay.pin.name }}</td></tr>
{% endfor %}
</table>
<form method="POST" action="/relay/create">
<input type="text" name="name" placeholder="Pool Pump 1"></input>
<select name="pin_id">:
{% for pin in pins %}
<option value="{{ pin.chip.number }}-{{ pin.chip.name }}-{{ pin.line_number }}">{{ pin.name }}</option>
{% endfor %}
</select>
<button type="submit">Create</button>
</form>
</html>