We will be off from 27/1 (Monday) to 31/1 (Friday) (GMT +7) for our Tet Holiday (Lunar New Year) in our country

Commit c08778dd authored by Rik ter Beek's avatar Rik ter Beek Committed by GitHub

Merge pull request #249 from ho-nl-fork/fix-racecondition

Place Order function race condition fix
parents cfb02277 bbd8e11f
......@@ -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