add form components
This commit is contained in:
parent
015e85bf7b
commit
8f17bf6a8c
8 changed files with 87 additions and 0 deletions
10
template/components/form_select.html
Normal file
10
template/components/form_select.html
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
{{define "form_select"}}
|
||||
<div class="input-container">
|
||||
<label for="{{.ID}}" class="form-label">{{.Label}}</label>
|
||||
<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}}
|
||||
</select>
|
||||
</div>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue