diff --git a/app/generator.js b/app/generator.js
index 43913c852..f8721854b 100644
--- a/app/generator.js
+++ b/app/generator.js
@@ -374,6 +374,7 @@ export default class Generator extends Base {
if(this.filters.socketio) angModules.push("'btford.socket-io'");
if(this.filters.uirouter) angModules.push("'ui.router'");
if(this.filters.uibootstrap) angModules.push("'ui.bootstrap'");
+ if(this.filters.auth) angModules.push("'validation.match'");
this.angularModules = '\n ' + angModules.join(',\n ') +'\n';
}
diff --git a/app/templates/_bower.json b/app/templates/_bower.json
index 85e8835ed..71d2f97a3 100644
--- a/app/templates/_bower.json
+++ b/app/templates/_bower.json
@@ -4,18 +4,19 @@
"dependencies": {
"angular": "~1.4.0",
"json3": "~3.3.1",
- "es5-shim": "~3.0.1",<% if(filters.bootstrap) { %><% if (filters.sass) { %>
+ "es5-shim": "~3.0.1",<% if(filters.bootstrap) { if (filters.sass) { %>
"bootstrap-sass-official": "~3.1.1",<% } %>
"bootstrap": "~3.1.1",<% } %>
"angular-resource": "~1.4.0",
"angular-cookies": "~1.4.0",
"angular-sanitize": "~1.4.0",<% if (filters.ngroute) { %>
- "angular-route": "~1.4.0",<% } %><% if (filters.uibootstrap) { %>
+ "angular-route": "~1.4.0",<% } if (filters.uibootstrap) { %>
"angular-bootstrap": "~0.13.0",<% } %>
"font-awesome": ">=4.1.0",
"lodash": "~2.4.1"<% if(filters.socketio) { %>,
- "angular-socket-io": "~0.7.0"<% } %><% if(filters.uirouter) { %>,
- "angular-ui-router": "~0.2.15"<% } %>
+ "angular-socket-io": "~0.7.0"<% } if (filters.uirouter) { %>,
+ "angular-ui-router": "~0.2.15"<% } if (filters.auth) { %>,
+ "angular-validation-match": "~1.5.2"<% } %>
},
"devDependencies": {
"angular-mocks": "~1.4.0"
diff --git a/app/templates/client/app/account(auth)/settings/settings(html).html b/app/templates/client/app/account(auth)/settings/settings(html).html
index ec4e2d820..92ee40aa4 100644
--- a/app/templates/client/app/account(auth)/settings/settings(html).html
+++ b/app/templates/client/app/account(auth)/settings/settings(html).html
@@ -30,6 +30,20 @@
Change Password
+
+
{{ message }}
diff --git a/app/templates/client/app/account(auth)/settings/settings(jade).jade b/app/templates/client/app/account(auth)/settings/settings(jade).jade
index 96340b522..701215380 100644
--- a/app/templates/client/app/account(auth)/settings/settings(jade).jade
+++ b/app/templates/client/app/account(auth)/settings/settings(jade).jade
@@ -7,14 +7,29 @@ navbar
form.form(name='form', ng-submit='changePassword(form)', novalidate='')
.form-group
label Current Password
- input.form-control(type='password', name='password', ng-model='user.oldPassword', mongoose-error='')
+ input.form-control(type='password'
+ name='password'
+ ng-model='user.oldPassword'
+ mongoose-error='')
p.help-block(ng-show='form.password.$error.mongoose')
| {{ errors.other }}
.form-group
label New Password
- input.form-control(type='password', name='newPassword', ng-model='user.newPassword', ng-minlength='3', required='')
+ input.form-control(type='password'
+ name='newPassword'
+ ng-model='user.newPassword'
+ ng-minlength='3', required='')
p.help-block(ng-show='(form.newPassword.$error.minlength || form.newPassword.$error.required) && (form.newPassword.$dirty || submitted)')
| Password must be at least 3 characters.
+ .form-group
+ label Confirm New Password
+ input.form-control(type='password'
+ name='confirmPassword'
+ ng-model='user.confirmPassword'
+ match="user.newPassword"
+ ng-minlength='3', required='')
+ p.help-block(ng-show='form.confirmPassword.$error.match && submitted')
+ | Passwords must match.
p.help-block {{ message }}
diff --git a/app/templates/client/app/account(auth)/signup/signup(html).html b/app/templates/client/app/account(auth)/signup/signup(html).html
index 5052a02ee..0a95a7546 100644
--- a/app/templates/client/app/account(auth)/signup/signup(html).html
+++ b/app/templates/client/app/account(auth)/signup/signup(html).html
@@ -54,6 +54,18 @@ Sign up
+
+