diff --git a/assets/js/checkout.js b/assets/js/checkout.js index 216209e..2bd84cb 100644 --- a/assets/js/checkout.js +++ b/assets/js/checkout.js @@ -59,20 +59,24 @@ function initialize() { } $(window).on('load', google.maps.event, initialize); let input = document.querySelector("#ctelefon"); -let iti = window.intlTelInput(input, { - initialCountry: "de", - preferredCountries: ["de"], - geoIpLookup: function(callback) { - $.get('https://ipinfo.io', function() {}, "jsonp").always(function(resp) { - let countryCode = (resp && resp.country)?resp.country:"us"; - callback(countryCode); - }); - }, - utilsScript: "{{storage('assets/libs/intl-tel-input/js/utils.min.js')}}", -}); +if(input != undefined){ + let iti = window.intlTelInput(input, { + initialCountry: "de", + preferredCountries: ["de"], + geoIpLookup: function(callback) { + $.get('https://ipinfo.io', function() {}, "jsonp").always(function(resp) { + let countryCode = (resp && resp.country)?resp.country:"us"; + callback(countryCode); + }); + }, + utilsScript: "{{storage('assets/libs/intl-tel-input/js/utils.min.js')}}", + }); +} + // iti.getNumber(); function updateProducts(){} $(window).on('load', function(){ + $("#successful-submitting-form").delay(4000).slideUp(200, function() { $(this).alert('close'); }); $('#anfrage').submit(function(){ objProducts = []; localStorage.setItem("products", JSON.stringify(objProducts)); diff --git a/assets/js/methods.js b/assets/js/methods.js index d22e113..52c2b36 100644 --- a/assets/js/methods.js +++ b/assets/js/methods.js @@ -99,6 +99,7 @@ function updateProductsInLocalStorage(){ $('#list-products-in-bag').parent().parent().parent().parent().parent().find('.modal-footer').show(); $('#total-price').parent().parent().parent().show(); $('#no-products').hide(); + $('#modal-buttons').hide(); if(typeof updateProducts === "function"){ $('#form-section').show(); $('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').show(); diff --git a/assets/js/script.js b/assets/js/script.js index 1ab97d5..84e16ca 100644 --- a/assets/js/script.js +++ b/assets/js/script.js @@ -29,6 +29,7 @@ $(window).on('load', function(){ $('#list-products-in-bag').parent().parent().parent().parent().parent().find('.modal-footer').show(); $('#total-price').parent().parent().parent().show(); $('#no-products').hide(); + $('#modal-buttons').hide(); if(typeof updateProducts === "function"){ $('#form-section').show(); $('#list-products').parent().parent().parent().parent().parent().find('.modal-footer').show(); diff --git a/content/master.blade.php b/content/master.blade.php index e123078..f62d79b 100644 --- a/content/master.blade.php +++ b/content/master.blade.php @@ -138,7 +138,7 @@ -
+