2016-06-30 18:32:58 -04:00
|
|
|
CocoView = require 'views/core/CocoView'
|
|
|
|
State = require 'models/State'
|
|
|
|
template = require 'templates/core/create-account-modal/confirmation-view'
|
|
|
|
forms = require 'core/forms'
|
|
|
|
|
|
|
|
module.exports = class ConfirmationView extends CocoView
|
|
|
|
id: 'confirmation-view'
|
|
|
|
template: template
|
|
|
|
|
|
|
|
events:
|
|
|
|
'click #start-btn': 'onClickStartButton'
|
|
|
|
|
|
|
|
initialize: ({ @signupState } = {}) ->
|
|
|
|
|
|
|
|
onClickStartButton: ->
|
|
|
|
classroom = @signupState.get('classroom')
|
|
|
|
if @signupState.get('path') is 'student'
|
2016-09-12 09:20:59 -04:00
|
|
|
# force clearing of _cc GET param from url if on /students
|
2016-06-30 18:32:58 -04:00
|
|
|
application.router.navigate('/', {replace: true})
|
2016-09-12 09:20:59 -04:00
|
|
|
application.router.navigate('/students')
|
2016-06-30 18:32:58 -04:00
|
|
|
else
|
|
|
|
application.router.navigate('/play')
|
|
|
|
document.location.reload()
|