mirror of
https://github.com/wagtail/wagtail.git
synced 2024-12-01 11:41:20 +01:00
Remove show_comments_toggle kwarg from BaseFormEditHandler
Nothing ever uses it.
This commit is contained in:
parent
5199df3a2a
commit
6ef6134530
@ -426,15 +426,10 @@ class BaseFormEditHandler(PanelGroup):
|
|||||||
class TabbedInterface(BaseFormEditHandler):
|
class TabbedInterface(BaseFormEditHandler):
|
||||||
template = "wagtailadmin/panels/tabbed_interface.html"
|
template = "wagtailadmin/panels/tabbed_interface.html"
|
||||||
|
|
||||||
def __init__(self, *args, show_comments_toggle=None, **kwargs):
|
def __init__(self, *args, **kwargs):
|
||||||
self.base_form_class = kwargs.pop("base_form_class", None)
|
self.base_form_class = kwargs.pop("base_form_class", None)
|
||||||
super().__init__(*args, **kwargs)
|
super().__init__(*args, **kwargs)
|
||||||
if show_comments_toggle is not None:
|
self.show_comments_toggle = "comment_notifications" in self.required_fields()
|
||||||
self.show_comments_toggle = show_comments_toggle
|
|
||||||
else:
|
|
||||||
self.show_comments_toggle = (
|
|
||||||
"comment_notifications" in self.required_fields()
|
|
||||||
)
|
|
||||||
|
|
||||||
def get_form_class(self):
|
def get_form_class(self):
|
||||||
form_class = super().get_form_class()
|
form_class = super().get_form_class()
|
||||||
@ -449,7 +444,6 @@ class TabbedInterface(BaseFormEditHandler):
|
|||||||
def clone_kwargs(self):
|
def clone_kwargs(self):
|
||||||
kwargs = super().clone_kwargs()
|
kwargs = super().clone_kwargs()
|
||||||
kwargs["base_form_class"] = self.base_form_class
|
kwargs["base_form_class"] = self.base_form_class
|
||||||
kwargs["show_comments_toggle"] = self.show_comments_toggle
|
|
||||||
return kwargs
|
return kwargs
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user