Tweak rule configuration UI
This commit is contained in:
parent
ab105d71ae
commit
93aebeb600
|
@ -1,29 +1,20 @@
|
|||
<div id="<%= @id %>">
|
||||
<%= f = form_for @rule, "#", [phx_change: :update_rule, phx_target: "##{@parent_id}"] %>
|
||||
<div id="<%= @id %>"><%= f = form_for @rule, "#", [phx_change: :update_rule, phx_target: "##{@parent_id}"] %>
|
||||
<%= hidden_input f, :index, value: @index %>
|
||||
<div class="form-group row mb-2">
|
||||
<label class="col-sm-2 col-form-label" for="<%= @id %>-property">Item Property</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="row">
|
||||
<div class="col-3">
|
||||
<%= select f, :property, @properties, id: "#{@id}-property", class: "custom-select" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row mb-2">
|
||||
<label class="col-sm-2 col-form-label" for="<%= @id %>-mode">Mode</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col-3">
|
||||
<%= select f, :mode, @modes, id: "#{@id}-mode", class: "custom-select" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row mb-2">
|
||||
<label class="col-sm-2 col-form-label" for="<%= @id %>-param">Value</label>
|
||||
<div class="col-sm-10">
|
||||
<div class="col">
|
||||
<%= text_input f, :param, id: "#{@id}-param", placeholder: if(@rule["mode"] == "contains_string", do: "substring", else: "regex"), class: "form-control text-monospace" %>
|
||||
</div>
|
||||
</div>
|
||||
<div class="form-group row mb-0">
|
||||
<div class="form-group row mb-0 mt-4">
|
||||
<label class="col-sm-2 col-form-label" for="<%= @id %>-weight">Rule Weight</label>
|
||||
<div class="col-sm-10">
|
||||
<%= number_input f, :weight, id: "#{@id}-weight", class: "form-control" %>
|
||||
<%= number_input f, :weight, id: "#{@id}-weight", class: "form-control" %>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</form></div>
|
||||
|
|
Loading…
Reference in New Issue