From 5b7734ba305e3c95174de7a9fd2d53cd6a9b1252 Mon Sep 17 00:00:00 2001 From: Olivier Lamy Date: Wed, 14 Nov 2012 20:04:26 +0000 Subject: [PATCH] in case of issue when reseting password error message must be displayed in the modal box git-svn-id: https://svn.apache.org/repos/asf/archiva/trunk@1409348 13f79535-47bb-0310-9956-ffa450edef68 --- .../src/main/webapp/js/archiva/startup.js | 1 - .../archiva-webapp-js/src/main/webapp/js/redback/user.js | 9 ++++++++- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js index d158b0573..4533eeedd 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/archiva/startup.js @@ -35,7 +35,6 @@ function(jquery,sammy,utils) { removeMediumSpinnerImg("#main-content"); clearUserMessages(); displayErrorMessage($.i18n.prop('authz.karma.needed')); - userLogged(function(user){ userLoggedCallbackFn(user); }); diff --git a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js index 8f386401f..e6bfee56d 100644 --- a/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js +++ b/archiva-modules/archiva-web/archiva-webapp-js/src/main/webapp/js/redback/user.js @@ -495,7 +495,14 @@ function(jquery,utils,i18n,jqueryValidate,ko,koSimpleGrid,purl) { newLocation+="#search"; } window.location=newLocation; - } + }, + statusCode: { + 500: function(data){ + clearUserMessages(); + displayRestError($.parseJSON(data.responseText),"modal-password-change-err-message"); + $("#modal-password-change-err-message" ).show(); + } + } }); } -- 2.39.5