From b6d2db98337b319fb9944e2fae8bef07964345a0 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" <41898282+github-actions[bot]@users.noreply.github.com> Date: Thu, 18 Jan 2024 16:55:20 +0100 Subject: [PATCH] XWIKI-13967: Confusion between Supported Languages and Default Languages when multilingual is set to no (#2770) (#2805) * Added a CSS ruleset to remove the supported languages field from the UI when it's not useful. (cherry picked from commit fcb46996b8fdebc9a01063786cdca95c167ddd29) Co-authored-by: C. Lucas --- .../XWiki/AdminLocalizationSheet.xml | 126 ++++++++++++++++++ 1 file changed, 126 insertions(+) diff --git a/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-ui/src/main/resources/XWiki/AdminLocalizationSheet.xml b/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-ui/src/main/resources/XWiki/AdminLocalizationSheet.xml index 642395c80352..4aaa605a49dc 100644 --- a/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-ui/src/main/resources/XWiki/AdminLocalizationSheet.xml +++ b/xwiki-platform-core/xwiki-platform-administration/xwiki-platform-administration-ui/src/main/resources/XWiki/AdminLocalizationSheet.xml @@ -441,4 +441,130 @@ require(['jquery', 'xwiki-l10n!xwiki-administration-localization', 'xwiki-locale currentPage + + XWiki.AdminLocalizationSheet + 0 + XWiki.StyleSheetExtension + 3af35852-ce5c-402a-8a09-16ee04654aac + + XWiki.StyleSheetExtension + + + + + + + + + 0 + long + 0 + select + forbidden + 0 + 0 + cache + 5 + Caching policy + 0 + + |, + 1 + 0 + long|short|default|forbid + com.xpn.xwiki.objects.classes.StaticListClass + + + PureText + 0 + PureText + code + 2 + Code + 0 + 20 + 50 + 0 + com.xpn.xwiki.objects.classes.TextAreaClass + + + 0 + 0 + select + forbidden + 0 + 0 + contentType + 6 + Content Type + 0 + + |, + 1 + 0 + CSS|LESS + com.xpn.xwiki.objects.classes.StaticListClass + + + 0 + name + 1 + Name + 30 + 0 + com.xpn.xwiki.objects.classes.StringClass + + + 0 + select + yesno + parse + 4 + Parse content + 0 + com.xpn.xwiki.objects.classes.BooleanClass + + + 0 + 0 + select + forbidden + 0 + 0 + use + 3 + Use this extension + 0 + + |, + 1 + 0 + currentPage|onDemand|always + com.xpn.xwiki.objects.classes.StaticListClass + + + + long + + + /* Do not display the supported language field (we assume it's the following one) + when the multilingual option is set to No. */ +form#localization dd:has(> div.dropdown > select[name="XWiki.XWikiPreferences_0_multilingual"] > option[value="0"]:checked) + dt, +form#localization dd:has(> div.dropdown > select[name="XWiki.XWikiPreferences_0_multilingual"] > option[value="0"]:checked) + dt + dd { + display: none; +} + + + + + + + + + + + + currentPage + +