Skip to content

Commit

Permalink
Merge pull request #2575 from SCADA-LTS/fix/#2569_Fixed_deleting_non_…
Browse files Browse the repository at this point in the history
…existent_user_profile

#2569 Fixed deleting non existent user profile
  • Loading branch information
Limraj authored Jun 19, 2023
2 parents 7ff86fa + e2c5581 commit 25f3a49
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions WebContent/WEB-INF/jsp/usersProfiles.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,10 @@
}
function showUserProfile(userProfileId) {
if (userProfileId == -1)
hide("deleteButton");
else
show("deleteButton");
if (editingUserProfileId)
stopImageFader($("u"+ editingUserProfileId +"Img"));
editingUserProfileId = userProfileId;
Expand All @@ -141,7 +145,7 @@
}
function showUserProfileCB(userProfile) {
show($("deleteButton"));
//show($("deleteButton"));
show($("userProfileDetails"));
$set("userProfileName", userProfile.name);
Expand Down Expand Up @@ -192,7 +196,6 @@
function saveUserProfile() {
startImageFader($("saveButton"));
setUserProfileMessage();
// Create the list of allowed data sources and data point permissions.
var i, j;
Expand Down Expand Up @@ -256,6 +259,7 @@
appendUserProfile(editingUserProfileId);
startImageFader($("u"+ editingUserProfileId +"Img"));
setUserProfileMessage("<fmt:message key="userProfiles.added"/>");
show($("deleteButton"));
} else {
setUserProfileMessage("<fmt:message key="userProfiles.saved"/>");
stopImageFader($("u"+ editingUserProfileId +"Img"));
Expand Down

0 comments on commit 25f3a49

Please sign in to comment.