2015-09-14 09:46:31 +00:00
|
|
|
{{ define "optsLoop" }}
|
|
|
|
{{ range $key, $value := . }}
|
|
|
|
{{ if $value.SubContent }}
|
|
|
|
<h2>{{ splitCapitalize $value.Name }}</h2>
|
|
|
|
{{ template "optsLoop" $value.Content }}
|
|
|
|
{{ else}}
|
|
|
|
|
|
|
|
<label for="{{ $value.Master }}_{{ $value.Name }}">{{ splitCapitalize $value.Name }}</label>
|
|
|
|
<input name="{{ $value.Master }}_{{ $value.Name }}" id="{{ $value.Master }}_{{ $value.Name }}" value="{{ $value.Content }}"></input><br>
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
{{ end }}
|
|
|
|
|
|
|
|
|
|
|
|
{{ define "content" }}
|
2015-09-13 21:48:52 +00:00
|
|
|
{{ with .Body }}
|
|
|
|
|
|
|
|
<div class="content">
|
|
|
|
|
|
|
|
<h1>Settings</h1>
|
|
|
|
|
|
|
|
<form>
|
2015-09-14 09:46:31 +00:00
|
|
|
{{ template "optsLoop" .Settings }}
|
2015-09-13 21:48:52 +00:00
|
|
|
</form>
|
|
|
|
|
|
|
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
{{ end }}
|
2015-09-14 09:46:31 +00:00
|
|
|
{{ end }}
|