diff --git a/grails-app/assets/javascripts/profileEditor/controllers/UserAccessController.js b/grails-app/assets/javascripts/profileEditor/controllers/UserAccessController.js index 2e9258c0..12da2827 100644 --- a/grails-app/assets/javascripts/profileEditor/controllers/UserAccessController.js +++ b/grails-app/assets/javascripts/profileEditor/controllers/UserAccessController.js @@ -80,7 +80,7 @@ profileEditor.controller('UserAccessController', function (messageService, util, }); }; - self.privateModeChanged = function() { + self.privateModeChanged = function(form) { if (self.opus.privateCollection) { self.roles.push(userRole); } else { @@ -90,6 +90,7 @@ profileEditor.controller('UserAccessController', function (messageService, util, var data = {privateCollection: self.opus.privateCollection, authorities: self.users}; var promise = profileService.updateUsers(self.opusId, data); promise.then(function () { + form.$setPristine(); messageService.success("User access has been successfully updated."); }, function () { messageService.alert("An error has occurred while updating user access."); @@ -142,7 +143,7 @@ profileEditor.controller('UserAccessController', function (messageService, util, popupateUserDetails(user); }); - self.privateModeChanged(); + self.privateModeChanged(form); if (form) { form.$setPristine(); diff --git a/grails-app/views/opus/_editAccessControl.gsp b/grails-app/views/opus/_editAccessControl.gsp index dce2fd9e..c3a50c83 100644 --- a/grails-app/views/opus/_editAccessControl.gsp +++ b/grails-app/views/opus/_editAccessControl.gsp @@ -21,7 +21,7 @@