order config options by datatype
This commit is contained in:
parent
37d184b3e2
commit
3683e53c2a
1 changed files with 13 additions and 5 deletions
|
@ -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 }}
|
||||
<input type="submit" value="Save"/>
|
||||
</form>
|
||||
|
|
Loading…
Reference in a new issue