Skip to content

Commit

Permalink
Update language_toggles.js
Browse files Browse the repository at this point in the history
In wagtail 5.1 (maybe earlier) Snippets (`/cms/snippets/<x>/<y>/edit/1/`) don't have a ".tab-content" anymore; they do have a `.nice-padding` though.
  • Loading branch information
andreasnuesslein authored Oct 18, 2023
1 parent f961716 commit c39a8d7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
jQuery( () => {
///////////////

const tabbedContent = $(`form .tab-content`);
const tabbedContent = $(`form .tab-content, form .nice-padding`);
const topLevel = (tabbedContent.length > 0) ? tabbedContent.first() : $(`.content > form`);
const languageCodeRegex = new RegExp(' \\[('+wagtailModelTranslations.languages.join('|')+')\\]');

Expand Down Expand Up @@ -180,4 +180,4 @@ for (language of initially_loaded_locale) {

///////////////
});
///////////////
///////////////

0 comments on commit c39a8d7

Please sign in to comment.