From 8159ff22e530d30bad99952894bc9392cd287248 Mon Sep 17 00:00:00 2001 From: David Gay Date: Wed, 14 Jul 2021 18:51:48 -0400 Subject: Display activity-select (description, costs, and requirements) on hearth plantings view --- .../characters/hearth/hearth_plantings/index.html.erb | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) (limited to 'app/views') diff --git a/app/views/characters/hearth/hearth_plantings/index.html.erb b/app/views/characters/hearth/hearth_plantings/index.html.erb index d8e7f96..3f6964f 100644 --- a/app/views/characters/hearth/hearth_plantings/index.html.erb +++ b/app/views/characters/hearth/hearth_plantings/index.html.erb @@ -3,11 +3,15 @@

You have <%= @hearth.available_planting_spots %> available planting spots.

- <%= form_with url: start_activity_path, method: :post do |f| %> - <%= f.select :id, @planting_activities.sort_by { |a| a.name }.map { |a| [a.name, a.id] } %> - <%= f.number_field :actions, value: 1, size: 5, min: 1, max: 2_000_000_000 %> - <%= f.submit "Plant" %> - <% end %> +
+ <%= form_with url: start_activity_path, method: :post do |f| %> + <%= f.select :id, @planting_activities.sort_by { |a| a.name }.map { |a| [a.name, a.id] }, + {}, { data: { activity_select_target: "select", action: "activity-select#load" } } %> + <%= f.number_field :actions, value: 1, size: 5, min: 1, max: 2_000_000_000 %> + <%= f.submit "Plant" %> + <% end %> +
+
-- cgit v1.2.3