input.html.tpl 613 B

1234567891011
  1. {{define "input"}}
  2. <div class="{{if .options.formClass}}{{.options.formClass}}{{else}}form-group{{end}}">
  3. <label class="control-label" for="{{.options.id}}">{{.options.label}}</label>
  4. <input type="{{.options.type}}"
  5. name="{{.options.name}}"
  6. class="{{if .options.inputClass}}{{.options.inputClass}}{{else}}form-control{{end}}"
  7. id="{{.options.id}}"
  8. placeholder="{{.options.placeholder}}" {{if .update}}value="{{.value}}"{{end}} {{if .options.required}}required{{end}}>
  9. {{if .options.help}}<small class="form-text text-muted">{{.options.help}}</small>{{end}}
  10. </div>
  11. {{end}}