From 0a29ec9a862255aa9568c2a38afbd312f1f09498 Mon Sep 17 00:00:00 2001 From: Focuslinkstech <45756999+Focuslinkstech@users.noreply.github.com> Date: Fri, 11 Apr 2025 09:19:17 +0100 Subject: [PATCH] refactor: replace the javascript popup with sweetalert which prevent some devices to purchase data plans and packages via captive portal, clean up footer template and improve script formatting --- ui/ui/customer/footer.tpl | 295 ++++++++++++++++++++------------------ 1 file changed, 157 insertions(+), 138 deletions(-) diff --git a/ui/ui/customer/footer.tpl b/ui/ui/customer/footer.tpl index 8d70ccee..1cdc6685 100644 --- a/ui/ui/customer/footer.tpl +++ b/ui/ui/customer/footer.tpl @@ -1,25 +1,25 @@ {if isset($_c['CompanyFooter'])} - + {else} - + {/if} @@ -50,156 +50,175 @@ {if isset($xfooter)} - {$xfooter} +{$xfooter} {/if} {if $_c['tawkto'] != ''} - - - - {/if} + (function () { + var s1 = document.createElement("script"), + s0 = document.getElementsByTagName("script")[0]; + s1.async = true; + s1.src = 'https://embed.tawk.to/{$_c['tawkto']}'; + s1.charset = 'UTF-8'; + s1.setAttribute('crossorigin', '*'); + s0.parentNode.insertBefore(s1, s0); + })(); + + +{/if} - + }); + {literal} - + return null; + } + {/literal}