This is an automated email from the git hooks/post-receive script. New commit to branch develop in repository pollen. See http://git.chorem.org/pollen.git commit aef08a0d986c7623192536516572a0aab40f5b6b Author: Kevin Morin <morin@codelutin.com> Date: Fri Mar 13 15:18:07 2015 +0100 fixes #1201 Do not go back to the home page when login fails --- .../src/main/webapp/js/controllers/userCtrl.js | 24 +++++++++++++--------- .../src/main/webapp/partials/user-login.html | 4 ++-- 2 files changed, 16 insertions(+), 12 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 871dbc5..47b4b4e 100644 --- a/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js +++ b/pollen-ui-angular/src/main/webapp/js/controllers/userCtrl.js @@ -269,20 +269,24 @@ angular.module('userControllers', []) }; $scope.logout = function () { - UserLogout.logout(); + var currentUser = SessionStorage.get().user; + if (user) { - $rootScope.$broadcast('cleanAlert'); + UserLogout.logout(); - var locale = SessionStorage.get().locale; + $rootScope.$broadcast('cleanAlert'); - // all information - SessionStorage.remove(); - delete $scope.currentUser; + var locale = SessionStorage.get().locale; - // stock the locale - SessionStorage.save({locale : locale}); + // all information + SessionStorage.remove(); + delete $scope.currentUser; - //got to the home - $location.url('/'); + // stock the locale + SessionStorage.save({locale : locale}); + + //got to the home + $location.url('/'); + } } }]); 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 614295a..acc20d9 100644 --- a/pollen-ui-angular/src/main/webapp/partials/user-login.html +++ b/pollen-ui-angular/src/main/webapp/partials/user-login.html @@ -26,14 +26,14 @@ {{ 'user.mail' | translate }} <info-error error="restError.connexion" data="data.user" append-class="fa-lg"></info-error> </label> - <input type="text" name='login' ng-model="data.user.login" class="form-control"/> + <input id="login" type="text" name='login' ng-model="data.user.login" class="form-control"/> </div> <div class="control-group"> <label class="control-label" > {{ 'user.password' | translate }} </label> - <input type="password" name='password' ng-model="data.user.password" class="form-control"/> + <input id="password" type="password" name='password' ng-model="data.user.password" class="form-control"/> </div> <div class="control-group"> -- To stop receiving notification emails like this one, please contact chorem.org SCM administrator <admin+scm@chorem.org>.