Skip to content

Commit

Permalink
Merge pull request #124 from paynl/feature/PLUG-337
Browse files Browse the repository at this point in the history
feature/PLUG-337
  • Loading branch information
woutse authored Mar 8, 2021
2 parents cb208f9 + be3d72a commit b0812cf
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
11 changes: 10 additions & 1 deletion view/frontend/web/js/view/payment/method-renderer/default.js
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -160,10 +160,19 @@ define(
if (event) {
event.preventDefault();
}
$('#payment-button').html('Processing').attr('disabled','disabled');

var objButton = $(event.target);
if (objButton.length > 0) {
var curText = objButton.text();
objButton.text($.mage.__('Processing')).prop('disabled', true);
}

this.isPlaceOrderActionAllowed(false);
placeOrder = placeOrderAction(this.getData(), this.redirectAfterPlaceOrder);
$.when(placeOrder).fail(function () {
if (objButton.length > 0) {
objButton.text(curText).prop('disabled', false);
}
this.isPlaceOrderActionAllowed(true);
}.bind(this)).done(this.afterPlaceOrder.bind(this));
return true;
Expand Down
11 changes: 5 additions & 6 deletions view/frontend/web/template/payment/default.html
Original file line number Diff line number Diff line change
Expand Up @@ -24,25 +24,24 @@
<div data-bind="visible: showBanks()" class="field-select-billing">
<select data-bind="options: getBanks(), optionsText: 'visibleName', optionsValue: 'id', value: selectedBank"></select>
</div>
<div data-bind="visible: showDOB()" class="field-select-billing">
<div data-bind="visible: showDOB()" class="field-select-billing">
<label for="dob">Geboortedatum</label>
<input type="date" data-bind="optionsValue: 'id', name: 'dateofbirth', value: dateofbirth" name="dateofbirth" placeholder="mm/dd/yyyy"/>
<input type="date" data-bind="optionsValue: 'id', name: 'dateofbirth', value: dateofbirth" name="dateofbirth" placeholder="mm/dd/yyyy"/>
</div>
<div data-bind="visible: showKVKDOB()" class="field-select-billing">
<br/>
</div>
<div data-bind="visible: showKVK()" class="field-select-billing">
<label for="kvknummer">KVK nummer</label>
<input data-bind="optionsValue: 'id', name: 'kvknummer', value: kvknummer" name="kvknummer"/>
<input data-bind="optionsValue: 'id', name: 'kvknummer', value: kvknummer" name="kvknummer"/>
<div style="padding-top:10px; padding-bottom:10px">
<input type="checkbox" data-bind="checked: billink_agree"/>
<label for="billink_agree">U dient akkoord te gaan met de</label> <a target="_blank" href="https://billink.nl/voorwaarden/gebruikersvoorwaarden.pdf">betalingsvoorwaarden</a>
</div>
</div>
<div class="actions-toolbar">
<div class="primary">
<button id="payment-button" class="action primary checkout"
type="submit"
<button class="action primary checkout" type="submit"
data-bind="
click: placeOrder,
attr: {title: $t('Place Order')},
Expand All @@ -55,4 +54,4 @@
</div>
</div>
</div>
</div>
</div>

0 comments on commit b0812cf

Please sign in to comment.