Compare commits

..

No commits in common. "5c3559c7931b561edf944db9305c40529f4cf28a" and "530a1171e6f1a4076371ebd9df210519a2a09b9a" have entirely different histories.

4 changed files with 1 additions and 13 deletions

View file

@ -11,10 +11,4 @@ type FormInput struct {
IsDisabled bool
Autocomplete bool
IsRequired bool
CustomAtt []CustomAtt
}
type CustomAtt struct {
AttName string
AttValue string
}

View file

@ -14,11 +14,6 @@
{{if ne .Value ""}}
value="{{.Value}}"
{{end}}
{{if .CustomAtt }}
{{range $options := .CustomAtt}}
{{$options.AttName}}="{{$options.AttValue}}"
{{end}}
{{end}}
aria-describedby="{{.ID}}Help">
{{if ne .Hint ""}}<small id="{{.ID}}Help" class="form-text text-muted">{{.Hint}}</small>{{end}}
{{if ne .Error ""}}<div class="error">{{.Error}}</div>{{end}}

View file

@ -5,7 +5,6 @@ type FormSelect struct {
SelectedOption FormSelectOption
Label string
AllOptions []FormSelectOption
IsMultiple bool
}
type FormSelectOption struct {

View file

@ -1,7 +1,7 @@
{{define "form_select"}}
<div class="input-container">
<label for="{{.ID}}" class="form-label">{{.Label}}</label>
<select class="form-select" id="{{.ID}}" name="{{.ID}}"{{if eq .IsMultiple true}} multiple{{end}}>
<select class="form-select" id="{{.ID}}" name="{{.ID}}">
{{range $options := .AllOptions}}
<option value="{{$options.Value}}" {{if eq $options.Value $.SelectedOption.Value }}selected="selected"{{end}}>{{$options.Caption}}</option>
{{end}}