From 5b25d8db5bee9bbae94e08a9bb6f691062a8fb39 Mon Sep 17 00:00:00 2001 From: yackob03 Date: Thu, 10 Oct 2013 14:02:28 -0400 Subject: [PATCH] Reset the form back to a pristine state on a successful password change. --- static/js/controllers.js | 5 +++++ static/partials/user-admin.html | 2 +- 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/static/js/controllers.js b/static/js/controllers.js index 100805a5c..d9870ae52 100644 --- a/static/js/controllers.js +++ b/static/js/controllers.js @@ -563,6 +563,11 @@ function UserAdminCtrl($scope, $timeout, Restangular, PlanService, UserService, $scope.updatingUser = false; $scope.changePasswordSuccess = true; + // Reset the form + $scope.user.password = ''; + $scope.user.repeatPassword = ''; + $scope.changePasswordForm.$setPristine(); + UserService.load(); }, function(result) { $scope.updatingUser = false; diff --git a/static/partials/user-admin.html b/static/partials/user-admin.html index 39201569d..16df0fe00 100644 --- a/static/partials/user-admin.html +++ b/static/partials/user-admin.html @@ -69,7 +69,7 @@
- + Password changed successfully