GithubHelp home page GithubHelp logo

ispyropoulos / intl-tel-input-rails Goto Github PK

View Code? Open in Web Editor NEW
36.0 5.0 46.0 1.28 MB

intl-tel-input for the Rails asset pipeline

License: MIT License

Ruby 1.36% JavaScript 68.33% CSS 30.31%
jquery-plugin international-telephone phone-number validation formatting libphonenumber input ruby rails intl-tel-input

intl-tel-input-rails's People

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

intl-tel-input-rails's Issues

update the plugin

Hi Ilias,

I've yanked the gem on Rubygem.org. As I mentioned, may I open up a pull request to update to plugin to the newest version? There have been major changes in the plugin since the the last release of the gem.

Again, I apologize for my ignorance of the convention of the community.

Jason

not work if have 2 inputs intlTelInput

i have try to use in one form with 2 inputs using the plugin

<script type="text/javascript" charset="utf-8">
  $( document ).ready(function() {
    $('#company_telephone').intlTelInput({
      formatOnInit: true,
      separateDialCode: true,
      utilsScript: "assets/libphonenumber/utils.js"
    });

    $('#contact_telephone').intlTelInput({
      formatOnInit: true,
      separateDialCode: true,
      utilsScript: "assets/libphonenumber/utils.js"
    });
  });
</script>
<input id="company_telephone" required="required" maxlength="15" minlenght="10" size="15" type="text" value="+529999999999" name="company[telephone]" class="form-control" autocomplete="off" placeholder="1 222 123 4567">

<input id="contact_telephone" required="required" maxlength="15" minlenght="10" size="15" type="text" value="+529999999999" name="contact[telephone]" class="form-control" autocomplete="off" placeholder="1 222 123 4567">

But at time i make a change in the contact_telephone it add +52 to company_telephone :(

Initialize intl-tel-input-rails

Hey,

I just installed the gem, but I don't see how to get running the flags in the README, what I did:

  1. Add the gem to my Gemfile gem 'intl-tel-input-rails'
  2. Install it bundle
  3. Require it in my application.js file //= require intlTelInput
  4. Import it in my application.scss file @import "intlTelInput";
  5. Add the phone id into my input field as well as the tel type (as indicated on the original plugin)

Nothing happens, how do I get this running? I can't see the flags or even the dropdown showing on my input field, why?

Note: I also did initialize the field with jQuery $("#phone").intlTelInput(); and nothing as well.

I'd really appreciate your help! ๐Ÿ˜ƒ

Thank you!

Images not showing in 11.0.4

We have updated our gem to 11.0.4 from 9.0.0 and now the flag icon isn't showing unless I add the line

.iti-flag {background-image: image-url("flags.png");}

Allow for use with sass-rails or sassc-rails

This is an awesome gem! I was wondering if there was a way to specify the dependencies so that you could choose to use sass-rails or sassc-rails as your SASS engine, since this is the only part of my project that requires sass-rails.

Thanks!

Update to version 14.0.x

Version 14.0 of intl-tel-input got released September 2018 and removes the jQuery dependency.
I think it would be useful to update the Gem.

typo?

Hey,
thanks for the gem.
for me it start working after I add '/' before asset in JS snippet.

utilsScript: "/assets/libphonenumber/utils.js"

is this a typo or it depends on configuration?

Flags are not displayed

I'm using Rails 3.2 and I've just installed your gem. I don't understand why the flag icons are not displayed on my page:
screen shot 2015-10-23 at 16 57 51

Any idea? I put all the directives as indicated in the README.

flags.png is not fingerprinted

Tested on a Rails 4.2 app.

The intlTelInput.css file references the flags.png sprite which is not fingerprinted. When deploying on production using the asset pipeline, if the file has changed (as you recently updated it), you will probably get the older stale file, if you cache your assets in any way (eg. CDN).

Will try to send a fix soon.

utils.js not loading

I am able to initialize the plug in, but utils.js isn't loading and so formating and validation of number is not happening. Am I missing something here?

Thank you.

country code

How do you get the country code on jquery submit?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.