From bcb8a2b23a62ba53b263c2d89b9534d15e566866 Mon Sep 17 00:00:00 2001 From: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> Date: Thu, 28 Sep 2023 23:49:42 +0100 Subject: [PATCH] Enable national mode on country code picker Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com> --- assets/src/js/app.js | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/assets/src/js/app.js b/assets/src/js/app.js index b938d08..1145325 100644 --- a/assets/src/js/app.js +++ b/assets/src/js/app.js @@ -73,15 +73,15 @@ $(function () { if (days) { var date = new Date() - date.setTime(date.getTime()+(days * 24 * 60 * 60 * 1000)) - expires = '; expires='+date.toGMTString() + date.setTime(date.getTime() + (days * 24 * 60 * 60 * 1000)) + expires = '; expires=' + date.toGMTString() } - document.cookie = name+"="+value+expires+"; path=/" + document.cookie = name + "=" + value + expires + "; path=/" } function checkCookie(name) { - var nameEQ = name+"=", + var nameEQ = name + "=", ca = document.cookie.split(';') for (var i = 0; i < ca.length; i++) { @@ -125,11 +125,12 @@ $(function () { options = $.extend({ initialCountry: (app.country.iso_code_2 || '').toLowerCase(), separateDialCode: true, + nationalMode: true, utilsScript: "https://cdnjs.cloudflare.com/ajax/libs/intl-tel-input/11.0.4/js/utils.js" }, $this.data()), $telephoneInput = $('').attr({ type: 'hidden', - id: 'hidden-input-'+$this.attr('id'), + id: 'hidden-input-' + $this.attr('id'), name: $this.attr('name'), value: $this.val(), });