From 4a9be5c9cb4ceb77c77d83b21483895bd7b37043 Mon Sep 17 00:00:00 2001 From: vedatakd Date: Fri, 24 Apr 2020 17:38:31 +0300 Subject: [PATCH] #1279 fixed contact info phone mask --- .../resources/js/editContactInformation.js | 14 ++++---------- 1 file changed, 4 insertions(+), 10 deletions(-) diff --git a/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js b/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js index a7ef1b429..8c4e95740 100644 --- a/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js +++ b/addons/default/visiosoft/advs-module/resources/js/editContactInformation.js @@ -1,4 +1,4 @@ -// phoneMask("input[name='gsm_phone'],input[name='office_phone'],input[name='land_phone']") +phoneMask("input[name='gsm_phone'],input[name='office_phone'],input[name='land_phone']") $('.formEditInfo').on('submit', function (e) { e.preventDefault(); var form = $(this); @@ -20,17 +20,11 @@ $('.editInformationUser').on('click', function () { crud({}, '/ajax/update-user-info', 'POST', function (callback) { if (callback.status == "success") { var profile = callback.data; - intlTelInput(document.querySelector("input[name='gsm_phone']"), { - setNumber: profile.gsm_phone - }) - intlTelInput(document.querySelector("input[name='office_phone']"), { - setNumber: profile.office_phone - }) - intlTelInput(document.querySelector("input[name='land_phone']"), { - setNumber: profile.land_phone - }) $('input[name="first_name"]').val(profile.first_name) $('input[name="last_name"]').val(profile.last_name) + intlTelInput(document.querySelector("input[name='gsm_phone']")).setNumber(profile.gsm_phone) + intlTelInput(document.querySelector("input[name='office_phone']")).setNumber(profile.office_phone) + intlTelInput(document.querySelector("input[name='land_phone']")).setNumber(profile.land_phone) } }) }) \ No newline at end of file