13144 - fix double click bug when validating bankwire and cheque payment (causes 2 orders to be created)
This commit is contained in:
parent
b3e4001f3b
commit
e33755356c
@ -17,7 +17,7 @@
|
||||
{l s='Your shopping cart is empty.' mod='bankwire'}
|
||||
</p>
|
||||
{else}
|
||||
<form action="{$link->getModuleLink('bankwire', 'validation', [], true)|escape:'html':'UTF-8'}" method="post">
|
||||
<form action="{$link->getModuleLink('bankwire', 'validation', [], true)|escape:'html':'UTF-8'}" method="post" id='payment_validation'>
|
||||
<div class="box cheque-box">
|
||||
<div class="shadow"></div>
|
||||
<div class="inner">
|
||||
@ -78,4 +78,19 @@
|
||||
</div>
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
</main>
|
||||
|
||||
{literal}
|
||||
<script language='javascript'>
|
||||
$(document).ready(function()
|
||||
{
|
||||
// Prevent for double submission (eg. when double-clicking...)
|
||||
$('#payment_validation').submit(function(e){
|
||||
if (this.is_submitted) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.is_submitted = true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
@ -18,7 +18,7 @@
|
||||
<div class="shadow"></div>
|
||||
<div class="inner">
|
||||
<h2 class="title">{l s='Check payment' mod='cheque'}</h2>
|
||||
<form action="{$link->getModuleLink('cheque', 'validation', [], true)|escape:'html'}" method="post">
|
||||
<form action="{$link->getModuleLink('cheque', 'validation', [], true)|escape:'html'}" method="post" id="payment_validation">
|
||||
<p>
|
||||
<strong>{l s='You have chosen to pay by check.' mod='cheque'}</strong>
|
||||
{l s='Here is a short summary of your order:' mod='cheque'}
|
||||
@ -71,3 +71,18 @@
|
||||
</div>
|
||||
</section>
|
||||
</main>
|
||||
|
||||
{literal}
|
||||
<script language='javascript'>
|
||||
$(document).ready(function()
|
||||
{
|
||||
// Prevent for double submission (eg. when double-clicking...)
|
||||
$('#payment_validation').submit(function(e){
|
||||
if (this.is_submitted) {
|
||||
e.preventDefault();
|
||||
}
|
||||
this.is_submitted = true;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{/literal}
|
Loading…
Reference in New Issue
Block a user