Sha256: 53a038c074a453dcaf62eb20ce61447d4ffcc01fae3e0e33614e2fd0a490f561

Contents?: true

Size: 803 Bytes

Versions: 31

Compression:

Stored size: 803 Bytes

Contents

class App.Views.Main.Users.UserRegistrationForm extends App.Views.Base
  constructor: (opts = {}) ->
    super opts

  render: ->
    form = new App.UI.Form for: new App.Models.User, delegator: this, callbackSuccess: '_created'
    form.render()

  receivedSignal: (signal, data) ->
    switch signal
      when 'confirming' then this._confirming()
      when 'confirmed' then this._confirmed()

  _created: (data) ->
    this.connectWith new App.Models.User(id: data.id)
    $('form').add('#sign_in_paragraph').hide 'slow'
    $('#verification_info').show 'slow'
    flash = new App.Views.Shared.Flash notice: data.notice
    flash.render()

  _confirming: -> $('#verification_info').text $('#verification_progress').text()

  _confirmed: -> window.location.href = '/user/sessions/new?event=confirmed'

Version data entries

31 entries across 27 versions & 1 rubygems

Version Path
loco-rails-3.0.3 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-3.0.3 test/dummy/node_modules/loco-js/spec_coffee/dummy/views/main/users/user_registration_form.coffee
loco-rails-2.5.3 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.5.2 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-3.0.2 test/dummy/node_modules/loco-js/spec_coffee/dummy/views/main/users/user_registration_form.coffee
loco-rails-3.0.2 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-3.0.1 test/dummy/node_modules/loco-js/spec_coffee/dummy/views/main/users/user_registration_form.coffee
loco-rails-3.0.1 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.5.1 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.5.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.4.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.3.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-3.0.0 test/dummy/node_modules/loco-js/spec_coffee/dummy/views/main/users/user_registration_form.coffee
loco-rails-3.0.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.2.2 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.2.1 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.2.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.1.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-2.0.0 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee
loco-rails-1.5.2 test/dummy/app/assets/javascripts/views/main/users/user_registration_form.coffee