phone field updated

This commit is contained in:
vedatakd 2020-02-04 11:35:32 +03:00
parent 2d428c8482
commit 1eb8d34dff
7 changed files with 29 additions and 26 deletions

View File

@ -916,13 +916,18 @@
.iti__flag {
height: 15px;
box-shadow: 0px 0px 1px 0px #888;
background-image: url('{{ img("theme::images/flags.png").url }}');
background-image: url('{{ img("visiosoft.theme.base::images/flags.png").url }}');
background-repeat: no-repeat;
background-color: #DBDBDB;
background-position: 20px 0; }
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
.iti__flag {
background-image: url('{{ img("theme::images/flags@2x.png").url }}'); } }
background-image: url('{{ img("visiosoft.theme.base::images/flags@2x.png").url }}'); } }
.iti__flag.iti__np {
background-color: transparent; }
background-color: transparent;
}
.iti--allow-dropdown {
width: 100%;
}

View File

@ -19,10 +19,6 @@
width: 100%;
}
.register-phone .iti--allow-dropdown {
width: 100%;
}
@media only screen and (min-width: 960px) {
.login-section,
.register-section {

View File

@ -0,0 +1,13 @@
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);
});
}
});

View File

@ -3,18 +3,3 @@
// Go!
})(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);
});
}
});

View File

@ -103,4 +103,11 @@
</div>
</div>
</div>
{% endblock %}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/intlTelInput.min.js") }}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/utils.js") }}
{{ asset_add("scripts.js", "visiosoft.theme.base::js/phonefield.js") }}
{{ asset_add("styles.css", "visiosoft.theme.base::css/intlTelInput.css") }}
{% endblock %}

View File

@ -8,8 +8,6 @@
{{ asset_add("theme.js", "theme::js/modal_include.js") }}
{{ asset_add("theme.js", "theme::js/select2.js") }}
{{ asset_add("theme.js", "theme::js/params.js") }}
{{ asset_add("theme.js", "theme::js/intlTelInput.min.js") }}
{{ asset_add("theme.js", "theme::js/utils.js") }}
{# Theme Scripts #}
{#{{ asset_add("theme.js", "theme::js/plugins/*") }}#}

View File

@ -36,7 +36,6 @@
{{ asset_add("theme.css", "theme::css/theme.css") }}
{{ asset_add("theme.css", "theme::css/select2.css") }}
{{ asset_add("theme.css", "theme::css/font-awesome.min.css") }}
{{ asset_add("theme.css", "theme::css/intlTelInput.css") }}
<script src="{{ asset_path('theme::js/vendor/jquery.min.js') }}"></script>
{{ asset_style("theme.css") }}