mirror of
https://github.com/documize/community.git
synced 2025-07-24 15:49:44 +02:00
Set org and per user locale
This commit is contained in:
parent
23abcf1585
commit
4494ace0a2
30 changed files with 125 additions and 41 deletions
|
@ -30,12 +30,28 @@ export default Component.extend(Notifier, {
|
|||
hasTitleInputError: and('titleEmpty', 'titleError'),
|
||||
hasMessageInputError: and('messageEmpty', 'messageError'),
|
||||
hasConversionEndpointInputError: and('conversionEndpointEmpty', 'conversionEndpointError'),
|
||||
locale: {},
|
||||
locales: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
|
||||
let l = this.get('appMeta.locales');
|
||||
let t = [];
|
||||
|
||||
l.forEach((locale) => {
|
||||
t.pushObject( {name: locale} );
|
||||
});
|
||||
|
||||
this.set('locales', t);
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.set('maxTags', this.get('model.general.maxTags'));
|
||||
this.set('domain', this.get('model.general.domain'));
|
||||
this.set('locale', { name: this.get('model.general.locale') });
|
||||
},
|
||||
|
||||
didInsertElement() {
|
||||
|
@ -149,6 +165,10 @@ export default Component.extend(Notifier, {
|
|||
},
|
||||
|
||||
actions: {
|
||||
onSelectLocale(locale) {
|
||||
this.set('model.general.locale', locale.name);
|
||||
},
|
||||
|
||||
change() {
|
||||
const selectEl = $('#maxTags')[0];
|
||||
const selection = selectEl.selectedOptions[0].value;
|
||||
|
|
|
@ -46,13 +46,34 @@ export default Component.extend(AuthProvider, {
|
|||
return '';
|
||||
}
|
||||
}),
|
||||
locale: {},
|
||||
locales: null,
|
||||
|
||||
init() {
|
||||
this._super(...arguments);
|
||||
this.password = { password: "", confirmation: "" };
|
||||
|
||||
let l = this.get('appMeta.locales');
|
||||
let t = [];
|
||||
|
||||
l.forEach((locale) => {
|
||||
t.pushObject( {name: locale} );
|
||||
});
|
||||
|
||||
this.set('locales', t);
|
||||
},
|
||||
|
||||
didReceiveAttrs() {
|
||||
this._super(...arguments);
|
||||
|
||||
this.set('locale', { name: this.get('model.locale') });
|
||||
},
|
||||
|
||||
actions: {
|
||||
onSelectLocale(locale) {
|
||||
this.set('model.locale', locale.name);
|
||||
},
|
||||
|
||||
save() {
|
||||
let password = this.get('password.password');
|
||||
let confirmation = this.get('password.confirmation');
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue