intl_phone_picker 1.0.0 → 1.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +4 -0
- data/Gemfile.lock +1 -1
- data/app/assets/javascripts/intlTelInputCore.js +9 -9
- data/lib/intl_phone_picker/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4e330cfb849c2e7623e3e4fd1c4ce7db13c9ad68
|
4
|
+
data.tar.gz: 6f11164d398aa8e49783882c7c91955e29d761ab
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 24ed6d256f9e06f1281af72ff2249cd33aabcc43c0c5778579d3bef5e4fd7a929c8b26392e020c8659a7e353481fa6bea2daee64d7a0504a29603eb7525af785
|
7
|
+
data.tar.gz: 3696e023ae9f13f4a405f9db383a5cc00d8d6e9660291ac011f3aee20c1717e85f9a8f56323598b9af0a5c1a5174418213aec3457f8454bf985d05917071b5d8
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
@@ -31,10 +31,10 @@ function synchronizeVisibleHiddenFields(visibleInput, hiddenInput) {
|
|
31
31
|
})
|
32
32
|
|
33
33
|
visibleInput.closest('form').on('submit', function(event) {
|
34
|
-
updateHiddenPhoneField(
|
34
|
+
updateHiddenPhoneField(visibleInput, hiddenInput)
|
35
35
|
|
36
|
-
if (toggleValidation(
|
37
|
-
|
36
|
+
if (toggleValidation(visibleInput) == false)
|
37
|
+
event.preventDefault()
|
38
38
|
})
|
39
39
|
}
|
40
40
|
|
@@ -42,15 +42,15 @@ function updateHiddenPhoneField(visibleInput, hiddenInput) {
|
|
42
42
|
hiddenInput.val(visibleInput.intlTelInput("getNumber"))
|
43
43
|
}
|
44
44
|
|
45
|
-
function toggleValidation(
|
46
|
-
var isPhoneValid =
|
45
|
+
function toggleValidation(phoneInput) {
|
46
|
+
var isPhoneValid = phoneInput.intlTelInput('isValidNumber');
|
47
47
|
|
48
48
|
if (!isPhoneValid) {
|
49
|
-
|
50
|
-
|
49
|
+
phoneInput.closest('.form-group').addClass('has-danger')
|
50
|
+
phoneInput.addClass('form-control-danger')
|
51
51
|
} else {
|
52
|
-
|
53
|
-
|
52
|
+
phoneInput.closest('.form-group').removeClass('has-danger')
|
53
|
+
phoneInput.removeClass('form-control-danger')
|
54
54
|
}
|
55
55
|
|
56
56
|
return (isPhoneValid)
|