12 lines
522 B
HTML
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>
|