+
+
+
+
diff --git a/app/scripts/views/delete_account.js b/app/scripts/views/delete_account.js
index 9ab2ade8c..46e4e2af7 100644
--- a/app/scripts/views/delete_account.js
+++ b/app/scripts/views/delete_account.js
@@ -5,12 +5,14 @@
'use strict';
define([
+ 'underscore',
'views/base',
'stache!templates/delete_account',
'lib/session',
- 'lib/fxa-client'
+ 'lib/fxa-client',
+ 'lib/password-mixin'
],
-function (BaseView, Template, Session, FxaClient) {
+function (_, BaseView, Template, Session, FxaClient, PasswordMixin) {
var View = BaseView.extend({
// user must be authenticated to delete their account
mustAuth: true,
@@ -23,7 +25,8 @@ function (BaseView, Template, Session, FxaClient) {
'keyup #back': 'backOnEnter',
'submit form': 'deleteAccount',
'keyup input': 'enableButtonWhenValid',
- 'change input': 'enableButtonWhenValid'
+ 'change input': 'enableButtonWhenValid',
+ 'change .show-password': 'onPasswordVisibilityChange'
},
deleteAccount: function (event) {
@@ -62,6 +65,8 @@ function (BaseView, Template, Session, FxaClient) {
}
});
+ _.extend(View.prototype, PasswordMixin);
+
return View;
});
diff --git a/app/scripts/views/settings.js b/app/scripts/views/settings.js
index 67e3feb7d..21d0f6ae2 100644
--- a/app/scripts/views/settings.js
+++ b/app/scripts/views/settings.js
@@ -9,9 +9,10 @@ define([
'views/base',
'stache!templates/settings',
'lib/fxa-client',
- 'lib/session'
+ 'lib/session',
+ 'lib/password-mixin'
],
-function (_, BaseView, Template, FxaClient, Session) {
+function (_, BaseView, Template, FxaClient, Session, PasswordMixin) {
var View = BaseView.extend({
// user must be authenticated to see Settings
mustAuth: true,
@@ -29,7 +30,8 @@ function (_, BaseView, Template, FxaClient, Session) {
'submit form': 'changePassword',
'keyup input': 'enableButtonWhenValid',
'change input': 'enableButtonWhenValid',
- 'click #signout': 'signOut'
+ 'click #signout': 'signOut',
+ 'change .show-password': 'onPasswordVisibilityChange'
},
isValid: function () {
@@ -91,5 +93,7 @@ function (_, BaseView, Template, FxaClient, Session) {
}
});
+ _.extend(View.prototype, PasswordMixin);
+
return View;
});