optmized the code changes
This commit is contained in:
@@ -20,7 +20,11 @@
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function disableSubmitButton(button) {
|
||||
$(button).attr('disabled', 'disabled');
|
||||
$(button).closest('form').get(0).submit();
|
||||
}
|
||||
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '.confirm_order', function(e){
|
||||
e.preventDefault();
|
||||
$(e.target).attr('disabled', 'disabled');
|
||||
$(e.target).closest('form').get(0).submit();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</a>
|
||||
{*By webkul To Check Order restrict condition before Payment by the customer*}
|
||||
{if !$restrict_order}
|
||||
<button class="btn pull-right button button-medium" type="submit" onClick="disableSubmitButton(this)">
|
||||
<button class="btn pull-right button button-medium confirm_order" type="submit">
|
||||
<span>{l s='I confirm my order' mod='bankwire'} <i class="icon-chevron-right right"></i></span>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
@@ -20,7 +20,10 @@
|
||||
* @license https://opensource.org/license/osl-3-0-php Open Software License version 3.0
|
||||
*/
|
||||
|
||||
function disableSubmitButton(button) {
|
||||
$(button).attr('disabled', 'disabled');
|
||||
$(button).closest('form').get(0).submit();
|
||||
}
|
||||
$(document).ready(function () {
|
||||
$(document).on('click', '.confirm_order', function(e){
|
||||
e.preventDefault();
|
||||
$(e.target).attr('disabled', 'disabled');
|
||||
$(e.target).closest('form').get(0).submit();
|
||||
});
|
||||
});
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</a>
|
||||
{*By webkul To Check Order restrict condition before Payment by the customer*}
|
||||
{if !$restrict_order}
|
||||
<button class="btn pull-right button button-medium" type="submit" onClick="disableSubmitButton(this)">
|
||||
<button class="btn pull-right button button-medium confirm_order" type="submit">
|
||||
<span>{l s='I confirm my order' mod='cheque'} <i class="icon-chevron-right right"></i></span>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
@@ -90,7 +90,7 @@
|
||||
</a>
|
||||
{*By webkul To Check Order restrict condition before Payment by the customer*}
|
||||
{if !$restrict_order}
|
||||
<button class="btn pull-right button button-medium" type="submit" onClick="disableSubmitButton(this)">
|
||||
<button class="btn pull-right button button-medium confirm_order" type="submit">
|
||||
<span>{l s='I confirm my order' mod='bankwire'} <i class="icon-chevron-right right"></i></span>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
@@ -82,7 +82,7 @@
|
||||
</a>
|
||||
{*By webkul To Check Order restrict condition before Payment by the customer*}
|
||||
{if !$restrict_order}
|
||||
<button class="btn pull-right button button-medium" type="submit" onClick="disableSubmitButton(this)">
|
||||
<button class="btn pull-right button button-medium confirm_order" type="submit">
|
||||
<span>{l s='I confirm my order' mod='cheque'} <i class="icon-chevron-right right"></i></span>
|
||||
</button>
|
||||
{/if}
|
||||
|
||||
Reference in New Issue
Block a user