mirror of
https://github.com/ansible/awx.git
synced 2026-01-13 02:50:02 -03:30
Merge pull request #4003 from keithjgrant/3574-survey-tab-required-fields
Don't allow Enter to proceed to next step if survey fields invalid Reviewed-by: https://github.com/softwarefactory-project-zuul[bot]
This commit is contained in:
commit
31d4e8362e
@ -229,6 +229,12 @@ export default [ 'ProcessErrors', 'CredentialTypeModel', 'TemplatesStrings', '$f
|
||||
};
|
||||
|
||||
vm.keypress = (event) => {
|
||||
if (vm.steps.survey.tab._active && !vm.readOnlyPrompts && !vm.forms.survey.$valid) {
|
||||
return;
|
||||
}
|
||||
if (document.activeElement.type === 'textarea') {
|
||||
return;
|
||||
}
|
||||
if (event.key === 'Enter') {
|
||||
vm.next(activeTab);
|
||||
}
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user