Skip to content

Commit

Permalink
GDB-8709 Add watcher on $scope.userType. Remove click event from div tag
Browse files Browse the repository at this point in the history
  • Loading branch information
Emskiqq authored and svilenvelikov committed Sep 14, 2023
1 parent bf04a5e commit ffe9574
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions src/js/angular/security/controllers.js
Original file line number Diff line number Diff line change
Expand Up @@ -377,11 +377,11 @@ securityCtrl.controller('CommonUserCtrl', ['$rootScope', '$scope', '$http', 'toa
setGrantedAuthorities($scope);
};

$scope.resetCustomRoleField = function () {
$scope.$watch('userType', function () {
if (!$scope.isUser()) {
$scope.customRoles = "";
}
};
});

$scope.isUser = function () {
return $scope.userType === UserType.USER;
Expand Down
2 changes: 1 addition & 1 deletion src/js/angular/security/templates/user.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ <h3>{{'security.workbench.settings.title' | translate}}

<div class="col-md-6 us-right-col" ng-hide="!isLocalAuthentication()">
<div class="card user-role" id="user-roles">
<div class="card-block" ng-click="resetCustomRoleField()">
<div class="card-block">
<h3>{{'security.user.role' | translate}}</h3>
<label class="mr-1"
uib-popover-template="'popover-content-user.html'"
Expand Down

0 comments on commit ffe9574

Please sign in to comment.