thestrukture/IDE

View on GitHub
tmpl/ui/input.tmpl

Summary

Maintainability
Test Coverage
{{if .Type | eq "par"}}
<p class="{{.Misc}}">{{.Text}}</p>
{{end}}
{{if .Type | eq "h"}}
<h{{.Misc}}>{{.Text}}</h1{{.Misc}}>
{{end}}

{{if .Type | eq "select"}}
    <label>{{.Misc}}</label>
    <select class="form-control xsub"  name="{{.Name}}" >
        {{with .Options}}
            {{range .}}
                <option value="{{.}}">{{.}}</option>
            {{end}}
        {{end}}
    </select>
    <br/>
{{end}}

{{if .Type | neq "h"}}
    {{if .Type | neq "par"}}
        {{if .Type | neq "select"}}
            <p><input class="form-control xsub {{.Misc}}"  {{if .Value | neq ""}} value="{{.Value}}" {{end}} name="{{.Name}}" type="{{.Type}}" placeholder="{{.Text}}"></p>
        {{end}}
    {{end}}
{{end}}