lockserver/frontend/lock-code-edit.html
Finn a26b9cc63e
All checks were successful
/ build-container (push) Successful in 8m14s
Show logs when editing a code
2024-11-24 16:08:06 -08:00

18 lines
713 B
HTML

{{ template "header.html" . }}
<header>{{ if eq .Data.lock.Name "" }}Lock #{{ .Data.lock.ID }}{{ else }}{{ .Data.lock.Name }}{{ end }} Slot #{{ .Data.code.Slot }}</header>
<br />
<form method="post">
Code: <input type="text" name="code" value="{{ .Data.code.Code }}" /><br />
Name: <input type="text" name="name" value="{{ .Data.code.Name }}" /><br />
Enabled: <input type="checkbox" name="enabled" {{ if .Data.code.Enabled }}checked{{ end }} /><br />
<br />
<input type="submit" value="save" />
</form>
<br /><br />
<ul>
{{ range $_, $entry := .Data.log }}
<li>{{ $entry.State }} (<i>{{ $entry.Timestamp | time_since }} ago</i>)</li>
{{ end }}
</ul>
{{ template "footer.html" }}