#1279 fixed contact info phone mask

This commit is contained in:
vedatakd 2020-04-24 17:38:31 +03:00
parent 925f7fbf98
commit 4a9be5c9cb

View File

@ -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)
}
})
})