Skip to content

Commit

Permalink
Enable national mode on country code picker
Browse files Browse the repository at this point in the history
Signed-off-by: Sam Poyigi <6567634+sampoyigi@users.noreply.github.com>
  • Loading branch information
sampoyigi committed Sep 28, 2023
1 parent df44259 commit bcb8a2b
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions assets/src/js/app.js
Original file line number Diff line number Diff line change
Expand Up @@ -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++) {
Expand Down Expand Up @@ -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 = $('<input>').attr({
type: 'hidden',
id: 'hidden-input-'+$this.attr('id'),
id: 'hidden-input-' + $this.attr('id'),
name: $this.attr('name'),
value: $this.val(),
});
Expand Down

0 comments on commit bcb8a2b

Please sign in to comment.