| 123456789101112131415161718192021222324252627282930313233343536 |
- {{define "checkbox"}}
- <div class="form-check">
- <input type="checkbox" class="form-check-input" id="{{.Name}}" name="{{.Name}}"{{if .Required}} required{{end}}{{if .Checked}} checked{{end}}>
- {{if .Label}} <label class="form-check-label" for="{{.Name}}">{{.Label}}</label>{{end}}
- </div>
- {{if .Help}} <div id="{{.Name}}Help" class="form-text">{{.Help}}</div>{{end}}
- {{if .Error}}{{range $e := .Error}}<div class="text-danger">{{$e}}</div>{{end}}{{end}}
- {{end}}
- {{define "password"}}
- {{if .Label}}<label class="form-label" for="{{.Name}}">{{.Label}}</label>{{end}}
- <input type="password" id="{{.Name}}" name="{{.Name}}" class="form-control"
- {{- if .Placeholder}} placeholder="{{.Placeholder}}"{{end}}
- {{- if .Help}} aria-describedby="{{.Name}}Help"{{end}}
- {{- if .Required}} required{{end}}
- {{- if .AutoFocus}} autofocus{{end}}>
- {{if .Help}}<div id="{{.Name}}Help" class="form-text">{{.Help}}</div>{{end}}
- {{if .Error}}{{range $e := .Error}}<div class="text-danger">{{$e}}</div>{{end}}{{end}}
- {{end}}
- {{define "text"}}
- {{if .Label}}<label class="form-label" for="{{.Name}}">{{.Label}}</label>{{end}}
- <input type="text" id="{{.Name}}" name="{{.Name}}" class="form-control"
- {{- if .Value}} value="{{.Value}}"{{end}}
- {{- if .Placeholder}} placeholder="{{.Placeholder}}"{{end}}
- {{- if .Help}} aria-describedby="{{.Name}}Help"{{end}}
- {{- if .AutoComplete}} autocomplete="{{.AutoComplete}}"{{end}}
- {{- if .Required}} required{{end}}
- {{- if .AutoFocus}} autofocus{{end}}>
- {{if .Help}}<div id="{{.Name}}Help" class="form-text">{{.Help}}</div>{{end}}
- {{if .Error}}{{range $e := .Error}}<div class="text-danger">{{$e}}</div>{{end}}{{end}}
- {{end}}
- {{define "hidden"}}
- <input type="hidden" id="{{.Name}}" name="{{.Name}}" value="{{.Value}}">
- {{end}}
|