bootstrap_form 5.3.1 → 5.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
  SHA256:
3
- metadata.gz: 24a6f3e912fb97478e9708a92c7e58ad761f3c7f2dc9dee8d3cac006df650f8b
4
- data.tar.gz: eabd38d5e11860969242574152a5f607a6afe734c0c4f88ed85f5ad252a793bc
3
+ metadata.gz: 7186ebccc43337fd8f78a3ced57a26654daf865e57493b10e29259057030830e
4
+ data.tar.gz: af0ee29e7b0fdcfb277d218038a68157fce0de44273f07921d8edcc7fd496166
5
5
  SHA512:
6
- metadata.gz: 2e092508b6cb801f0780258cabaa16b02e43483ccb4e7a04ddb76ffd56e6887ffdeccfb55a82e44a7112934f296aa6a2a61bebd10f1af7ef28a835887052948d
7
- data.tar.gz: 133a7779e317214e68c7b8118369931107ab9f9e63a6f384185d5e512338e8c941db5018619e6bbfa6e4936ae0f23aeba5d9681f74e7d13e8cb10495825f2c0c
6
+ metadata.gz: 8e77aebaaf5728eb933a3f57d492d10745a8867543e87f30e77e5ec922a3fe61783d6a769f1217eebee921782506b44c2e91d76a0bc71dc9e10f896be0f33dfc
7
+ data.tar.gz: bc6fde236ec6cdebd0c54633828caea0b7f578ffa8669d2d6e9b9fc9b2abce4f89fa20f5d0be5de6c96c05faee23f2459619b0b5585ec9e0d3545a607ac99e9d
data/.gitignore CHANGED
@@ -3,8 +3,7 @@
3
3
  log/*.log
4
4
  pkg/
5
5
  demo/db/*.sqlite3
6
- demo/doc/screenshots/**/*.committed.png
7
- demo/doc/screenshots/**/*.latest.png
6
+ demo/doc/screenshots/**/*.diff.png
8
7
  demo/log/*.log
9
8
  demo/tmp/
10
9
  *.gem
data/CHANGELOG.md CHANGED
@@ -6,10 +6,12 @@ https://github.com/bootstrap-ruby/bootstrap_form/releases
6
6
 
7
7
  ## Diffs
8
8
 
9
+ - [5.3.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.3.1...v5.3.2)
10
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-09-15T15%3A00..2023-09-15T21%3A00)
9
11
  - [5.3.1](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.3.0...v5.3.1)
10
- [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-09-15T15%3A00..2023-09-15T16%3A00)
12
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-09-15T13%3A00..2023-09-15T15%3A00)
11
13
  - [5.3.0](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.3...v5.3.0)
12
- [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-06-18T07%3A00..2023-09-15T15%3A00)
14
+ [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-06-18T07%3A00..2023-09-15T13%3A00)
13
15
  - [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.2...v5.2.3)
14
16
  [Closed issues](https://github.com/bootstrap-ruby/bootstrap_form/issues?q=closed%3A2023-05-28T16%3A00..2023-06-18T07%3A00)
15
17
  - [5.2.2](https://github.com/bootstrap-ruby/bootstrap_form/compare/v5.2.1...v5.2.2)
data/README.md CHANGED
@@ -1214,7 +1214,7 @@ The `label_col` and `control_col` css classes can also be changed per control:
1214
1214
  ```erb
1215
1215
  <%= bootstrap_form_for(@user, layout: :horizontal) do |f| %>
1216
1216
  <%= f.email_field :email %>
1217
- <%= f.text_field :age, label_col: "col-sm-3", control_col: "col-sm-3" %>
1217
+ <%= f.text_field :age, label_col: %w[col-sm-3 text-bg-info], control_col: %w[col-sm-3 text-bg-success] %>
1218
1218
  <%= f.check_box :terms, label_col: "", control_col: "col-sm-11" %>
1219
1219
  <%= f.form_group do %>
1220
1220
  <%= f.submit %>
@@ -1233,8 +1233,8 @@ This generates:
1233
1233
  </div>
1234
1234
  </div>
1235
1235
  <div class="mb-3 row">
1236
- <label class="col-form-label col-sm-3" for="user_age">Age</label>
1237
- <div class="col-sm-3">
1236
+ <label class="col-form-label col-sm-3 text-bg-info" for="user_age">Age</label>
1237
+ <div class="col-sm-3 text-bg-success">
1238
1238
  <input class="form-control" id="user_age" name="user[age]" type="text" value="42">
1239
1239
  </div>
1240
1240
  </div>
@@ -47,9 +47,7 @@ module BootstrapForm
47
47
  end
48
48
 
49
49
  def call_with_self(object, proc)
50
- if proc.is_a? Symbol
51
- proc = object.method(proc)
52
- end
50
+ proc = object.method(proc) if proc.is_a? Symbol
53
51
  object.instance_exec(*[(object if proc.arity >= 1)].compact, &proc)
54
52
  end
55
53
 
@@ -104,7 +104,7 @@ module BootstrapForm
104
104
  end
105
105
 
106
106
  def offset_col(label_col)
107
- label_col.gsub(/\bcol-(\w+)-(\d)\b/, 'offset-\1-\2')
107
+ [*label_col].flat_map { |s| s.split(/\s+/) }.grep(/^col-/).join(" ").gsub(/\bcol-(\w+)-(\d)\b/, 'offset-\1-\2')
108
108
  end
109
109
 
110
110
  def default_control_col
@@ -10,9 +10,8 @@ module BootstrapForm
10
10
 
11
11
  options[:class] = form_group_classes(options)
12
12
 
13
- tag.div(**options.except(:append, :id, :label, :help, :icon,
14
- :input_group_class, :label_col, :control_col,
15
- :add_control_col_class, :layout, :prepend, :floating)) do
13
+ tag.div(**options.except(:add_control_col_class, :append, :control_col, :floating, :help, :icon, :id,
14
+ :input_group_class, :label, :label_col, :layout, :prepend)) do
16
15
  label = generate_label(options[:id], name, options[:label], options[:label_col], options[:layout])
17
16
  form_group_content(label, generate_help(name, options[:help]), options, &block)
18
17
  end
@@ -1,4 +1,4 @@
1
1
  module BootstrapForm
2
- VERSION = "5.3.1".freeze
2
+ VERSION = "5.3.2".freeze
3
3
  REQUIRED_RAILS_VERSION = ">= 6.1".freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: bootstrap_form
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.3.1
4
+ version: 5.3.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Stephen Potenza