aboutsummaryrefslogtreecommitdiff
path: root/templates/postform.tmpl
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2019-12-21 08:36:44 +0000
committerr <r@freesoftwareextremist.com>2019-12-21 08:38:42 +0000
commit39c57a6b653a269668f459414d295e812f3628a8 (patch)
tree3b00e5ec638f592699d31562675b1b1e2d5da8c7 /templates/postform.tmpl
parentdf875381d4e2c9a0bd283acc3592cde6562f5e5e (diff)
downloadbloat-39c57a6b653a269668f459414d295e812f3628a8.tar.gz
bloat-39c57a6b653a269668f459414d295e812f3628a8.zip
Use a single form for new posts and replies
Diffstat (limited to 'templates/postform.tmpl')
-rw-r--r--templates/postform.tmpl16
1 files changed, 16 insertions, 0 deletions
diff --git a/templates/postform.tmpl b/templates/postform.tmpl
new file mode 100644
index 0000000..3f6eeaa
--- /dev/null
+++ b/templates/postform.tmpl
@@ -0,0 +1,16 @@
+<form class="post-form" action="/post" method="POST" enctype="multipart/form-data">
+ {{if .}}
+ <input type="hidden" name="reply_to_id" value="{{.InReplyToID}}" />
+ <label for="post-content"> Reply to {{.InReplyToName}} </label>
+ {{else}}
+ <label for="post-content"> New post </label>
+ {{end}}
+ <div class="post-form-content-container">
+ <textarea id="post-content" name="content" class="post-content" cols="50" rows="5">{{if .}}{{.ReplyContent}}{{end}}</textarea>
+ </div>
+ <div>
+ Attachments <input id="post-file-picker" type="file" name="attachments" multiple>
+ </div>
+ <button type="submit"> Post </button>
+</form>
+