blob: 68facc7d6297475abd0a4e963ea695d2b46c4c2e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
{{ define "main" }}
<main class="responsive">
<form action="/states/new" enctype="multipart/form-data" method="post">
<fieldset>
<div class="field border label{{ if .PathError }} invalid{{ end }}">
<input autofocus
id="path"
name="path"
required
type="text"
value="{{ .Path }}">
<label for="path">Path</label>
{{ if .PathDuplicate }}
<span class="error">This path already exist</span>
{{ else if .PathError }}
<span class="error">Invalid path</span>
{{ else }}
<span class="helper">Valid URL path beginning with a /</span>
{{ end }}
</div>
<div class="field label border">
<input name="file"
required
type="file">
<input type="text">
<label>File</label>
<span class="helper">JSON state file</span>
</div>
<button class="small-round" type="submit" value="submit">New</button>
</fieldset>
</form>
</main>
{{ end }}
|