New user double check password + aesthetics

This commit is contained in:
Matthew Dillon 2015-06-25 10:12:03 -08:00
parent f95b6e4c5f
commit a5f98bbe23
4 changed files with 24 additions and 16 deletions

View file

@ -6,7 +6,14 @@ export default Ember.Component.extend({
actions: {
save: function() {
var user = this.get('user');
let user = this.get('user');
// All validation is server-side, except for password verification matching
if (user.get('password') !== this.get('passwordConfirm')) {
this.get('flashMessages').clearMessages();
this.get('flashMessages').error("Password fields don't match");
return;
}
if (user.get('isDirty')) {
user.save().then(() => {

View file

@ -13,11 +13,11 @@
</li>
<li>
<label>Password</label>
{{input value=user.password}}
{{input type="password" value=user.password}}
</li>
<li>
<label>Password (confirm)</label>
{{input value=passwordConfirm}}
{{input type="password" value=passwordConfirm}}
</li>
<li>
<a class="button-green smaller" {{action 'save'}}>