diff options
Diffstat (limited to 'templates')
-rw-r--r-- | templates/postform.tmpl | 5 | ||||
-rw-r--r-- | templates/settings.tmpl | 9 |
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> |