Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use get_admin_display_title in PageChooserPanel #5745

Closed

Conversation

SaptakS
Copy link
Contributor

@SaptakS SaptakS commented Dec 27, 2019

Should fix #5726 . @gasman This should fix the title of the page only in the PageChooserPanel. Do you think this is a good approach? Another approach might be to remove the pageTitle.text() entirely since by default page_chooser.html shows get_admin_display_title. But I think adding a new data attribute is a better way.

I think I will need to add some tests also to ensure this behaviour works. I will add the tests once you confirm that this approach looks good.

  • For front-end changes: Did you test on all of Wagtail’s supported browsers? Please list the exact versions you tested.
  • For new features: Has the documentation been updated accordingly?

@squash-labs
Copy link

squash-labs bot commented Dec 27, 2019

Manage this branch in Squash

Test this branch here: https://saptaksfix-pagechooser-display-n2fe9.squash.io

@gasman
Copy link
Collaborator

gasman commented Sep 28, 2020

Thanks @SaptakS! Merged in 61e8173 (with a bit of additional logic + test to ensure that the display title is also used on the initial render for an already-populated field).

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

PageChooserPanel displays selected page title instead of custom get_admin_display_title
4 participants