start theme core templates
This commit is contained in:
parent
da7925ae08
commit
015e85bf7b
12 changed files with 72 additions and 35 deletions
15
template/components/form_input.html
Normal file
15
template/components/form_input.html
Normal file
|
|
@ -0,0 +1,15 @@
|
|||
{{define "form_input"}}
|
||||
<div class="input-container">
|
||||
<label class="form-label" for="{{.ID}}">{{.Label}}</label>
|
||||
<input type="{{.Type}}" id="{{.ID}}" name="{{.ID}}" placeholder="{{.Placeholder}}" class="form-control{{if ne .Error ""}} error{{end}}"
|
||||
{{if eq .IsDisabled true}}
|
||||
disabled
|
||||
{{end}}
|
||||
{{if ne .Value ""}}
|
||||
value="{{.Value}}"
|
||||
{{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}}
|
||||
</div>
|
||||
{{end}}
|
||||
Loading…
Add table
Add a link
Reference in a new issue