From 93aebeb600cadc6f11e2d08bce432e5a32b23e03 Mon Sep 17 00:00:00 2001 From: Shadowfacts Date: Sun, 19 Jul 2020 10:08:53 -0400 Subject: [PATCH] Tweak rule configuration UI --- .../live/filter/filter_rule_live.html.leex | 25 ++++++------------- 1 file changed, 8 insertions(+), 17 deletions(-) diff --git a/lib/frenzy_web/live/filter/filter_rule_live.html.leex b/lib/frenzy_web/live/filter/filter_rule_live.html.leex index 6827022..8b6a035 100644 --- a/lib/frenzy_web/live/filter/filter_rule_live.html.leex +++ b/lib/frenzy_web/live/filter/filter_rule_live.html.leex @@ -1,29 +1,20 @@ -
- <%= f = form_for @rule, "#", [phx_change: :update_rule, phx_target: "##{@parent_id}"] %> +
<%= f = form_for @rule, "#", [phx_change: :update_rule, phx_target: "##{@parent_id}"] %> <%= hidden_input f, :index, value: @index %> -
- -
+
+
<%= select f, :property, @properties, id: "#{@id}-property", class: "custom-select" %>
-
-
- -
+
<%= select f, :mode, @modes, id: "#{@id}-mode", class: "custom-select" %>
-
-
- -
+
<%= text_input f, :param, id: "#{@id}-param", placeholder: if(@rule["mode"] == "contains_string", do: "substring", else: "regex"), class: "form-control text-monospace" %>
-
+
- <%= number_input f, :weight, id: "#{@id}-weight", class: "form-control" %> + <%= number_input f, :weight, id: "#{@id}-weight", class: "form-control" %>
- -
+