v4/templates/components/role.html
2025-04-07 22:07:29 -07:00

12 lines
522 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}}"
title="{{if not .Safe}}This role is considered unsafe.{{end}}"
>
<input type="{{.InputType}}" id="{{$for}}" value="{{$for}}" {{if eq .InputType
"radio"}}name="category_group_{{.CategoryID}}"{{end}} {{if not
.Safe}}disabled="disabled"{{end}} {{if .Selected}}checked="checked"{{end}}/>
<label for="{{$for}}">{{.Name}}</label>
</div>