remove type search field from single-type credential lookup modals, resolves #2976 (#2985)

This commit is contained in:
Leigh Johnson 2016-07-13 16:36:21 -04:00 committed by GitHub
parent 5c32b17aea
commit c60b8986de
6 changed files with 22 additions and 0 deletions

View File

@ -391,6 +391,9 @@ export function ProjectsAdd(Refresh, $scope, $rootScope, $compile, $location, $l
defaultUrl = GetBasePath('projects'),
master = {};
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
generator.inject(form, { mode: 'add', related: false, scope: $scope });
generator.reset();
@ -567,6 +570,10 @@ export function ProjectsEdit($scope, $rootScope, $compile, $location, $log,
id = $stateParams.id,
relatedSets = {};
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
SchedulesList.well = false;
generator.inject(form, {
mode: 'edit',

View File

@ -163,6 +163,8 @@ angular.module('JobTemplatesHelper', ['Utilities'])
});
CredentialList.basePath = GetBasePath('credentials') + '?kind=ssh';
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
LookUpInit({
url: GetBasePath('credentials') + '?kind=ssh',

View File

@ -12,6 +12,9 @@
var generator = GenerateForm,
form = GroupForm();
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
$scope.formCancel = function(){
$state.go('^');
};

View File

@ -13,6 +13,10 @@
GroupManageService, GetChoices, GetBasePath, CreateSelect2, GetSourceTypeOptions, groupData, inventorySourceData){
var generator = GenerateForm,
form = GroupForm();
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
$scope.formCancel = function(){
$state.go('^');
};

View File

@ -34,6 +34,9 @@
base = $location.path().replace(/^\//, '').split('/')[0],
context = (base === 'job_templates') ? 'job_template' : 'inv';
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
CallbackHelpInit({ scope: $scope });
$scope.can_edit = true;
generator.inject(form, { mode: 'add', related: false, scope: $scope });
@ -82,6 +85,7 @@
NetworkCredentialList.iterator = 'networkcredential';
NetworkCredentialList.basePath = '/api/v1/credentials?kind=net';
SurveyControllerInit({
scope: $scope,
parent_scope: $scope

View File

@ -46,6 +46,8 @@ export default
checkSCMStatus, getPlaybooks, callback,
choicesCount = 0;
// remove "type" field from search options
CredentialList.fields.kind.noSearch = true;
CallbackHelpInit({ scope: $scope });