base_editing_bootstrap 1.0.0 → 1.1.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/CHANGELOG.md +11 -0
- data/app/views/base_editing/_form.html.erb +1 -0
- data/app/views/base_editing/_form_field.html.erb +9 -4
- data/app/views/base_editing/_form_field_container.html.erb +3 -0
- data/app/views/base_editing/form_field/_boolean.html.erb +1 -1
- data/lib/base_editing_bootstrap/VERSION +1 -1
- data/lib/base_editing_bootstrap/forms/base.rb +1 -1
- metadata +3 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: a1e80d543ff93c2a170069bb78b4f78488819804458f1e5a36c87fd7d0975476
|
4
|
+
data.tar.gz: b65c0f800fe834ac24794e292c8e09c7e2910e2f5e1b0ba215aadd69ee7ff168
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 776c45e8aab54bb0208bf9b0af8728a2467b9943dec257f6e55527be03c53cfd7996e7f370a63ef29d769fe318a4937435bb7759eabf130c08f070d88c8b0eb8
|
7
|
+
data.tar.gz: 749586e54204dab5ad28c227d03fab252a79483e63a7f6cf07cb6ce84aca05aded2408f6092578ce3f39fca61ac4708b4c4692a3fb67c3722a1ca350dada2392
|
data/CHANGELOG.md
CHANGED
@@ -2,6 +2,17 @@
|
|
2
2
|
All notable changes to this project will be documented in this file. See [conventional commits](https://www.conventionalcommits.org/) for commit guidelines.
|
3
3
|
|
4
4
|
- - -
|
5
|
+
## 1.1.0 - 2025-01-03
|
6
|
+
#### Continuous Integration
|
7
|
+
- Add ruby 3.4 - (5658bb0) - Marino Bonetti
|
8
|
+
#### Features
|
9
|
+
- Boolean switch render right side label - (d448ef7) - Marino Bonetti
|
10
|
+
- Add a new layout container for form_field - (77dec9f) - Marino Bonetti
|
11
|
+
#### Tests
|
12
|
+
- Add help text example for enabled - (efd4aff) - Marino Bonetti
|
13
|
+
|
14
|
+
- - -
|
15
|
+
|
5
16
|
## 1.0.0 - 2024-11-26
|
6
17
|
#### Bug Fixes
|
7
18
|
- Remove fixed versions - (f8dc4b8) - Marino Bonetti
|
@@ -5,20 +5,25 @@
|
|
5
5
|
# - form_field -> Array[String]
|
6
6
|
%>
|
7
7
|
<%# locals: (form:, form_field:) -%>
|
8
|
-
<%= form.label(form_field, class: ["form-label", "form-#{form_field}-label"]) %>
|
9
|
-
|
10
8
|
<%
|
11
|
-
button_group_classes = ["mb-
|
9
|
+
button_group_classes = ["mb-1"]
|
12
10
|
|
13
11
|
content = form_print_field(form, form_field)
|
14
12
|
unless content.match "checkbox"
|
15
13
|
button_group_classes << "input-group"
|
16
14
|
end
|
17
|
-
|
18
15
|
button_group_classes << (form.object.validated? ? "has-validation" : "")
|
19
16
|
button_group_classes << "form-#{form_field}-input-group"
|
20
17
|
|
18
|
+
# Non renderizziamo il contenuto del label in questa vista se siamo nello switch
|
19
|
+
if content.match "form-switch"
|
20
|
+
label_content = nil
|
21
|
+
else
|
22
|
+
label_content = form.label(form_field, class: ["form-label", "form-#{form_field}-label"])
|
23
|
+
end
|
24
|
+
|
21
25
|
%>
|
26
|
+
<%= label_content %>
|
22
27
|
<%= content_tag :div, class: button_group_classes.join(" ") do %>
|
23
28
|
<%= render partial: "editing_form_measure_unit", locals: {object: form.object, field: form_field} %>
|
24
29
|
<%= content %>
|
@@ -1,2 +1,2 @@
|
|
1
1
|
<%# locals: (form:, field:) -%>
|
2
|
-
<%= form.switch_box(field) %>
|
2
|
+
<%= form.switch_box(field,label: field) %>
|
@@ -1 +1 @@
|
|
1
|
-
1.
|
1
|
+
1.1.0
|
@@ -64,7 +64,7 @@ module BaseEditingBootstrap::Forms
|
|
64
64
|
end
|
65
65
|
|
66
66
|
def switch_box(method, options = {}, checked_value = "1", unchecked_value = "0")
|
67
|
-
options[:class] = (["form-switch"] + (options[:class] || "").split(" ")).join(" ")
|
67
|
+
options[:class] = (["form-check form-switch"] + (options[:class] || "").split(" ")).join(" ")
|
68
68
|
self.check_box(method, options, checked_value, unchecked_value)
|
69
69
|
end
|
70
70
|
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: base_editing_bootstrap
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.1.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marino Bonetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2025-01-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|
@@ -317,6 +317,7 @@ files:
|
|
317
317
|
- app/views/base_editing/_editing_form_measure_unit.html.erb
|
318
318
|
- app/views/base_editing/_form.html.erb
|
319
319
|
- app/views/base_editing/_form_field.html.erb
|
320
|
+
- app/views/base_editing/_form_field_container.html.erb
|
320
321
|
- app/views/base_editing/_form_field_header.html.erb
|
321
322
|
- app/views/base_editing/_form_footer.html.erb
|
322
323
|
- app/views/base_editing/_index_body.html.erb
|