mirror of
https://github.com/ansible/awx.git
synced 2024-10-31 23:51:09 +03:00
Merge pull request #150 from marshmalien/fix/6479-DuplicateDefaultSCMInvChoice
Remove duplicate "Choose a [sic] inventory file" dropdown option
This commit is contained in:
commit
2f07c0a2e5
@ -109,6 +109,7 @@ return {
|
||||
inventory_file: {
|
||||
label: i18n._('Inventory File'),
|
||||
type:'select',
|
||||
defaultText: 'Choose an inventory file',
|
||||
ngOptions: 'file for file in inventory_files track by file',
|
||||
ngShow: "source && source.value === 'scm'",
|
||||
ngDisabled: "!(inventory_source_obj.summary_fields.user_capabilities.edit || canAdd) || disableInventoryFileBecausePermissionDenied",
|
||||
|
@ -659,6 +659,9 @@ angular.module('Utilities', ['RestServices', 'Utilities'])
|
||||
$(element).on('select2:select', (e) => {
|
||||
scope[model] = e.params.data.text;
|
||||
scope[selectOptions] = _.cloneDeep(original_options);
|
||||
if (e.params.data.id === "") {
|
||||
return;
|
||||
}
|
||||
if (scope[selectOptions].indexOf(e.params.data.text) === -1) {
|
||||
scope[selectOptions].push(e.params.data.text);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user