Re-enabled form of setting after submit.
This commit is contained in:
parent
043cacfc26
commit
ccd83f5004
2 changed files with 5 additions and 2 deletions
|
@ -52,5 +52,4 @@ class App.SettingsAreaItem extends App.Controller
|
|||
value = params
|
||||
else
|
||||
value = directData
|
||||
|
||||
App.Setting.set(@setting['name'], value)
|
||||
App.Setting.set(@setting['name'], value, doneLocal: => @formEnable(e))
|
||||
|
|
|
@ -21,6 +21,8 @@ class App.Setting extends App.Model
|
|||
timeout: 2000
|
||||
}
|
||||
App.Setting.preferencesPost(@)
|
||||
if options.doneLocal
|
||||
options.doneLocal(@)
|
||||
|
||||
if !options.fail
|
||||
options.fail = (settings, details) ->
|
||||
|
@ -29,6 +31,8 @@ class App.Setting extends App.Model
|
|||
msg: App.i18n.translateContent(details.error_human || details.error || 'Unable to update object!')
|
||||
timeout: 2000
|
||||
}
|
||||
if options.failLocal
|
||||
options.failLocal(@)
|
||||
if setting.frontend
|
||||
App.Config.set(name, value)
|
||||
setting.save(options)
|
||||
|
|
Loading…
Reference in a new issue