03/03: print error for log
This is an automated email from the git hooks/post-receive script. unknown user pushed a commit to branch devel in repository Pollen. commit a2058b63c54b1d0e9873fa3e10564d71c92b2c8c Author: Adrien Garandel <a.garandel@dralagen.fr> Date: Wed May 21 12:42:46 2014 +0200 print error for log --- pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js | 5 ++++- pollen-ui-angular/src/main/webapp/partials/user-login.html | 6 ++++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js index cbd2446..6857fa7 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js @@ -41,7 +41,7 @@ $scope.data = {user:{}}; } $scope.currentUser = SessionStorage.get().user; - + $scope.login = function () { UserLogin.login({}, $scope.data.user, function (data) { User.get({userId: data.id}, function (user) { @@ -49,7 +49,10 @@ SessionStorage.save({'user':user}); }) SessionStorage.save({'token':data.permission}); + }, function (error) { + $scope.restError = {connexion : "Utilisateur ou Mot de passe faux"}; }); + delete $scope.data.user; } $scope.logout = function () { diff --git a/pollen-ui-angular/src/main/webapp/partials/user-login.html b/pollen-ui-angular/src/main/webapp/partials/user-login.html index e03817f..01c7d11 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-login.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-login.html @@ -1,9 +1,11 @@ <form id='loginForm' ng-submit="login()"> <div class="control-group"> - <label class="control-label">Utilisateur</label> + <label class="control-label"> + Utilisateur + <info-error error="restError.connexion" data="data.user"></info-error> + </label> <input type="text" name='login' ng-model="data.user.login" class="form-control"/> - <span class="help-block hide"></span> </div> <div class="control-group"> -- To stop receiving notification emails like this one, please contact Chorem.org SCM administrator <admin+scm@chorem.org>.
participants (1)
-
Chorem.org scm