mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 19:30:39 -03:30
update validation when input source is set
This commit is contained in:
parent
f0f4f487fb
commit
aa4575c92e
@ -128,7 +128,7 @@ function AddEditCredentialsController (
|
||||
let gceFileInputPreEditValues;
|
||||
|
||||
vm.form.inputs = {
|
||||
_get ({ getSubmitData }) {
|
||||
_get ({ getSubmitData, check }) {
|
||||
const apiConfig = ConfigService.get();
|
||||
|
||||
credentialType.mergeInputProperties();
|
||||
@ -152,6 +152,7 @@ function AddEditCredentialsController (
|
||||
}
|
||||
vm.isTestable = (isEditable && credentialType.get('kind') === 'external');
|
||||
vm.getSubmitData = getSubmitData;
|
||||
vm.checkForm = check;
|
||||
|
||||
return fields;
|
||||
},
|
||||
@ -345,7 +346,9 @@ function AddEditCredentialsController (
|
||||
// We've linked this field to a credential, so display value as a credential tag
|
||||
vm.form[field]._value = '';
|
||||
vm.form[field]._tagValue = credentialName;
|
||||
vm.form[field]._isValid = true;
|
||||
vm.form[field].asTag = true;
|
||||
vm.checkForm();
|
||||
};
|
||||
|
||||
vm.onInputSourceTabSelect = (name) => {
|
||||
|
||||
@ -51,6 +51,10 @@ function BaseInputController (strings) {
|
||||
let isValid = true;
|
||||
let message = '';
|
||||
|
||||
if (scope.state.asTag) {
|
||||
return (isValid, message);
|
||||
}
|
||||
|
||||
if (scope.state._value || scope.state._displayValue) {
|
||||
scope.state._touched = true;
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user