Skip to content

Commit

Permalink
#700 fix javascript fail during build
Browse files Browse the repository at this point in the history
  • Loading branch information
schoicsiro committed Sep 20, 2023
1 parent 3332259 commit 555d64b
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -80,12 +80,12 @@ profileEditor.controller('UserAccessController', function (messageService, util,
});
};

self.privateModeChanged = function(form) {
self.privateModeChanged = function() {
if (self.opus.privateCollection) {
self.roles.push(userRole);
} else {
var hasRole_USER = self.users.find(it=>it.role === 'ROLE_USER')
if (form.$dirty && hasRole_USER) {
if (hasRole_USER) {
self.users = self.users.filter(it => it.role !== 'ROLE_USER')
var data = {privateCollection: self.opus.privateCollection, authorities: self.users};
var promise = profileService.updateUsers(self.opusId, data);
Expand Down
2 changes: 1 addition & 1 deletion grails-app/views/opus/_editAccessControl.gsp
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<div class="checkbox padding-bottom-1">
<label for="privateCollection" class="inline-label">
<input id="privateCollection" type="checkbox" name="privateCollection"
ng-change="userCtrl.privateModeChanged(UserForm)"
ng-change="userCtrl.privateModeChanged()"
ng-model="userCtrl.opus.privateCollection" ng-false-value="false">
Make this collection private
</label>
Expand Down

0 comments on commit 555d64b

Please sign in to comment.