Improved storing locale_default at initial setup.
This commit is contained in:
parent
6c0f7fc1e7
commit
648a4c2522
2 changed files with 9 additions and 9 deletions
|
@ -240,9 +240,6 @@ class Admin extends App.WizardFullScreen
|
|||
|
||||
relogin: (data, status, xhr) =>
|
||||
@log 'notice', 'relogin:success', data
|
||||
callback = ->
|
||||
App.Setting.set('locale_default', App.i18n.detectBrowserLocale())
|
||||
App.Setting.fetchFull(callback)
|
||||
App.Event.trigger 'notify:removeall'
|
||||
@navigate 'getting_started/base'
|
||||
|
||||
|
@ -340,11 +337,9 @@ class Base extends App.WizardFullScreen
|
|||
@hideAlerts()
|
||||
@disable(e)
|
||||
|
||||
# get params
|
||||
@params = @formParam(e.target)
|
||||
|
||||
# add logo
|
||||
@params.logo = @logoPreview.attr('src')
|
||||
@params.locale_default = App.i18n.detectBrowserLocale()
|
||||
|
||||
store = (logoResizeDataUrl) =>
|
||||
@params.logo_resize = logoResizeDataUrl
|
||||
|
@ -357,7 +352,7 @@ class Base extends App.WizardFullScreen
|
|||
success: (data, status, xhr) =>
|
||||
if data.result is 'ok'
|
||||
for key, value of data.settings
|
||||
App.Config.set( key, value )
|
||||
App.Config.set(key, value)
|
||||
if App.Config.get('system_online_service')
|
||||
@navigate 'getting_started/channel/email_pre_configured'
|
||||
else
|
||||
|
|
|
@ -146,6 +146,11 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
|
|||
end
|
||||
end
|
||||
|
||||
# add locale_default
|
||||
if params[:locale_default].present?
|
||||
settings[:locale_default] = params[:locale_default]
|
||||
end
|
||||
|
||||
if messages.present?
|
||||
render json: {
|
||||
result: 'invalid',
|
||||
|
@ -208,8 +213,8 @@ curl http://localhost/api/v1/getting_started -v -u #{login}:#{password}
|
|||
def setup_done_response
|
||||
return false if !setup_done
|
||||
|
||||
groups = Group.where( active: true )
|
||||
addresses = EmailAddress.where( active: true )
|
||||
groups = Group.where(active: true)
|
||||
addresses = EmailAddress.where(active: true)
|
||||
|
||||
render json: {
|
||||
setup_done: true,
|
||||
|
|
Loading…
Reference in a new issue