mirror of
https://github.com/writefreely/writefreely
synced 2024-11-24 09:33:11 +00:00
Enable changing default_visibility from Admin dash
Ref T675
This commit is contained in:
parent
a75b45f060
commit
569bc792d0
2 changed files with 9 additions and 0 deletions
1
admin.go
1
admin.go
|
@ -391,6 +391,7 @@ func handleAdminUpdateConfig(apper Apper, u *User, w http.ResponseWriter, r *htt
|
|||
if apper.App().cfg.App.UserInvites == "none" {
|
||||
apper.App().cfg.App.UserInvites = ""
|
||||
}
|
||||
apper.App().cfg.App.DefaultVisibility = r.FormValue("default_visibility")
|
||||
|
||||
m := "?cm=Configuration+saved."
|
||||
err = apper.SaveConfig(apper.App().cfg)
|
||||
|
|
|
@ -95,6 +95,14 @@ p.docs {
|
|||
<option value="admin" {{if eq .Config.UserInvites "admin"}}selected="selected"{{end}}>Admins</option>
|
||||
</select>
|
||||
</dd>
|
||||
<dt{{if .Config.SingleUser}} class="invisible"{{end}}><label for="default_visibility">Default blog visibility</label></dt>
|
||||
<dd{{if .Config.SingleUser}} class="invisible"{{end}}>
|
||||
<select name="default_visibility" id="default_visibility">
|
||||
<option value="unlisted" {{if eq .Config.DefaultVisibility "unlisted"}}selected="selected"{{end}}>Unlisted</option>
|
||||
<option value="public" {{if eq .Config.DefaultVisibility "public"}}selected="selected"{{end}}>Public</option>
|
||||
<option value="private" {{if eq .Config.DefaultVisibility "private"}}selected="selected"{{end}}>Private</option>
|
||||
</select>
|
||||
</dd>
|
||||
</dl>
|
||||
<input type="submit" value="Save Configuration" />
|
||||
</div>
|
||||
|
|
Loading…
Reference in a new issue