avo 3.14.3 → 3.14.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/Gemfile.lock +1 -1
- data/app/assets/builds/avo.base.css +8 -204
- data/app/assets/builds/avo.base.js +3 -3
- data/app/assets/builds/avo.base.js.map +2 -2
- data/app/helpers/avo/application_helper.rb +1 -1
- data/app/views/avo/associations/new.html.erb +7 -1
- data/lib/avo/base_action.rb +20 -0
- data/lib/avo/version.rb +1 -1
- data/lib/avo.rb +1 -0
- metadata +2 -2
@@ -41,8 +41,14 @@
|
|
41
41
|
stacked: true,
|
42
42
|
classes: 'w-full'
|
43
43
|
%>
|
44
|
-
<%= hidden_field_tag :turbo_frame, params[:turbo_frame] %>
|
45
44
|
<% end %>
|
45
|
+
<%#
|
46
|
+
It is important to render this hidden field to allow selective rendering of the turbo frame.
|
47
|
+
(e.g. in the case of "Attach and Attach Another")
|
48
|
+
|
49
|
+
Without this, the entire page will be reloaded when the form is submitted.
|
50
|
+
%>
|
51
|
+
<%= hidden_field_tag :turbo_frame, params[:turbo_frame] %>
|
46
52
|
<% @attach_fields&.each_with_index do |field, index| %>
|
47
53
|
<%= render(Avo::Items::SwitcherComponent.new(
|
48
54
|
resource: @related_resource,
|
data/lib/avo/base_action.rb
CHANGED
@@ -143,6 +143,26 @@ module Avo
|
|
143
143
|
).handle
|
144
144
|
end
|
145
145
|
|
146
|
+
def cancel_button_label
|
147
|
+
Avo::ExecutionContext.new(
|
148
|
+
target: self.class.cancel_button_label,
|
149
|
+
resource: @resource,
|
150
|
+
record: @record,
|
151
|
+
view: @view,
|
152
|
+
arguments: @arguments
|
153
|
+
).handle
|
154
|
+
end
|
155
|
+
|
156
|
+
def confirm_button_label
|
157
|
+
Avo::ExecutionContext.new(
|
158
|
+
target: self.class.confirm_button_label,
|
159
|
+
resource: @resource,
|
160
|
+
record: @record,
|
161
|
+
view: @view,
|
162
|
+
arguments: @arguments
|
163
|
+
).handle
|
164
|
+
end
|
165
|
+
|
146
166
|
def handle_action(**args)
|
147
167
|
processed_fields = if args[:fields].present?
|
148
168
|
# Fetching the field definitions and not the actual fields (get_fields) because they will break if the user uses a `visible` block and adds a condition using the `params` variable. The params are different in the show method and the handle method.
|
data/lib/avo/version.rb
CHANGED
data/lib/avo.rb
CHANGED
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: avo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 3.14.
|
4
|
+
version: 3.14.4
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Adrian Marin
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2024-11-
|
13
|
+
date: 2024-11-28 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: activerecord
|