mirror of
https://github.com/pretix/pretix.git
synced 2026-05-05 15:14:04 +00:00
Set cursor to not-allowed on labels for disabled checkboxes
This commit is contained in:
committed by
GitHub
parent
bfb480a288
commit
c91eb2e20d
@@ -98,6 +98,14 @@ class ControlFieldRenderer(FieldRenderer):
|
||||
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
|
||||
|
||||
|
||||
class ControlFieldWithVisibilityRenderer(ControlFieldRenderer):
|
||||
def __init__(self, *args, **kwargs):
|
||||
|
||||
Reference in New Issue
Block a user