   className: 'container'
 
   events:
-    'submit form': 'submit',
-    'click .submit': 'submit',
-    'click .retry': 'rerender',
+    'submit form': 'submit'
+    'click .submit': 'submit'
+    'click .retry': 'rerender'
 
   constructor: ->
     super


    # get data
    App.Com.ajax(
      id:   'password_reset_verify',
      type: 'POST',
      url:  '/api/users/password_reset_verify',
      data: JSON.stringify(params),
      processData: true,
      success: @render_changed_success
      error:   @render_changed_failed
    )

  render_changed_success: (data, status, xhr) =>
    @html App.view('generic/hero_message')(
      head:    'Woo hoo! Your password has been changed!',
      message: 'Please try to login!',
    );

  render_changed_failed: ->
    @html App.view('generic/hero_message')(
      head:    'Failed!',
      message: 'Ask your admin!',
    );

App.Config.set( 'password_reset_verify/:token', Verify, 'Routes' )


    # get data
    App.Com.ajax(
      id:   'password_reset'
      type: 'POST'
      url:  '/api/users/password_reset'
      data: JSON.stringify(params)
      processData: true
      success: @success
      error:   @error
    )

  success: (data, status, xhr) =>
    @html App.view('generic/hero_message')(
      head:    'We\'ve sent password reset instructions to your email address'
      message: 'If you don\'t receive instructions within a minute or two, check your email\'s spam and junk filters, or try <a href="#" class="retry">resending your request</a>.'
    )

  error: (data, status, xhr) =>
    @html App.view('generic/hero_message')(
      head:    'Problem'
      message: 'Username or email address invalid, please go back and try <a href="#" class="retry">again</a>.'
    )

App.Config.set( 'reset_password', Index, 'Routes' )

