diff --git a/lib/frenzy_web/live/configure_stage/conditional_stage_live.html.leex b/lib/frenzy_web/live/configure_stage/conditional_stage_live.html.heex similarity index 77% rename from lib/frenzy_web/live/configure_stage/conditional_stage_live.html.leex rename to lib/frenzy_web/live/configure_stage/conditional_stage_live.html.heex index 9d34c65..e122701 100644 --- a/lib/frenzy_web/live/configure_stage/conditional_stage_live.html.leex +++ b/lib/frenzy_web/live/configure_stage/conditional_stage_live.html.heex @@ -1,16 +1,16 @@ -
+
<%= if Mix.env == :dev do %>
<%= Jason.encode!(@opts, pretty: true) %>
<% end %> - <%= f = form_for @opts, "#", [as: :opts, phx_change: :update_stage, phx_target: @myself] %> + <%= form_for @opts, "#", [as: :opts, phx_change: :update_stage, phx_target: @myself], fn f -> %>
- +
<%= select f, :stage, @stages, prompt: "Select a stage...", id: "#{@id}-stage", class: "custom-select" %>
- + <% end %>
@@ -32,7 +32,7 @@

Condition: Filter

- +
@@ -40,8 +40,8 @@ <%= if @confirm_convert_to_rule do %>

This will modify the conditional stage to only run when the first rule is met. Are you sure you want to proceed?

- - + +
<% end %> @@ -56,7 +56,7 @@

Condition: Rule

- +
diff --git a/lib/frenzy_web/live/configure_stage/filter_stage_live.html.leex b/lib/frenzy_web/live/configure_stage/filter_stage_live.html.heex similarity index 90% rename from lib/frenzy_web/live/configure_stage/filter_stage_live.html.leex rename to lib/frenzy_web/live/configure_stage/filter_stage_live.html.heex index 4fb09c3..26566c4 100644 --- a/lib/frenzy_web/live/configure_stage/filter_stage_live.html.leex +++ b/lib/frenzy_web/live/configure_stage/filter_stage_live.html.heex @@ -1,4 +1,4 @@ -
+
<%= if Mix.env == :dev do %>
<%= Jason.encode!(@opts, pretty: true) %>
<% end %> diff --git a/lib/frenzy_web/live/configure_stage/scrape_stage_live.html.leex b/lib/frenzy_web/live/configure_stage/scrape_stage_live.html.heex similarity index 57% rename from lib/frenzy_web/live/configure_stage/scrape_stage_live.html.leex rename to lib/frenzy_web/live/configure_stage/scrape_stage_live.html.heex index 6d352db..2c98194 100644 --- a/lib/frenzy_web/live/configure_stage/scrape_stage_live.html.leex +++ b/lib/frenzy_web/live/configure_stage/scrape_stage_live.html.heex @@ -1,17 +1,17 @@ -
+
<%= if Mix.env == :dev do %>
<%= Jason.encode!(@opts, pretty: true) %>
<% end %> - <%= f = form_for @opts, "#", [as: :opts, phx_change: :update_stage, phx_target: @myself] %> + <%= form_for @opts, "#", [as: :opts, phx_change: :update_stage, phx_target: @myself], fn f -> %>
<%= checkbox f, :convert_to_data_uris, id: "#{@id}-convert_to_data_uris", class: "form-check-input" %> - +
- +
<%= select f, :extractor, @extractors, id: "#{@id}-extractor", class: "custom-select" %>
- + <% end %>
diff --git a/lib/frenzy_web/live/edit_pipeline_live.html.leex b/lib/frenzy_web/live/edit_pipeline_live.html.heex similarity index 76% rename from lib/frenzy_web/live/edit_pipeline_live.html.leex rename to lib/frenzy_web/live/edit_pipeline_live.html.heex index 4486502..ff506e8 100644 --- a/lib/frenzy_web/live/edit_pipeline_live.html.leex +++ b/lib/frenzy_web/live/edit_pipeline_live.html.heex @@ -1,6 +1,6 @@

Edit <%= @pipeline.name %>

-" class="btn btn-primary">Edit as JSON +Edit as JSON <%= for {stage, index} <- Enum.with_index(@pipeline.stages) do %>
@@ -14,7 +14,7 @@ <%= content_tag :button, "Move Down", [phx_click: :move_down, phx_value_index: index, disabled: index == length(@pipeline.stages) - 1, class: "btn btn-secondary btn-sm"] %> - +
@@ -24,7 +24,7 @@
<% end %> -<%= f = form_for :stage, "#", [class: "mt-4 mb-4", phx_submit: :add_stage] %> +<%= form_for :stage, "#", [class: "mt-4 mb-4", phx_submit: :add_stage], fn f -> %>
@@ -32,4 +32,4 @@
<%= submit "Add Stage", class: "btn btn-primary" %> - +<% end %> diff --git a/lib/frenzy_web/live/filter/filter_live.html.leex b/lib/frenzy_web/live/filter/filter_live.html.heex similarity index 63% rename from lib/frenzy_web/live/filter/filter_live.html.leex rename to lib/frenzy_web/live/filter/filter_live.html.heex index 2424f67..8c302d8 100644 --- a/lib/frenzy_web/live/filter/filter_live.html.leex +++ b/lib/frenzy_web/live/filter/filter_live.html.heex @@ -1,18 +1,18 @@ -
- <%= f = form_for @filter, "#", [phx_change: :update_filter, phx_target: "##{@parent_id}"] %> +
+ <%= form_for @filter, "#", [phx_change: :update_filter, phx_target: "##{@parent_id}"], fn f -> %>
- +
<%= select f, :mode, @modes, id: "#{@id}-mode", class: "custom-select" %>
- +
<%= number_input f, :score, id: "#{@id}-score", class: "form-control" %>
- + <% end %> <%= for {rule, index} <- Enum.with_index(@filter["rules"]) do %>
@@ -21,7 +21,7 @@

Rule <%= index %>

- +
@@ -31,7 +31,7 @@
<% end %> - <%= f = form_for :rule, "#", class: "mt-2", phx_submit: :add_rule, phx_target: "##{@parent_id}" %> + <%= form_for :rule, "#", [class: "mt-2", phx_submit: :add_rule, phx_target: "##{@parent_id}"], fn f -> %> <%= submit "Add Rule", class: "btn btn-primary" %> - + <% end %> diff --git a/lib/frenzy_web/live/filter/filter_rule_live.html.leex b/lib/frenzy_web/live/filter/filter_rule_live.html.heex similarity index 77% rename from lib/frenzy_web/live/filter/filter_rule_live.html.leex rename to lib/frenzy_web/live/filter/filter_rule_live.html.heex index 8b6a035..b906636 100644 --- a/lib/frenzy_web/live/filter/filter_rule_live.html.leex +++ b/lib/frenzy_web/live/filter/filter_rule_live.html.heex @@ -1,4 +1,5 @@ -
<%= f = form_for @rule, "#", [phx_change: :update_rule, phx_target: "##{@parent_id}"] %> +
+ <%= form_for @rule, "#", [phx_change: :update_rule, phx_target: "##{@parent_id}"], fn f -> %> <%= hidden_input f, :index, value: @index %>
@@ -12,9 +13,10 @@
- +
<%= number_input f, :weight, id: "#{@id}-weight", class: "form-control" %>
-
+ <% end %> +