Drupal: popravke napake ko se naročilo že obdeluje - backend error

This commit is contained in:
Robert 2020-10-29 13:35:13 +01:00
parent 0ccbbabee0
commit b3c4b1adb4

View File

@ -1192,7 +1192,20 @@ function oddajNarociloNaStreznik() {
val = JSON.parse(val);
if (val.error) {
return jQuery('.procesiram-narocilo').text(val.error);
jQuery('.procesiram-narocilo').text(val.error).css('color', 'red');
return setTimeout(function(){
jQuery('.pregled-narocila').show();
if(jQuery('[name="payment_method"]:checked').val() == 3){
jQuery('#oddaj-stripe').show();
} else {
jQuery('#oddaj-narocilo').show();
}
jQuery('.submit-btn.naprej').show();
jQuery('#nazaj-na-nakup-1ka').show();
jQuery('.procesiram-narocilo').hide();
jQuery('.procesiram-narocilo').text('Poteka obdelava').css('color', 'black');
}, 3000);
}
var cas = new Date();