1
0
mirror of https://github.com/ansible/awx.git synced 2024-11-02 09:51:09 +03:00

AC-625 while looking into issue surrounding non-running updates, discoverd that creating credentials from the Users and Teams tabs was not allowing the user to click Save. The Save button refused to become enabled. Turns out that when a user or team is preelected (using route params) form initialization routine needs to run and it was not.

This commit is contained in:
Chris Houseknecht 2013-11-13 03:58:12 +00:00
parent 640bc69402
commit 3f148e104e

View File

@ -115,7 +115,7 @@ CredentialsList.$inject = [ '$scope', '$rootScope', '$location', '$log', '$route
function CredentialsAdd ($scope, $rootScope, $compile, $location, $log, $routeParams, CredentialForm,
GenerateForm, Rest, Alert, ProcessErrors, LoadBreadCrumbs, ReturnToCaller, ClearScope,
GenerateList, SearchInit, PaginateInit, LookUpInit, UserList, TeamList, GetBasePath,
GetChoices, Empty, KindChange, OwnerChange, FormSave)
GetChoices, Empty, KindChange, OwnerChange, FormSave, DebugForm)
{
ClearScope('htmlTemplate'); //Garbage collection. Don't leave behind any listeners/watchers from the prior
//scope.
@ -158,6 +158,7 @@ function CredentialsAdd ($scope, $rootScope, $compile, $location, $log, $routePa
// Get the username based on incoming route
scope['owner'] = 'user';
scope['user'] = $routeParams.user_id;
OwnerChange({ scope: scope });
var url = GetBasePath('users') + $routeParams.user_id + '/';
Rest.setUrl(url);
Rest.get()
@ -173,6 +174,7 @@ function CredentialsAdd ($scope, $rootScope, $compile, $location, $log, $routePa
// Get the username based on incoming route
scope['owner'] = 'team';
scope['team'] = $routeParams.team_id;
OwnerChange({ scope: scope });
var url = GetBasePath('teams') + $routeParams.team_id + '/';
Rest.setUrl(url);
Rest.get()
@ -238,7 +240,7 @@ function CredentialsAdd ($scope, $rootScope, $compile, $location, $log, $routePa
CredentialsAdd.$inject = [ '$scope', '$rootScope', '$compile', '$location', '$log', '$routeParams', 'CredentialForm', 'GenerateForm',
'Rest', 'Alert', 'ProcessErrors', 'LoadBreadCrumbs', 'ReturnToCaller', 'ClearScope', 'GenerateList',
'SearchInit', 'PaginateInit', 'LookUpInit', 'UserList', 'TeamList', 'GetBasePath', 'GetChoices', 'Empty',
'KindChange', 'OwnerChange', 'FormSave'];
'KindChange', 'OwnerChange', 'FormSave', 'DebugForm'];
function CredentialsEdit ($scope, $rootScope, $compile, $location, $log, $routeParams, CredentialForm,