From 49cf327ab72ac91c9adf99f8df9e909616f2d8df Mon Sep 17 00:00:00 2001 From: John Cowen Date: Fri, 19 Mar 2021 15:14:46 +0000 Subject: [PATCH] ui: Ensure intention form cancel button works (#9901) * ui: Ensure intention form cancel button works By adding `@action` decorators to the actions called form within the template --- .changelog/9901.txt | 3 +++ .../consul-ui/app/components/consul/intention/form/index.js | 5 +++++ 2 files changed, 8 insertions(+) create mode 100644 .changelog/9901.txt diff --git a/.changelog/9901.txt b/.changelog/9901.txt new file mode 100644 index 000000000..4e913d607 --- /dev/null +++ b/.changelog/9901.txt @@ -0,0 +1,3 @@ +```release-note:bug +ui: Fix intention form cancel button +``` diff --git a/ui/packages/consul-ui/app/components/consul/intention/form/index.js b/ui/packages/consul-ui/app/components/consul/intention/form/index.js index 1d5c448fd..4f7529009 100644 --- a/ui/packages/consul-ui/app/components/consul/intention/form/index.js +++ b/ui/packages/consul-ui/app/components/consul/intention/form/index.js @@ -23,6 +23,7 @@ export default class ConsulIntentionForm extends Component { this.updateCRDManagement(); } + @action ondelete() { if (this.args.ondelete) { this.args.ondelete(...arguments); @@ -31,6 +32,7 @@ export default class ConsulIntentionForm extends Component { } } + @action oncancel() { if (this.args.oncancel) { this.args.oncancel(...arguments); @@ -39,6 +41,7 @@ export default class ConsulIntentionForm extends Component { } } + @action onsubmit() { if (this.args.onsubmit) { this.args.onsubmit(...arguments); @@ -49,6 +52,7 @@ export default class ConsulIntentionForm extends Component { updateCRDManagement() { this.isManagedByCRDs = this.repo.isManagedByCRDs(); } + @action submit(item, submit, e) { e.preventDefault(); @@ -60,6 +64,7 @@ export default class ConsulIntentionForm extends Component { submit(); } } + @action createServices(item, e) { // Services in the menus should: