Only display "show language selector" toggle if there is more than one language

This commit is contained in:
Toby Zerner 2017-07-22 11:47:50 +09:30
parent 20006b395d
commit 1af83fad99
3 changed files with 11 additions and 10 deletions

View File

@ -58,7 +58,7 @@ export default class BasicsPage extends Page {
]
})}
{Object.keys(this.localeOptions).length > 1
{Object.keys(this.localeOptions).length > 0
? FieldSet.component({
label: app.translator.trans('core.admin.basics.default_language_heading'),
children: [
@ -66,19 +66,16 @@ export default class BasicsPage extends Page {
options: this.localeOptions,
value: this.values.default_locale(),
onchange: this.values.default_locale
}),
Switch.component({
state: this.values.show_language_selector(),
onchange: this.values.show_language_selector,
children: app.translator.trans('core.admin.basics.show_language_selector_label'),
})
]
})
: ''}
{Switch.component({
state: this.values.show_language_selector(),
onchange: this.values.show_language_selector,
children: app.translator.trans('core.admin.basics.show_language_selector_label'),
})}
<br/>
{FieldSet.component({
label: app.translator.trans('core.admin.basics.home_page_heading'),
className: 'BasicsPage-homePage',

View File

@ -9,7 +9,7 @@
}
fieldset {
margin-bottom: 30px;
margin-bottom: 20px;
> ul {
list-style: none;

View File

@ -83,6 +83,10 @@ fieldset {
padding: 0;
margin: 0;
border: 0;
> ul > li {
margin-bottom: 10px;
}
}
legend {
font-size: 14px;