Support changing landing conf val from Admin UI
Closes T651
This commit is contained in:
parent
2b8b52285d
commit
161f7a8de2
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 {
|
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.SiteName = r.FormValue("site_name")
|
||||||
apper.App().cfg.App.SiteDesc = r.FormValue("site_desc")
|
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"
|
apper.App().cfg.App.OpenRegistration = r.FormValue("open_registration") == "on"
|
||||||
mul, err := strconv.Atoi(r.FormValue("min_username_len"))
|
mul, err := strconv.Atoi(r.FormValue("min_username_len"))
|
||||||
if err == nil {
|
if err == nil {
|
||||||
|
|
|
@ -71,6 +71,8 @@ p.docs {
|
||||||
<dd>{{.Config.Host}}</dd>
|
<dd>{{.Config.Host}}</dd>
|
||||||
<dt>User Mode</dt>
|
<dt>User Mode</dt>
|
||||||
<dd>{{if .Config.SingleUser}}Single user{{else}}Multiple users{{end}}</dd>
|
<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>
|
<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>
|
<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>
|
<dt><label for="min_username_len">Minimum Username Length</label></dt>
|
||||||
|
|
Loading…
Reference in New Issue