order config options by datatype

This commit is contained in:
Iris Lightshard 2022-06-07 23:49:47 -06:00
parent 37d184b3e2
commit 3683e53c2a
Signed by: Iris Lightshard
GPG key ID: 3B7FBC22144E6398

View file

@ -10,14 +10,22 @@
{{ range $opt, $val := $config }}
{{ if eq ($opt).Type "int" }}
<label>{{($opt).Name}} <input type="number" step="1" name="{{($opt).Name}}:{{($opt).Type}}" value="{{$val}}"/></label><br/>
{{ else if eq ($opt).Type "float" }}
{{ end }}
{{ end }}
{{ range $opt, $val := $config }}
{{ if eq ($opt).Type "float" }}
<label>{{($opt).Name}} <input type="number" step="0.00000001" name="{{($opt).Name}}:{{($opt).Type}}" value="{{$val}}"/></label><br/>
{{ else if eq ($opt).Type "string" }}
{{ end }}
{{ end }}
{{ range $opt, $val := $config }}
{{ if eq ($opt).Type "string" }}
<label>{{($opt).Name}} <input type="text" name="{{($opt).Name}}:{{($opt).Type}}" value="{{$val}}"/></label><br/>
{{ else if eq ($opt).Type "multilinestring" }}
{{ end }}
{{ end }}
{{ range $opt, $val := $config }}
{{ if eq ($opt).Type "multilinestring" }}
<label>{{($opt).Name}} <textarea name="{{($opt).Name}}:{{($opt).Type}}">{{$val}}</textarea></label><br/>
{{ end}}
{{ end }}
{{ end }}
<input type="submit" value="Save"/>
</form>