mirror of
https://github.com/ansible/awx.git
synced 2026-01-14 03:10:42 -03:30
use test callback from test form save hooks
Enter key and other form submits are handled generically from the built-in save hooks on the form controller. This adds implementations for those hooks on the plugin test forms to make sure the expected handlers are always called.
This commit is contained in:
parent
52276ebbab
commit
d1dc6007fd
@ -5,6 +5,10 @@ function ExternalTestModalController (strings) {
|
||||
|
||||
vm.strings = strings;
|
||||
vm.title = strings.get('externalTest.TITLE');
|
||||
|
||||
vm.$onInit = () => {
|
||||
vm.form.save = () => vm.onSubmit();
|
||||
};
|
||||
}
|
||||
|
||||
ExternalTestModalController.$inject = [
|
||||
|
||||
@ -6,7 +6,10 @@ function InputSourceLookupController (strings, wait) {
|
||||
vm.strings = strings;
|
||||
vm.title = strings.get('inputSources.TITLE');
|
||||
|
||||
vm.$onInit = () => wait('start');
|
||||
vm.$onInit = () => {
|
||||
wait('start');
|
||||
vm.form.save = () => vm.onTest();
|
||||
};
|
||||
|
||||
vm.onReady = () => {
|
||||
vm.isReady = true;
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user