Skip to content

Commit

Permalink
Fix the lose of widget which was added into FieldPanel kwargs
Browse files Browse the repository at this point in the history
  • Loading branch information
DylannCordel committed Oct 7, 2024
1 parent 1d2f71f commit d00c9e3
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
6 changes: 6 additions & 0 deletions CHANGELOG
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# 0.3.1 - 2024-10-07

* Fix the lose of widget which was added into FieldPanel kwargs
(eg: `FieldPanel("slug", wiget=SlugInput)`)


# 0.3.0 - 2024-09-26

* Add a "LanguagesColumn" for SnippetViewset to view in the list which languages are currently translated for instance
Expand Down
4 changes: 3 additions & 1 deletion wagtail_parler/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,9 +185,11 @@ def get_edit_handler(self: ModelAdmin) -> TabbedInterface:
and formfield_for_dbfield.__func__.__qualname__ != "ModelViewSet.formfield_for_dbfield"
):
main_form_meta_attrs["formfield_callback"] = self.formfield_for_dbfield
form_options = base_handlers.get_form_options()
form_options["fields"] = displayed_fields
base_form_class = build_translations_form(
self.model,
fields_for_model_kwargs={"fields": displayed_fields},
fields_for_model_kwargs=form_options,
base_form=getattr(self, "parler_base_form_class", None),
)
return TabbedInterface(handlers, base_form_class=base_form_class)
Expand Down

0 comments on commit d00c9e3

Please sign in to comment.