Quota item selection: Strike disabled items in select2

This commit is contained in:
Raphael Michel
2024-02-14 16:38:37 +01:00
parent 63894ca3da
commit 93eb041acc
2 changed files with 4 additions and 0 deletions

View File

@@ -674,6 +674,7 @@ def itemvar_select2(request, **kwargs):
{ {
'id': k, 'id': k,
'text': str(v), 'text': str(v),
'inactive': d,
} }
for k, v, d in choices for k, v, d in choices
], ],
@@ -715,6 +716,7 @@ def itemvars_select2(request, **kwargs):
{ {
'id': k, 'id': k,
'text': str(v), 'text': str(v),
'inactive': d,
} }
for k, v, d in choices for k, v, d in choices
], ],

View File

@@ -904,6 +904,7 @@ details {
} }
} }
.select2-container [aria-multiselectable] .select2-results__option span strike::before,
.select2-container [aria-multiselectable] .select2-results__option span span::before { .select2-container [aria-multiselectable] .select2-results__option span span::before {
content: ""; content: "";
font-family: FontAwesome; font-family: FontAwesome;
@@ -912,6 +913,7 @@ details {
width: 1.28571em; width: 1.28571em;
text-align: center; text-align: center;
} }
.select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] span strike::before,
.select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] span span::before { .select2-container [aria-multiselectable] .select2-results__option[aria-selected=true] span span::before {
content: "" content: ""
} }