We will work on Apr 26th (Saturday) and will be off from Apr 30th (Wednesday) until May 2nd (Friday) for public holiday in our country

Commit bbd8e11f authored by Nick de Kleijn's avatar Nick de Kleijn

[VM-233] +: isButtonActive function for databind +: set...

[VM-233] +: isButtonActive function for databind +: set isPlaceOrderActionAllowed on start place order event
parent cfb02277
......@@ -152,6 +152,15 @@ define(
isActive: function () {
return true;
},
/**
* Returns state of place order button
* @returns {boolean}
*/
isButtonActive: function() {
return this.isActive() && this.getCode() == this.isChecked() && this.isPlaceOrderActionAllowed();
},
/**
* @override
*/
......
......@@ -280,12 +280,9 @@
<div class="primary">
<button class="action primary checkout"
type="submit"
data-bind="
click: placeOrder,
data-bind="click: placeOrder,
attr: {title: $t('Place Order')},
enable: (getCode() == isChecked()),
css: {disabled: !isPlaceOrderActionAllowed()}
"
enable: isButtonActive()"
disabled>
<span data-bind="text: $t('Place Order')"></span>
</button>
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment