first commit
This commit is contained in:
30
catalog/view/template/payment/hutko.twig
Normal file
30
catalog/view/template/payment/hutko.twig
Normal file
@@ -0,0 +1,30 @@
|
||||
<div class="d-inline-block pt-2 pd-2 w-100 text-end">
|
||||
<button type="button" id="button-confirm" class="btn btn-primary">{{ button_confirm }}</button>
|
||||
</div>
|
||||
<script type="text/javascript"><!--
|
||||
$('#button-confirm').on('click', function() {
|
||||
var element = this;
|
||||
$.ajax({
|
||||
url: 'index.php?route=extension/hutko/payment/hutko.confirm&language={{ language }}',
|
||||
type: 'get',
|
||||
dataType: 'json',
|
||||
beforeSend: function() {
|
||||
$(element).prop('disabled', true).addClass('loading');
|
||||
},
|
||||
complete: function() {
|
||||
$(element).prop('disabled', false).removeClass('loading');
|
||||
},
|
||||
success: function(json) {
|
||||
if (json['error']) {
|
||||
alert(json['error']);
|
||||
}
|
||||
if (json['redirect']) {
|
||||
location = json['redirect'];
|
||||
}
|
||||
},
|
||||
error: function(xhr, ajaxOptions, thrownError) {
|
||||
console.log(thrownError + "\r\n" + xhr.statusText + "\r\n" + xhr.responseText);
|
||||
}
|
||||
});
|
||||
});
|
||||
//--></script>
|
||||
Reference in New Issue
Block a user