(options)
| 49 | // Initialization |
| 50 | |
| 51 | initialize (options) { |
| 52 | if (options == null) { options = {} } |
| 53 | this.utils = utils |
| 54 | this.previousFormInputs = options.initialValues || {} |
| 55 | if (this.previousFormInputs.emailOrUsername == null) { this.previousFormInputs.emailOrUsername = this.previousFormInputs.email || this.previousFormInputs.username } |
| 56 | |
| 57 | if (options.loginMessage) { |
| 58 | this.loginMessage = options.loginMessage |
| 59 | } |
| 60 | |
| 61 | if (options.nextUrl) { |
| 62 | this.nextUrl = options.nextUrl |
| 63 | window.nextURL = options.nextUrl |
| 64 | } |
| 65 | |
| 66 | if (me.useSocialSignOn()) { |
| 67 | // TODO: Switch to promises and state, rather than using defer to hackily enable buttons after render |
| 68 | application.gplusHandler.loadAPI({ |
| 69 | success: () => _.defer(() => { |
| 70 | this.$('#google-login-button').attr('disabled', false) |
| 71 | return this.onClickGPlusLoginButton() |
| 72 | }), |
| 73 | }) |
| 74 | if (utils.isCodeCombat) { |
| 75 | // No Facebook login in Ozaria |
| 76 | application.facebookHandler.loadAPI({ success: () => _.defer(() => this.$('#facebook-login-btn').attr('disabled', false)) }) |
| 77 | } |
| 78 | } |
| 79 | this.subModalContinue = options.subModalContinue |
| 80 | this.showLibraryModal = userUtils.shouldShowLibraryLoginModal() |
| 81 | this.onFacebookLoginError = this.onFacebookLoginError.bind(this) |
| 82 | } |
| 83 | |
| 84 | afterRender () { |
| 85 | super.afterRender() |
nothing calls this directly
no test coverage detected