diff --git a/public/modules/forms/views/view-form-submissions.view.html b/public/modules/forms/views/view-form-submissions.view.html index 7f8fb04c..293aaa59 100644 --- a/public/modules/forms/views/view-form-submissions.view.html +++ b/public/modules/forms/views/view-form-submissions.view.html @@ -1,31 +1,38 @@ -
- -
- - - - - - - - View Public Form - - - View Form Submissions - -
+
- + +
+ - - - Created on - - by - - - -
\ No newline at end of file diff --git a/public/modules/users/controllers/password.client.controller.js b/public/modules/users/controllers/password.client.controller.js index 70a05867..c3aa1e41 100755 --- a/public/modules/users/controllers/password.client.controller.js +++ b/public/modules/users/controllers/password.client.controller.js @@ -3,50 +3,53 @@ angular.module('users').controller('PasswordController', ['$scope', '$stateParams', '$state', 'Principal', function($scope, $stateParams, $state, Principal) { $scope.authentication = Principal; - $scope.authentication.user = Principal.user(); //If user is signed in then redirect back home - if ($scope.authentication.user) $state.go('home'); + if ($scope.authentication.isAuthenticated()) $state.go('home'); - // Submit forgotten password account id - $scope.askForPasswordReset = function() { - Principal.askForPasswordReset($scope.credentials).then( - function(response){ - $scope.success = response.message - $scope.credentials = null; - }, - function(error){ - $scope.error = error; - $scope.credentials = null; - } - ); - }; + Principal.identity().then(function(response){ + $scope.authentication.user = response; - // Change user password - $scope.resetUserPassword = function() { - Principal.askForPasswordReset($scope.credentials).then( - function(response){ - $scope.credentials = null; - }, - function(error){ - $scope.error = error; - $scope.credentials = null; - } - ); - // $scope.success = $scope.error = null; + // Submit forgotten password account id + $scope.askForPasswordReset = function() { + Principal.askForPasswordReset($scope.credentials).then( + function(response){ + $scope.success = response.message + $scope.credentials = null; + }, + function(error){ + $scope.error = error; + $scope.credentials = null; + } + ); + }; - // $http.post('/auth/reset/' + $stateParams.token, $scope.passwordDetails).success(function(response) { - // // If successful show success message and clear form - // $scope.passwordDetails = null; + // Change user password + $scope.resetUserPassword = function() { + Principal.askForPasswordReset($scope.credentials).then( + function(response){ + $scope.credentials = null; + }, + function(error){ + $scope.error = error; + $scope.credentials = null; + } + ); + // $scope.success = $scope.error = null; - // // Attach user profile - // // Principal.user() = response; + // $http.post('/auth/reset/' + $stateParams.token, $scope.passwordDetails).success(function(response) { + // // If successful show success message and clear form + // $scope.passwordDetails = null; - // // And redirect to the index page - // $state.go('reset-success'); - // }).error(function(response) { - // $scope.error = response.message; - // }); - }; + // // Attach user profile + // // Principal.user() = response; + + // // And redirect to the index page + // $state.go('reset-success'); + // }).error(function(response) { + // $scope.error = response.message; + // }); + }; + }); } ]); \ No newline at end of file