diff --git a/app/pods/users/new/new-user-form/component.js b/app/pods/users/new/controller.js similarity index 76% rename from app/pods/users/new/new-user-form/component.js rename to app/pods/users/new/controller.js index 4d8b815..fcc00d7 100644 --- a/app/pods/users/new/new-user-form/component.js +++ b/app/pods/users/new/controller.js @@ -1,7 +1,6 @@ import Ember from 'ember'; -export default Ember.Component.extend({ - classNames: ['grid-1'], +export default Ember.Controller.extend({ passwordConfirm: null, actions: { @@ -17,7 +16,10 @@ export default Ember.Component.extend({ if (user.get('hasDirtyAttributes')) { user.save().then(() => { - this.sendAction(); + this.transitionTo('login').then(() => { + this.get('flashMessages').information(`You have successfully signed up. + Please check your email for further instructions.`); + }); }).catch(() => { // Manually clean up messages because there is no transition this.get('flashMessages').clearMessages(); diff --git a/app/pods/users/new/new-user-form/template.hbs b/app/pods/users/new/new-user-form/template.hbs deleted file mode 100644 index e1f70de..0000000 --- a/app/pods/users/new/new-user-form/template.hbs +++ /dev/null @@ -1,30 +0,0 @@ -
-
- New User Signup -
-
    -
  • - - {{input value=user.name}} -
  • -
  • - - {{input value=user.email}} -
  • -
  • - - {{input type="password" value=user.password}} -
  • -
  • - - {{input type="password" value=passwordConfirm}} -
  • -
  • - -
  • -
-
-
-
diff --git a/app/pods/users/new/route.js b/app/pods/users/new/route.js index 5557316..8d7010b 100644 --- a/app/pods/users/new/route.js +++ b/app/pods/users/new/route.js @@ -12,12 +12,4 @@ export default Ember.Route.extend(UnauthenticatedRouteMixin, { controller.setProperties(model); }, - actions: { - success: function() { - this.transitionTo('login').then(() => { - this.get('flashMessages').information(`You have successfully signed up. - Please check your email for further instructions.`); - }); - } - }, }); diff --git a/app/pods/users/new/template.hbs b/app/pods/users/new/template.hbs index 075ede5..d6e81c5 100644 --- a/app/pods/users/new/template.hbs +++ b/app/pods/users/new/template.hbs @@ -1 +1,32 @@ -{{users/new/new-user-form user=user action="success"}} +
+
+
+ New User Signup +
+
    +
  • + + {{input value=user.name}} +
  • +
  • + + {{input value=user.email}} +
  • +
  • + + {{input type="password" value=user.password}} +
  • +
  • + + {{input type="password" value=passwordConfirm}} +
  • +
  • + +
  • +
+
+
+
+