all repos — well-binge @ 4690b04bb57834544694aa1b0d740fe746ec7236

Create positive, recurring habits.

templates/habits-id.tmpl (view raw)

 1{{ extends "base.tmpl" }}
 2
 3{{define "title" -}}Edit - {{end}}
 4
 5{{define "content" -}}
 6	<h1>Edit habit</h1>
 7
 8    <form method="post" action="/edit">
 9        <label>
10            <span>Name:</span>
11            <input type="text" name="name" autocomplete="off" placeholder="Name" value="{{ .Name }}" required />
12        </label>
13        {{ if not .Negative }}
14            <label>
15                <span>Days:</span>
16                <input type="number" name="days" autocomplete="off" placeholder="Days" min="1" max="60" value="{{ .Days }}" required />
17            </label>
18            <label>
19                <span>Enabled:</span>
20                <input type="checkbox" name="enabled"{{ if not .Disabled }} checked{{ end }} />
21            </label>
22        {{ end }}
23        <input type="submit" value="Edit" />
24    </form>
25    <form method="post" action="/edit">
26        <input type="submit" value="Delete" />
27    </form>
28{{end}}