mirror of
https://github.com/writefreely/writefreely
synced 2024-11-10 11:24:13 +00:00
Support changing landing conf val from Admin UI
Closes T651
This commit is contained in:
parent
2b8b52285d
commit
161f7a8de2
2 changed files with 3 additions and 0 deletions
1
admin.go
1
admin.go
|
@ -350,6 +350,7 @@ func handleAdminUpdateSite(app *App, u *User, w http.ResponseWriter, r *http.Req
|
|||
func handleAdminUpdateConfig(apper Apper, u *User, w http.ResponseWriter, r *http.Request) error {
|
||||
apper.App().cfg.App.SiteName = r.FormValue("site_name")
|
||||
apper.App().cfg.App.SiteDesc = r.FormValue("site_desc")
|
||||
apper.App().cfg.App.Landing = r.FormValue("landing")
|
||||
apper.App().cfg.App.OpenRegistration = r.FormValue("open_registration") == "on"
|
||||
mul, err := strconv.Atoi(r.FormValue("min_username_len"))
|
||||
if err == nil {
|
||||
|
|
|
@ -71,6 +71,8 @@ p.docs {
|
|||
<dd>{{.Config.Host}}</dd>
|
||||
<dt>User Mode</dt>
|
||||
<dd>{{if .Config.SingleUser}}Single user{{else}}Multiple users{{end}}</dd>
|
||||
<dt{{if .Config.SingleUser}} class="invisible"{{end}}>Landing Page</dt>
|
||||
<dd{{if .Config.SingleUser}} class="invisible"{{end}}><input type="text" name="landing" id="landing" class="inline" value="{{.Config.Landing}}" style="width: 14em;" /></dd>
|
||||
<dt{{if .Config.SingleUser}} class="invisible"{{end}}><label for="open_registration">Open Registrations</label></dt>
|
||||
<dd{{if .Config.SingleUser}} class="invisible"{{end}}><input type="checkbox" name="open_registration" id="open_registration" {{if .Config.OpenRegistration}}checked="checked"{{end}} /></dd>
|
||||
<dt><label for="min_username_len">Minimum Username Length</label></dt>
|
||||
|
|
Loading…
Reference in a new issue