From f580b9f7d8b32787bfe7a300ee59fdb66d39fa0d Mon Sep 17 00:00:00 2001 From: Akita Noek Date: Tue, 21 Jun 2016 11:39:01 -0400 Subject: [PATCH] Hide the team role column and team tab from the add permissions modal on the Teams page --- .../access/addPermissions/addPermissions.directive.js | 3 +++ .../access/addPermissions/addPermissions.partial.html | 9 +++++++-- awx/ui/client/src/app.js | 3 +++ awx/ui/client/src/forms/Teams.js | 9 +-------- 4 files changed, 14 insertions(+), 10 deletions(-) diff --git a/awx/ui/client/src/access/addPermissions/addPermissions.directive.js b/awx/ui/client/src/access/addPermissions/addPermissions.directive.js index a9d21dfff8..7e7ea5b30b 100644 --- a/awx/ui/client/src/access/addPermissions/addPermissions.directive.js +++ b/awx/ui/client/src/access/addPermissions/addPermissions.directive.js @@ -16,6 +16,8 @@ export default controller: addPermissionsController, templateUrl: templateUrl('access/addPermissions/addPermissions'), link: function(scope, element, attrs, ctrl) { + console.info(attrs); + scope.withoutTeamPermissions = attrs.withoutTeamPermissions; scope.toggleFormTabs('users'); $("body").addClass("is-modalOpen"); @@ -24,6 +26,7 @@ export default Wait('start'); + scope.$broadcast("linkLists"); setTimeout(function() { diff --git a/awx/ui/client/src/access/addPermissions/addPermissions.partial.html b/awx/ui/client/src/access/addPermissions/addPermissions.partial.html index 85fd03d7f9..c2ca776768 100644 --- a/awx/ui/client/src/access/addPermissions/addPermissions.partial.html +++ b/awx/ui/client/src/access/addPermissions/addPermissions.partial.html @@ -23,10 +23,15 @@ 1 - Please select Users / Teams from the lists below. +
+ Please select Users / Teams from the lists below. +
+
+ Please select Users from the list below. +
-
+
diff --git a/awx/ui/client/src/app.js b/awx/ui/client/src/app.js index 1816888ce8..8300d7d09c 100644 --- a/awx/ui/client/src/app.js +++ b/awx/ui/client/src/app.js @@ -530,6 +530,9 @@ var tower = angular.module('Tower', [ $rootScope.addPermission = function (scope) { $compile("")(scope); }; + $rootScope.addPermissionWithoutTeamTab = function (scope) { + $compile("")(scope); + }; $rootScope.deletePermission = function (user, accessListEntry) { let entry = accessListEntry; diff --git a/awx/ui/client/src/forms/Teams.js b/awx/ui/client/src/forms/Teams.js index b8e9ba4f65..ad07a0ab2b 100644 --- a/awx/ui/client/src/forms/Teams.js +++ b/awx/ui/client/src/forms/Teams.js @@ -71,7 +71,7 @@ export default searchType: 'select', actions: { add: { - ngClick: "addPermission", + ngClick: "addPermissionWithoutTeamTab", label: 'Add', awToolTip: 'Add a permission', actionClass: 'btn List-buttonSubmit', @@ -92,13 +92,6 @@ export default noSort: true, class: 'col-lg-4 col-md-4 col-sm-4 col-xs-4', searchable: false - }, - team_roles: { - label: 'Team Roles', - type: 'team_roles', - noSort: true, - class: 'col-lg-5 col-md-5 col-sm-5 col-xs-4', - searchable: false } } },