effective_bootstrap 0.3.1 → 0.3.2

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: 4253e5912bdb4bd1ee2046f404c40a108d6baf41
4
- data.tar.gz: e1acfb6e5c27e969801f47bb3989a8eb796744d7
3
+ metadata.gz: ebc807c7e59ae5211d7d6a5cc7db028d75598654
4
+ data.tar.gz: 970c0697fddd13505941e5903ed3931da0fbb740
5
5
  SHA512:
6
- metadata.gz: a4682dab51bfb9812ca8afee9dc146b324e776dedc31e1902e3017c8ec62d9978eac8ed070e3572866ad03752605ca365b011565ddaeaa51c149c06acb5b385b
7
- data.tar.gz: 2351f437787f0bbf3e8969076299acac707dc7756883cda27e1cfca8ad4c86047d6c701bd5eaa408b6f91aae7fbacc8624d6cd7014e7e1b843f1a951967d1933
6
+ metadata.gz: e583a91140b0c0988fab00a36a12c4991481045d1662a883c2ff0fdb6c79aba560bc79171607066715592b3e2b8bb04be52e6aa23a6cfc09b2d0f4ec408693b7
7
+ data.tar.gz: 43f174be82d4ec975ccaafe6e024c29b9479fdc87e5f15372c776a2e8bd5869313292c901632e1128ddf4bc1d5674e27bef7ddf52eca781de202d8d287c7a76d
@@ -17,6 +17,7 @@ module Effective
17
17
  super
18
18
  end
19
19
 
20
+ alias_method :super_number_field, :number_field
20
21
  alias_method :super_text_field, :text_field
21
22
  alias_method :super_text_area, :text_area
22
23
 
@@ -59,6 +60,10 @@ module Effective
59
60
  Effective::FormInputs::FileField.new(name, options, builder: self).to_html { super(name, options) }
60
61
  end
61
62
 
63
+ def float_field(name, options = {})
64
+ Effective::FormInputs::FloatField.new(name, options, builder: self).to_html
65
+ end
66
+
62
67
  def form_group(name = nil, options = {}, &block)
63
68
  Effective::FormInputs::FormGroup.new(name, options, builder: self).to_html(&block)
64
69
  end
@@ -0,0 +1,15 @@
1
+ module Effective
2
+ module FormInputs
3
+ class FloatField < Effective::FormInput
4
+
5
+ def build_input(&block)
6
+ @builder.super_number_field(name, options[:input])
7
+ end
8
+
9
+ def input_html_options
10
+ { class: 'form-control effective_float', autocomplete: 'off', step: '0.01' }
11
+ end
12
+
13
+ end
14
+ end
15
+ end
@@ -1,3 +1,3 @@
1
1
  module EffectiveBootstrap
2
- VERSION = '0.3.1'.freeze
2
+ VERSION = '0.3.2'.freeze
3
3
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: effective_bootstrap
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Code and Effect
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2018-11-16 00:00:00.000000000 Z
11
+ date: 2018-11-19 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: rails
@@ -440,6 +440,7 @@ files:
440
440
  - app/models/effective/form_inputs/email_field.rb
441
441
  - app/models/effective/form_inputs/error_field.rb
442
442
  - app/models/effective/form_inputs/file_field.rb
443
+ - app/models/effective/form_inputs/float_field.rb
443
444
  - app/models/effective/form_inputs/form_group.rb
444
445
  - app/models/effective/form_inputs/number_field.rb
445
446
  - app/models/effective/form_inputs/password_field.rb