aboutsummaryrefslogtreecommitdiff
path: root/templates
diff options
context:
space:
mode:
authorr <r@freesoftwareextremist.com>2020-10-19 06:51:23 +0000
committerr <r@freesoftwareextremist.com>2020-10-19 06:51:23 +0000
commitfdd9b8fd2bf1688187dda2cb801232c744fe26e0 (patch)
treef729fa705e254644fc188639e6dbf55d769df4f6 /templates
parentef41ff32e2cb16a3757b952a33d29528482685b8 (diff)
downloadbloat-fdd9b8fd2bf1688187dda2cb801232c744fe26e0.tar.gz
bloat-fdd9b8fd2bf1688187dda2cb801232c744fe26e0.zip
Add setting for default format
Diffstat (limited to 'templates')
-rw-r--r--templates/postform.tmpl5
-rw-r--r--templates/settings.tmpl9
2 files changed, 13 insertions, 1 deletions
diff --git a/templates/postform.tmpl b/templates/postform.tmpl
index ac77486..b38cb9d 100644
--- a/templates/postform.tmpl
+++ b/templates/postform.tmpl
@@ -16,8 +16,11 @@
<div>
{{if gt (len .Formats) 0}}
<span class="post-form-field">
+ {{$defFormat := .DefaultFormat}}
<select id="post-format" name="format" accesskey="F" title="Format (F)">
- {{range .Formats}} <option value="{{.Type}}">{{.Name}}</option> {{end}}
+ {{range .Formats}}
+ <option value="{{.Type}}" {{if eq $defFormat .Type}}selected{{end}}>{{.Name}}</option>
+ {{end}}
</select>
</span>
{{end}}
diff --git a/templates/settings.tmpl b/templates/settings.tmpl
index 67386a4..972e1a2 100644
--- a/templates/settings.tmpl
+++ b/templates/settings.tmpl
@@ -5,6 +5,15 @@
<form id="settings-form" action="/settings" method="POST">
<input type="hidden" name="csrf_token" value="{{$.Ctx.CSRFToken}}">
<div class="settings-form-field">
+ <label for="visibility"> Default format </label>
+ {{$defFormat := .Settings.DefaultFormat}}
+ <select id="post-format" name="format">
+ {{range .PostFormats}}
+ <option value="{{.Type}}" {{if eq $defFormat .Type}}selected{{end}}>{{.Name}}</option>
+ {{end}}
+ </select>
+ </div>
+ <div class="settings-form-field">
<label for="visibility"> Default scope </label>
<select id="visibility" name="visibility">
<option value="public" {{if eq .Settings.DefaultVisibility "public"}}selected{{end}}>Public</option>