oef/templates/layout/input.html.tpl

11 lines
675 B
Smarty

{{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}}>
{{if .options.help}}<small class="form-text text-muted">{{.options.help}}</small>{{end}}
</div>
{{end}}