Skip to content

Commit

Permalink
XWIKI-13967: Confusion between Supported Languages and Default Langua…
Browse files Browse the repository at this point in the history
…ges when multilingual is set to no (#2770)

* Added a CSS ruleset to remove the supported languages field from the UI when it's not useful.

(cherry picked from commit fcb4699)
  • Loading branch information
Sereza7 authored and github-actions[bot] committed Jan 18, 2024
1 parent a67815d commit 715a350
Showing 1 changed file with 126 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -441,4 +441,130 @@ require(['jquery', 'xwiki-l10n!xwiki-administration-localization', 'xwiki-locale
<use>currentPage</use>
</property>
</object>
<object>
<name>XWiki.AdminLocalizationSheet</name>
<number>0</number>
<className>XWiki.StyleSheetExtension</className>
<guid>3af35852-ce5c-402a-8a09-16ee04654aac</guid>
<class>
<name>XWiki.StyleSheetExtension</name>
<customClass/>
<customMapping/>
<defaultViewSheet/>
<defaultEditSheet/>
<defaultWeb/>
<nameField/>
<validationScript/>
<cache>
<cache>0</cache>
<defaultValue>long</defaultValue>
<disabled>0</disabled>
<displayType>select</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>0</multiSelect>
<name>cache</name>
<number>5</number>
<prettyName>Caching policy</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<unmodifiable>0</unmodifiable>
<values>long|short|default|forbid</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</cache>
<code>
<contenttype>PureText</contenttype>
<disabled>0</disabled>
<editor>PureText</editor>
<name>code</name>
<number>2</number>
<prettyName>Code</prettyName>
<restricted>0</restricted>
<rows>20</rows>
<size>50</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.TextAreaClass</classType>
</code>
<contentType>
<cache>0</cache>
<disabled>0</disabled>
<displayType>select</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>0</multiSelect>
<name>contentType</name>
<number>6</number>
<prettyName>Content Type</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<unmodifiable>0</unmodifiable>
<values>CSS|LESS</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</contentType>
<name>
<disabled>0</disabled>
<name>name</name>
<number>1</number>
<prettyName>Name</prettyName>
<size>30</size>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.StringClass</classType>
</name>
<parse>
<disabled>0</disabled>
<displayFormType>select</displayFormType>
<displayType>yesno</displayType>
<name>parse</name>
<number>4</number>
<prettyName>Parse content</prettyName>
<unmodifiable>0</unmodifiable>
<classType>com.xpn.xwiki.objects.classes.BooleanClass</classType>
</parse>
<use>
<cache>0</cache>
<disabled>0</disabled>
<displayType>select</displayType>
<freeText>forbidden</freeText>
<largeStorage>0</largeStorage>
<multiSelect>0</multiSelect>
<name>use</name>
<number>3</number>
<prettyName>Use this extension</prettyName>
<relationalStorage>0</relationalStorage>
<separator> </separator>
<separators>|, </separators>
<size>1</size>
<unmodifiable>0</unmodifiable>
<values>currentPage|onDemand|always</values>
<classType>com.xpn.xwiki.objects.classes.StaticListClass</classType>
</use>
</class>
<property>
<cache>long</cache>
</property>
<property>
<code>/* 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;
}</code>
</property>
<property>
<contentType/>
</property>
<property>
<name/>
</property>
<property>
<parse/>
</property>
<property>
<use>currentPage</use>
</property>
</object>
</xwikidoc>

0 comments on commit 715a350

Please sign in to comment.