Merge pull request #520 from openclassify/vedat

#1279 fixed contact info phone mask
This commit is contained in:
Ozcan Durak 2020-04-24 18:43:11 +03:00 committed by GitHub
commit c85a266f69
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

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