15 lines
No EOL
623 B
HTML
15 lines
No EOL
623 B
HTML
{{define "form_input"}}
|
|
<div class="input-container">
|
|
<label class="form-label" for="{{.ID}}">{{.Label}}</label>
|
|
<input type="{{.Type}}" id="{{.ID}}" name="{{.ID}}" placeholder="{{.Placeholder}}" class="form-control{{if ne .Error ""}} error{{end}}"
|
|
{{if eq .IsDisabled true}}
|
|
disabled
|
|
{{end}}
|
|
{{if ne .Value ""}}
|
|
value="{{.Value}}"
|
|
{{end}}
|
|
aria-describedby="{{.ID}}Help">
|
|
{{if ne .Hint ""}}<small id="{{.ID}}Help" class="form-text text-muted">{{.Hint}}</small>{{end}}
|
|
{{if ne .Error ""}}<div class="error">{{.Error}}</div>{{end}}
|
|
</div>
|
|
{{end}} |