Improve checkout UX (#6248)

This commit is contained in:
Charles-Henri Decultot 2018-10-15 05:57:08 +02:00 committed by Rushabh Mehta
parent c0ebdec392
commit 278dfe44f5
2 changed files with 9 additions and 1 deletions

View file

@ -42,6 +42,14 @@ $(document).ready(function() {
})
});
});
instance.on('paymentMethodRequestable', function (event) {
button.removeAttribute('disabled');
});
instance.on('noPaymentMethodRequestable', function () {
button.setAttribute('disabled', true);
});
});
})

View file

@ -26,7 +26,7 @@
</div>
</section>
<button class="btn btn-primary" type="submit" id="submit-button"><span>{{ _("Pay") }} {{ amount }} {{ currency }}</span></button>
<button class="btn btn-primary" type="submit" id="submit-button" disabled><span>{{ _("Pay") }} {{ amount }} {{ currency }}</span></button>
</form>
</div>