mirror of
https://github.com/ansible/awx.git
synced 2026-01-21 22:48:02 -03:30
Wrapped the SourceChange call in a function so that it can be called without clearing the credential. This fixes a bug where the credential was not showing up in the initial edit dialog even though the data was sent properly via the API.
This commit is contained in:
parent
bf31033701
commit
4740b21f66
@ -790,6 +790,11 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
ParseTypeChange({ scope: properties_scope, field_id: textareaID, onReady: waitStop });
|
||||
}
|
||||
|
||||
function initSourceChange() {
|
||||
parent_scope.showSchedulesTab = (mode === 'edit' && sources_scope.source && sources_scope.source.value!=="manual") ? true : false;
|
||||
SourceChange({ scope: sources_scope, form: SourceForm });
|
||||
}
|
||||
|
||||
// Set modal dimensions based on viewport width
|
||||
ww = $(document).width();
|
||||
wh = $('body').height();
|
||||
@ -1058,7 +1063,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
}
|
||||
}
|
||||
|
||||
sources_scope.sourceChange(); //set defaults that rely on source value
|
||||
initSourceChange();
|
||||
|
||||
if (data.source_regions) {
|
||||
if (data.source === 'ec2' ||
|
||||
@ -1470,8 +1475,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
||||
if (sources_scope.credential_name_api_error) {
|
||||
delete sources_scope.credential_name_api_error;
|
||||
}
|
||||
parent_scope.showSchedulesTab = (mode === 'edit' && sources_scope.source && sources_scope.source.value!=="manual") ? true : false;
|
||||
SourceChange({ scope: sources_scope, form: SourceForm });
|
||||
initSourceChange();
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user