diff --git a/scripts/RequestResetController.js b/scripts/RequestResetController.js index de6c139..d4dae34 100644 --- a/scripts/RequestResetController.js +++ b/scripts/RequestResetController.js @@ -4,7 +4,7 @@ angular.module('flashy.RequestResetController', ['ui.router']) function($scope, $state, $http) { 'use strict'; $scope.success = false; - $scope.invalid = false; + $scope.error = false; $scope.resetPass = function(email) { $http.post('/api/request_password_reset', JSON.stringify({ 'email': email @@ -16,7 +16,7 @@ angular.module('flashy.RequestResetController', ['ui.router']) }) .error(function(data, status, header, config) { if (data.email) { - $scope.invalid = true; + $scope.error = true; } console.log(data); }); diff --git a/scripts/ResetPasswordController.js b/scripts/ResetPasswordController.js index 1a590fe..41fd9ac 100644 --- a/scripts/ResetPasswordController.js +++ b/scripts/ResetPasswordController.js @@ -3,10 +3,13 @@ angular.module('flashy.ResetPasswordController', ['ui.router']). controller('ResetPasswordController', ['$scope', '$state', '$http', function($scope, $state, $http) { 'use strict'; - var url = document.location.href.split("/"); + var url = document.location.href.split('/'); var token = url[url.length-1]; var uid = url[url.length-2]; $scope.error = false; + /*if(token == 'resetpassword') { + $state.go('login'); + }*/ $scope.confirmResetPass = function(newPassword) { $http.post('/api/reset_password', JSON.stringify({ 'uid': uid, diff --git a/templates/requestpasswordreset.html b/templates/requestpasswordreset.html index cfb5b6f..f1be011 100644 --- a/templates/requestpasswordreset.html +++ b/templates/requestpasswordreset.html @@ -1,26 +1,33 @@ -
-
-

Reset Password

+
+
+
+
+
+
+

Reset Password

-
- - - -
- -
-
-
- -
-
-
- -
-
-
- -
+ +
+
+
+
+ + Enter a valid email! +
+
+ + + +
+ +
+ + +
+ +
+
+
\ No newline at end of file diff --git a/templates/resetpassword.html b/templates/resetpassword.html index bc7ea71..81c2f1d 100644 --- a/templates/resetpassword.html +++ b/templates/resetpassword.html @@ -1,30 +1,34 @@
-
-

Reset Password

-
- -
-
- -
- - -
-
- - +
+
+
+ +
+

Reset Password

+
+ +
+
+
+
+ + Please check your reset password link! +
- -
+ + + + +
+ +
- + ng-click="cancelReset()">Cancel +
-
+ +
+
+
\ No newline at end of file