mirror of https://github.com/perkeep/perkeep.git
wizard: placeholder for gallery field
The gallery field of the wizard is awkward and undocumented. This placeholder at least gives a hint to devs (and maybe users) on what is expected in that field. Change-Id: Ie707dbecaf87ec98e267fcf6b987cd3b6a1d13e0
This commit is contained in:
parent
22495f8bfd
commit
c61feaa0bd
|
@ -129,11 +129,12 @@ func sendWizard(rw http.ResponseWriter, req *http.Request, hasChanged bool) {
|
|||
}
|
||||
|
||||
funcMap := template.FuncMap{
|
||||
"printWizard": printWizard,
|
||||
"printWizard": printWizard,
|
||||
"inputIsGallery": func(inputName string) bool { return inputName == "gallery" },
|
||||
}
|
||||
|
||||
body := `<form id="WizardForm" action="setup" method="post" enctype="multipart/form-data">`
|
||||
body += `{{range $k,$v := .}}{{printf "%v" $k}} <input type="text" size="30" name ="{{printf "%v" $k}}" value="{{printWizard $v}}"><br />{{end}}`
|
||||
body += `{{range $k,$v := .}}{{printf "%v" $k}} <input type="text" size="30" name ="{{printf "%v" $k}}" value="{{printWizard $v}}" {{if inputIsGallery $k}}placeholder="/pics/,sha1-xxxx,pics.css"{{end}}><br />{{end}}`
|
||||
body += `<input type="submit" form="WizardForm" value="Save"></form>`
|
||||
|
||||
if hasChanged {
|
||||
|
|
Loading…
Reference in New Issue