v4/templates/components/role.html

11 lines
399 B
HTML

{{ $for := printf "category-%s_role-%s" .CategoryID .ID }}
<div
class="role"
style="--role-color: {{.Colors.Main}}; --contrast-color: {{.Colors.Alt}};"
data-testid="{{$for}}"
>
<input type="{{.InputType}}" id="{{$for}}" {{if eq .InputType
"radio"}}name="category_group_{{.CategoryID}}"{{end}} {{if not
.Safe}}disabled="disabled"{{end}}/>
<label for="{{$for}}">{{.Name}}</label>
</div>