kono_utils_bootstrap_view4 0.1.2 → 0.2
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/app/concepts/kono_utils/object/cell/form.rb +7 -0
- data/app/concepts/kono_utils/object/cell/forms/base.rb +1 -0
- data/app/concepts/kono_utils/object/cell/searches/form.rb +6 -0
- data/app/concepts/kono_utils/object/view/form.erb +4 -2
- data/app/concepts/kono_utils/object/view/searches/form.erb +3 -2
- data/lib/kono_utils_bootstrap_view4/version.rb +1 -1
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f7ca729271063a5d64a3e7cfdbbb0095a05360786f7d31047bfb7e88d164f4db
|
4
|
+
data.tar.gz: 6aa833e452752195fb3bb74e360fe615e2d8aa396f039f3057fc6c13a7dcea0b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 13ae8eed2972563231f7bb70a656f716370a3101041883e17b3d6385c9d1356d83fc91f9dfcd1735c915e17f2c95a2a1ff232994bfaa472ad3e3199a3af1e8b4
|
7
|
+
data.tar.gz: 6a65665f415d3a3713265ee44c3217765e48a1040bd152e190478f646e397c0d35b2dd4c5fe9fc5deb69952355f8971f39997ff719c0d9fda7529450cd52ff28
|
@@ -24,6 +24,13 @@ module KonoUtils
|
|
24
24
|
[model, _form_options]
|
25
25
|
end
|
26
26
|
|
27
|
+
##
|
28
|
+
# Elenco di concept di bottoni da generare nella form per il submit
|
29
|
+
# @param [SimpleForm::FormBuilder] form_builder
|
30
|
+
def submit_buttons(form_builder:)
|
31
|
+
[concept("cell/forms/submit", nil, context: {form: form_builder})]
|
32
|
+
end
|
33
|
+
|
27
34
|
protected
|
28
35
|
|
29
36
|
def form_id
|
@@ -11,6 +11,12 @@ module KonoUtils
|
|
11
11
|
:search_buttons_container
|
12
12
|
end
|
13
13
|
|
14
|
+
# @param [SimpleForm::FormBuilder] form_builder
|
15
|
+
# @return [Array<Concept>]
|
16
|
+
def submit_buttons(form_builder:)
|
17
|
+
super + [concept("cell/buttons/reset_search", model.search_form_builder.to_model)]
|
18
|
+
end
|
19
|
+
|
14
20
|
end
|
15
21
|
end
|
16
22
|
end
|
@@ -1,9 +1,11 @@
|
|
1
1
|
<%= simple_form_for(*forms_options) do |f| %>
|
2
2
|
|
3
|
-
<%= concept("cell/forms/container", model, context: {form: f}, layout: container_layout) %>
|
3
|
+
<%= concept("cell/forms/container", model, context: { form: f }, layout: container_layout) %>
|
4
4
|
|
5
5
|
<%= hidden_field_tag "kono_utils[form_id]", form_id %>
|
6
6
|
|
7
|
-
|
7
|
+
<% submit_buttons(form_builder:f).each do |btn| %>
|
8
|
+
<%= btn %>
|
9
|
+
<% end %>
|
8
10
|
|
9
11
|
<% end %>
|
@@ -7,8 +7,9 @@
|
|
7
7
|
<div class="row">
|
8
8
|
<div class="col-md">
|
9
9
|
<div class="float-right">
|
10
|
-
|
11
|
-
|
10
|
+
<% submit_buttons(form_builder:f).each do |btn| %>
|
11
|
+
<%= btn %>
|
12
|
+
<% end %>
|
12
13
|
</div>
|
13
14
|
</div>
|
14
15
|
</div>
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: kono_utils_bootstrap_view4
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: '0.2'
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Marino Bonetti
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2021-
|
11
|
+
date: 2021-03-01 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rails
|