oef/templates/layout/input.html.tpl

12 lines
675 B
Smarty
Raw Permalink Normal View History

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}}"
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}}