diff --git a/lnbits/extensions/events/templates/events/display.html b/lnbits/extensions/events/templates/events/display.html index 1f185f1be..4b1e871bc 100644 --- a/lnbits/extensions/events/templates/events/display.html +++ b/lnbits/extensions/events/templates/events/display.html @@ -565,7 +565,7 @@ function submitforticket(){ getAjax('/api/v1/invoice/' + thehash, "{{wave}}", function(datab) { console.log(JSON.parse(datab).PAID) if (JSON.parse(datab).PAID == 'TRUE') { - displayticket(thehash) + location.replace("{{ url_for('events.ticket') }}?hash="+thehash + "&unireg={{wave}}") clearInterval(refreshId) } })}, 3000); @@ -574,37 +574,6 @@ function submitforticket(){ }) } -function displayticket(thehash){ - - -postAjax( - "{{ url_for('events.api_updateticket') }}", - JSON.stringify({"unireg": "{{wave}}", "hash": thehash}), - "filla", - - function(data) { - thehash = JSON.parse(data).payment_hash - - document.getElementById('qrcode').innerHTML = "" - document.getElementById('qrcodetxt').innerHTML = "" - - new QRCode(document.getElementById('qrcode'), { - text: thehash, - width: 300, - height: 300, - colorDark: '#000000', - colorLight: '#ffffff', - correctLevel: QRCode.CorrectLevel.M - }) - document.getElementById('theform').innerHTML = "

*This QR code is your ticket, save it, and bring
it to the event registration.

" - document.getElementById("qrcode").style.backgroundColor = "white"; - document.getElementById("qrcode").style.padding = "20px"; - - -}) -} - -