mirror of
https://github.com/ansible/awx.git
synced 2026-05-12 03:47:36 -02: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:
@@ -790,6 +790,11 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
ParseTypeChange({ scope: properties_scope, field_id: textareaID, onReady: waitStop });
|
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
|
// Set modal dimensions based on viewport width
|
||||||
ww = $(document).width();
|
ww = $(document).width();
|
||||||
wh = $('body').height();
|
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_regions) {
|
||||||
if (data.source === 'ec2' ||
|
if (data.source === 'ec2' ||
|
||||||
@@ -1470,8 +1475,7 @@ angular.module('GroupsHelper', [ 'RestServices', 'Utilities', listGenerator.name
|
|||||||
if (sources_scope.credential_name_api_error) {
|
if (sources_scope.credential_name_api_error) {
|
||||||
delete 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;
|
initSourceChange();
|
||||||
SourceChange({ scope: sources_scope, form: SourceForm });
|
|
||||||
};
|
};
|
||||||
|
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user