Skip to content

Commit

Permalink
Checkout Page Cancel button is not working #21327 - hide cancel butto…
Browse files Browse the repository at this point in the history
…n if billing address is not available on current quote
  • Loading branch information
Jitheesh authored and mage2pratik committed Mar 5, 2019
1 parent 0982a53 commit b169fe3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,12 @@ function (
this.isAddressDetailsVisible(true);
}
},
/**
* Manage cancel button visibility
*/
canUseCancelBillingAddress: ko.computed(function () {
return quote.billingAddress() || lastSelectedBillingAddress;
}),

/**
* Restore billing address
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<button class="action action-update" type="button" data-bind="click: updateAddress">
<span data-bind="i18n: 'Update'"></span>
</button>
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit">
<button class="action action-cancel" type="button" data-bind="click: cancelAddressEdit, visible: canUseCancelBillingAddress()">
<span data-bind="i18n: 'Cancel'"></span>
</button>
</div>
Expand Down

0 comments on commit b169fe3

Please sign in to comment.