mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
Set cursor to not-allowed on labels for disabled checkboxes
This commit is contained in:
committed by
GitHub
parent
bfb480a288
commit
c91eb2e20d
@@ -174,3 +174,11 @@ class CheckoutFieldRenderer(FieldRenderer):
|
||||
else:
|
||||
attrs = ''
|
||||
return '<div class="{klass}"{attrs}>{html}</div>'.format(klass=self.get_form_group_class(), html=html, attrs=attrs)
|
||||
|
||||
def wrap_widget(self, html):
|
||||
if isinstance(self.widget, CheckboxInput):
|
||||
css_class = "checkbox"
|
||||
if self.field.field.disabled:
|
||||
css_class += " disabled"
|
||||
html = f'<div class="{css_class}">{html}</div>'
|
||||
return html
|
||||
|
||||
Reference in New Issue
Block a user