From 4d759b3677def4f2d59e756833c18ce6b23e12f6 Mon Sep 17 00:00:00 2001 From: Randall Morey Date: Mon, 28 Sep 2020 10:04:50 -0400 Subject: [PATCH] chore: cancel should be disabled on save --- addons/rose/addon/components/rose/form/index.hbs | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/rose/addon/components/rose/form/index.hbs b/addons/rose/addon/components/rose/form/index.hbs index 045ad70c4..80b027371 100644 --- a/addons/rose/addon/components/rose/form/index.hbs +++ b/addons/rose/addon/components/rose/form/index.hbs @@ -9,6 +9,10 @@ {{!-- Only show the edit toggle button if the toggle is enabled in the first place AND the form is not already in editable mode. + + The cancel button's disabled state depends on the mode. In edit mode, + the cancel button is only disabled if the disabled argument is true, + otherwise it is disabled based on the computed property this.disabled. --}} {{yield (hash radioGroup=(component 'rose/form/radio/group' disabled=this.disabled) @@ -22,7 +26,7 @@ 'rose/form/actions' ) submitDisabled=this.disabled - cancelDisabled=(if @showEditToggle false this.disabled) + cancelDisabled=(if @showEditToggle @disabled this.disabled) cancel=this.handleCancel enableEdit=this.enableEdit )