few more fixes for lehonkform

This commit is contained in:
Ted Unangst 2019-10-20 15:23:41 -04:00
parent e4110ecbb8
commit c8d2d4d33e
2 changed files with 4 additions and 2 deletions

View File

@ -1,8 +1,8 @@
<p id="honkformhost">
<button id="honkingtime" onclick="return showhonkform();"><a href="/newhonk">it's honking time</a></button>
<button id="honkingtime" onclick="return showhonkform();" {{ if .IsPreview }}style="display:none"{{ end }}><a href="/newhonk">it's honking time</a></button>
<form id="honkform" action="/honk" method="POST" enctype="multipart/form-data" {{ if not .IsPreview }}style="display: none"{{ end }}>
<input type="hidden" name="CSRF" value="{{ .HonkCSRF }}">
<input type="hidden" name="updatexid" value = "{{ .UpdateXID }}">
<input type="hidden" name="updatexid" id="updatexidinput" value = "{{ .UpdateXID }}">
<input type="hidden" name="rid" id="ridinput" value="{{ .InReplyTo }}">
<h3>let's make some noise</h3>
<p>

View File

@ -246,6 +246,8 @@ function showhonkform(elem, rid, hname) {
ridinput.value = ""
honknoise.value = ""
}
var updateinput = document.getElementById("updatexidinput")
updateinput.value = ""
document.getElementById("honknoise").focus()
return false
}