views/honkform.html (view raw)
1<p id="honkformhost">
2<button id="honkingtime" onclick="return showhonkform();" {{ if .IsPreview }}style="display:none"{{ end }}><a href="/newhonk">it's honking time</a></button>
3<form id="honkform" action="/honk" method="POST" enctype="multipart/form-data" {{ if not .IsPreview }}style="display: none"{{ end }}>
4<input type="hidden" name="CSRF" value="{{ .HonkCSRF }}">
5<input type="hidden" name="updatexid" id="updatexidinput" value = "{{ .UpdateXID }}">
6<input type="hidden" name="rid" id="ridinput" value="{{ .InReplyTo }}">
7<h3>let's make some noise</h3>
8<p>
9<details>
10<summary>more options</summary>
11<p>
12<label class=button id="donker">attach: <input onchange="updatedonker();" type="file" name="donk"><span>{{ .SavedFile }}</span></label>
13<input type="hidden" id="saveddonkxid" name="donkxid" value="{{ .SavedFile }}">
14<p id="donkdescriptor"><label for=donkdesc>description:</label><br>
15<input type="text" name="donkdesc" value="{{ .DonkDesc }}" autocomplete=off>
16{{ with .SavedPlace }}
17<p><button id=checkinbutton type=button onclick="fillcheckin()">checkin</button>
18<div id=placedescriptor>
19 <p><label>name:</label><br><input type="text" name="placename" id=placenameinput value="{{ .Name }}">
20 <p><label>url:</label><br><input type="text" name="placeurl" id=placeurlinput value="{{ .Url }}">
21 <p><label>lat: </label><input type="text" size=9 name="placelat" id=placelatinput value="{{ .Latitude}}">
22 <label>lon: </label><input type="text" size=9 name="placelong" id=placelonginput value="{{ .Longitude }}">
23</div>
24{{ else }}
25<p><button id=checkinbutton type=button onclick="fillcheckin()">checkin</button>
26<div id=placedescriptor style="display: none">
27<p><label>name:</label><br><input type="text" name="placename" id=placenameinput value="">
28<p><label>url:</label><br><input type="text" name="placeurl" id=placeurlinput value="">
29<p><label>lat: </label><input type="text" size=9 name="placelat" id=placelatinput value="">
30<label>lon: </label><input type="text" size=9 name="placelong" id=placelonginput value="">
31</div>
32{{ end }}
33<p><button id=addtimebutton type=button onclick="showelement('timedescriptor')">add time</button>
34<div id=timedescriptor style="display: none">
35<p><label for=timestart>start:</label><br>
36<input type="text" name="timestart" value="">
37<p><label for=timeend>duration:</label><br>
38<input type="text" name="timeend" value="">
39</div>
40</details>
41<p>
42<textarea name="noise" id="honknoise">{{ .Noise }}</textarea>
43<p class="buttonarray">
44<button>it's gonna be honked</button>
45<button name="preview" value="preview">preview</button>
46<button type=button name="cancel" value="cancel" onclick="cancelhonking()">cancel</button>
47</form>