keep reply to during preview

This commit is contained in:
Ted Unangst 2019-07-30 21:20:56 -04:00
parent 5a621af47e
commit 63b1e59b83
3 changed files with 4 additions and 1 deletions

View File

@ -2,6 +2,8 @@ changelog
-- next -- next
+ Keep reply to setting during preview.
+ Increase max thread retrieval depth to 10. + Increase max thread retrieval depth to 10.
-- 0.7.6 -- 0.7.6

View File

@ -1089,6 +1089,7 @@ func savehonk(w http.ResponseWriter, r *http.Request) {
templinfo := getInfo(r) templinfo := getInfo(r)
templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r) templinfo["HonkCSRF"] = login.GetCSRF("honkhonk", r)
templinfo["Honks"] = honks templinfo["Honks"] = honks
templinfo["InReplyTo"] = r.FormValue("rid")
templinfo["Noise"] = r.FormValue("noise") templinfo["Noise"] = r.FormValue("noise")
templinfo["ServerMessage"] = "honk preview" templinfo["ServerMessage"] = "honk preview"
err := readviews.Execute(w, "honkpage.html", templinfo) err := readviews.Execute(w, "honkpage.html", templinfo)

View File

@ -2,7 +2,7 @@
<button onclick="showhonkform(); return false"><a href="/newhonk">it's honking time</a></button> <button onclick="showhonkform(); return false"><a href="/newhonk">it's honking time</a></button>
<form id="honkform" action="/honk" method="POST" enctype="multipart/form-data" style="display: none"> <form id="honkform" action="/honk" method="POST" enctype="multipart/form-data" style="display: none">
<p> <p>
in reply to: <input type="text" name="rid" id="ridinput" value="" autocomplete=off> in reply to: <input type="text" name="rid" id="ridinput" value="{{ .InReplyTo }}" autocomplete=off>
<input type="hidden" name="CSRF" value="{{ .HonkCSRF }}"> <input type="hidden" name="CSRF" value="{{ .HonkCSRF }}">
<p> <p>
<label id="donker">attach: <input onchange="updatedonker();" type="file" name="donk"><span></span></label> <label id="donker">attach: <input onchange="updatedonker();" type="file" name="donk"><span></span></label>