intl_phone_picker 0.0.7.5 → 0.0.7.6

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: b127dddb834f105c392ad2f695ae4e5a6ee5bb06
4
- data.tar.gz: 209cdb041404c5265dd5d1b0a9181da7bcb75126
3
+ metadata.gz: a919e4da1205be521a194b0a4612adc19be57dd2
4
+ data.tar.gz: 220689e9f04bdd26d47bde6c7b978b75f38ee8ea
5
5
  SHA512:
6
- metadata.gz: e94dcb58673dec254da9df253322591c45609671393bbb147c8a444354a1529300600d63529e32d3d585c3a9b136a11c1cbc55245b1118cfe0a414c5aea8b9d2
7
- data.tar.gz: 474642d45b9c9f31459be06feea4d9b40eeb3ea505389a73451ba056b17853616bc4d7ac6467e75e1509c4d81db8ff6244039c225c6f41a13362f81d84523059
6
+ metadata.gz: 4200b8488503a35d9d257819a6735c9122c275a2000f1ed3af98a27c9b848a3d37891f2238d5941e284d36472dcb7572bd0f8d652c6337ddf58f9c92bb6bbe75
7
+ data.tar.gz: 055cdf7c806366553c87a1a2f6a5f3f1f06671d26871051f4e2fdc54fbab82b17b1877f603333500474ef9f771b533edefde2746de91abd3a8545bcac5f28660
@@ -3,11 +3,12 @@ class ActionView::Helpers::FormBuilder
3
3
  def intl_phone_input(object_name, options = {})
4
4
  options = IntlPhonePicker::options_keys_to_sym options
5
5
  data_phone_field_attr = "#{self.object_name}[#{object_name}]"
6
+ hidden_field_name = "#{self.object_name}[#{options[:hidden_intl_field]}]" if options[:hidden_intl_field].presence
6
7
 
7
- phones_fields = telephone_field(object_name, options.merge(class: "#{options[:class]} #{IntlPhonePicker::intl_class_name}").except(:hidden_intl_field))
8
+ phones_fields = telephone_field(object_name, options.merge(class: "#{options[:class]} #{IntlPhonePicker::intl_class_name}".strip).except(:hidden_intl_field))
8
9
  phones_fields << hidden_field(options[:hidden_intl_field], { 'data-phone-field' => data_phone_field_attr }) if options[:hidden_intl_field].presence
9
10
 
10
- @template.render partial: 'intl_phone_picker/intl_helper', locals: { phones_fields: phones_fields, visible_input_name: data_phone_field_attr, hidden_input_name: options[:hidden_intl_field] }
11
+ @template.render partial: 'intl_phone_picker/intl_helper', locals: { phones_fields: phones_fields, visible_input_name: data_phone_field_attr, hidden_input_name: hidden_field_name }
11
12
  end
12
13
 
13
14
  end
@@ -1,3 +1,3 @@
1
1
  module IntlPhonePicker
2
- VERSION = "0.0.7.5"
2
+ VERSION = "0.0.7.6"
3
3
  end
@@ -4,7 +4,7 @@ module IntlPhonePicker
4
4
  def intl_phone_tag(name, value = nil, options = {})
5
5
  options = IntlPhonePicker::options_keys_to_sym options
6
6
 
7
- phones_fields = telephone_field_tag(name, value, options.merge(class: "#{options[:class]} #{IntlPhonePicker::intl_class_name}").except(:hidden_intl_field))
7
+ phones_fields = telephone_field_tag(name, value, options.merge(class: "#{options[:class]} #{IntlPhonePicker::intl_class_name}".strip).except(:hidden_intl_field))
8
8
  phones_fields << hidden_field_tag(options[:hidden_intl_field], value, { 'data-phone-field' => name }) if options[:hidden_intl_field].presence
9
9
 
10
10
  render partial: 'intl_phone_picker/intl_helper', locals: { phones_fields: phones_fields, visible_input_name: name, hidden_input_name: options[:hidden_intl_field] }
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: intl_phone_picker
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.7.5
4
+ version: 0.0.7.6
5
5
  platform: ruby
6
6
  authors:
7
7
  - |+