mirror of
https://github.com/openclassify/openclassify.git
synced 2026-02-09 14:56:13 -06:00
add intlİnput
This commit is contained in:
parent
53ab93705f
commit
c2966c9116
@ -3,3 +3,18 @@
|
|||||||
// Go!
|
// Go!
|
||||||
|
|
||||||
})(window, document);
|
})(window, document);
|
||||||
|
|
||||||
|
|
||||||
|
var inputQuery = document.querySelector("input[name=\"phone\"]");
|
||||||
|
var iti = intlTelInput(inputQuery, {
|
||||||
|
hiddenInput: "full_phone",
|
||||||
|
class:"form-control",
|
||||||
|
initialCountry: "auto",
|
||||||
|
geoIpLookup: function (success, failure) {
|
||||||
|
$.get("https://ipinfo.io", function () {
|
||||||
|
}, "jsonp").always(function (resp) {
|
||||||
|
var countryCode = (resp && resp.country) ? resp.country : "";
|
||||||
|
success(countryCode);
|
||||||
|
});
|
||||||
|
}
|
||||||
|
});
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user