2019-11-04 15:00:46 +01:00
|
|
|
{{define "input"}}
|
|
|
|
<div class="{{if .options.formClass}}{{.options.formClass}}{{else}}form-group{{end}}">
|
|
|
|
<label class="control-label" for="{{.options.id}}">{{.options.label}}</label>
|
|
|
|
<input type="{{.options.type}}"
|
|
|
|
name="{{.options.name}}"
|
|
|
|
class="{{if .options.inputClass}}{{.options.inputClass}}{{else}}form-control{{end}}"
|
|
|
|
id="{{.options.id}}"
|
2019-12-06 10:59:00 +01:00
|
|
|
placeholder="{{.options.placeholder}}" {{if .update}}value="{{.value}}"{{end}} {{if .options.otherAttrs}}{{.options.otherAttrs|attr}}{{end}} {{if .options.required}}required{{end}}>
|
2019-11-04 15:00:46 +01:00
|
|
|
{{if .options.help}}<small class="form-text text-muted">{{.options.help}}</small>{{end}}
|
|
|
|
</div>
|
|
|
|
{{end}}
|