mirror of
https://github.com/codeninjasllc/codecombat.git
synced 2024-11-25 00:28:31 -05:00
3d705e5d70
Fix link to /teachers/classes (fixes bugquest#20) Fix edit button color/icon (bugquest#23) Fix bugquest#34 Fix password input width (bugquest#33) Center new pasword text Fix teacher password reset endpoint (bugquest#4) Refactor+use NewHomeView logic for user page button (Fixes bugquest#2) Refactor teacher-password-reset endpoint This makes it much easier to prevent collisions with other logic when PUTing new User attributes. Add regression test for converting to teacher account Fix email verified links, require login (fix bugquest#16) Fix me having stale emailVerified value (Fixes bugquest#40) Don't show JoinClassModal to students Add paragraph to JoinClassModal (fixes bugquest#14) Update change-password label text (fixes bugquest#30) Fix prompting for login on Account Settings page (bugquest #10) Show validation errors for teacher password reset (bugquest#36) Show yellow progress dot in My Classes if anyone has started (bugquest#55) Remove confusing text (bugquest#100)
31 lines
935 B
CoffeeScript
31 lines
935 B
CoffeeScript
RootView = require 'views/core/RootView'
|
|
State = require 'models/State'
|
|
template = require 'templates/user/email-verified-view'
|
|
User = require 'models/User'
|
|
|
|
module.exports = class EmailVerifiedView extends RootView
|
|
id: 'email-verified-view'
|
|
template: template
|
|
|
|
events:
|
|
'click .login-button': 'onClickLoginButton'
|
|
|
|
initialize: (options, @userID, @verificationCode) ->
|
|
super(options)
|
|
@state = new State(@getInitialState())
|
|
@user = new User({ _id: @userID })
|
|
@user.sendVerificationCode(@verificationCode)
|
|
|
|
@listenTo @state, 'change', @render
|
|
@listenTo @user, 'email-verify-success', ->
|
|
@state.set { verifyStatus: 'success' }
|
|
me.fetch()
|
|
@listenTo @user, 'email-verify-error', ->
|
|
@state.set { verifyStatus: 'error' }
|
|
|
|
getInitialState: ->
|
|
verifyStatus: 'pending'
|
|
|
|
onClickLoginButton: (e) ->
|
|
AuthModal = require 'views/core/AuthModal'
|
|
@openModalView(new AuthModal())
|