diff --git a/app/assets/javascripts/app/controllers/getting_started.js.coffee b/app/assets/javascripts/app/controllers/getting_started.js.coffee index e0d61a29e..39fca2688 100644 --- a/app/assets/javascripts/app/controllers/getting_started.js.coffee +++ b/app/assets/javascripts/app/controllers/getting_started.js.coffee @@ -39,7 +39,7 @@ class Index extends App.ControllerContent ) render: -> - + console.log('RENDER 1') # check authentication, redirect to login if master user already exists if !@master_user && !@authenticate() @navigate '#login' @@ -51,13 +51,13 @@ class Index extends App.ControllerContent new App.ControllerForm( el: @el.find('#form-master') model: App.User - required: 'signup' + screen: 'signup' autofocus: true ) new App.ControllerForm( el: @el.find('#form-agent') model: App.User - required: 'invite_agent' + screen: 'invite_agent' autofocus: true ) @@ -94,8 +94,7 @@ class Index extends App.ControllerContent # save user user.save( - done: (r) => - + done: => if @master_user @master_user = false App.Auth.login( @@ -106,7 +105,7 @@ class Index extends App.ControllerContent success: @relogin # error: @error, ) - + @Config.set('system_init_done', true) App.Event.trigger 'notify', { type: 'success' msg: App.i18n.translateContent( 'Welcome to %s!', @Config.get('product_name') ) @@ -123,13 +122,13 @@ class Index extends App.ControllerContent # rerender page @render() - fail: (data) -> - App.Event.trigger 'notify', { - type: 'error' - msg: App.i18n.translateContent( 'Can\'t create user!' ) - timeout: 2500 - } + fail: (data) -> + App.Event.trigger 'notify', { + type: 'error' + msg: App.i18n.translateContent( 'Can\'t create user!' ) + timeout: 2500 + } # @modalHide() )