mirror of
https://github.com/openclassify/openclassify.git
synced 2026-01-24 22:11:01 -06:00
Merge pull request #579 from openclassify/dia
#1522 Register fixes (remove mask)
This commit is contained in:
commit
156abe47ed
@ -15,27 +15,27 @@ function phoneMask(fields) {
|
|||||||
})
|
})
|
||||||
});
|
});
|
||||||
|
|
||||||
var fields_arr = fields.split(',');
|
// var fields_arr = fields.split(',');
|
||||||
$.each(fields_arr, function (index, value) {
|
// $.each(fields_arr, function (index, value) {
|
||||||
maskPhone($(value).attr('name'))
|
// maskPhone($(value).attr('name'))
|
||||||
});
|
// });
|
||||||
|
|
||||||
|
|
||||||
$(fields).on('countrychange', function (e) {
|
// $(fields).on('countrychange', function (e) {
|
||||||
maskPhone($(this).attr('name'))
|
// maskPhone($(this).attr('name'))
|
||||||
});
|
// });
|
||||||
|
|
||||||
function maskPhone(name) {
|
// function maskPhone(name) {
|
||||||
if ( $("input[name='" + name + "']").length ) {
|
// if ( $("input[name='" + name + "']").length ) {
|
||||||
var currentMask = $("input[name='" + name + "']").attr('placeholder');
|
// var currentMask = $("input[name='" + name + "']").attr('placeholder');
|
||||||
if(currentMask) {
|
// if(currentMask) {
|
||||||
$("input[name='" + name + "']").mask(currentMask.replace(/[0-9+]/ig, '9'), {
|
// $("input[name='" + name + "']").mask(currentMask.replace(/[0-9+]/ig, '9'), {
|
||||||
autoclear: true,
|
// autoclear: true,
|
||||||
clearIncomplete: true
|
// clearIncomplete: true
|
||||||
});
|
// });
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
}
|
// }
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,4 +1,4 @@
|
|||||||
// phoneMask("input[name='phone'],input[name='land_phone']");
|
phoneMask("input[name='phone'],input[name='land_phone']");
|
||||||
|
|
||||||
// Phone register validation
|
// Phone register validation
|
||||||
//setup before functions
|
//setup before functions
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user