<%= form_with(model: [ condition.filter, condition ], data: { controller: "reset_form", action: "turbo:submit-end->reset_form#reset" }) do |form| %> <%= render(FormErrorsComponent.new(errors: condition.errors)) do %> <%= pluralize(condition.errors.count, "error") %> prohibited this condition from being saved: <% end if condition.errors.any? %>
Enabled?
<%= form.radio_button :enabled, true, class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300" %>
<%= form.label :enabled_true, "Yes", class: "font-medium text-gray-700" %>
<%= form.radio_button :enabled, false, class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300" %>
<%= form.label :enabled_false, "No", class: "font-medium text-gray-700" %>
Property type
<%= form.radio_button :property_type, "header", class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300" %>
<%= form.label :property_type_header, "Header", class: "font-medium text-gray-700" %>
<%= form.radio_button :property_type, "body", class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300" %>
<%= form.label :property_type_body, "Body", class: "font-medium text-gray-700" %>
<%= form.label :property_value, class: "block text-sm font-medium text-gray-700" %> <%= form.text_field :property_value, class: "mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" %>
<%= form.label :test_method, class: "block text-sm font-medium text-gray-700" %> <%= form.select :test_method, I18n.t("condition.test_methods").map { |key, value| [value, key] }, {}, class: "mt-1 block w-full py-2 px-3 border border-gray-300 bg-white rounded-md shadow-sm focus:outline-none focus:ring-indigo-500 focus:border-indigo-500 sm:text-sm" %>
<%= form.label :test_value, class: "block text-sm font-medium text-gray-700" %> <%= form.text_field :test_value, class: "mt-1 focus:ring-indigo-500 focus:border-indigo-500 block w-full shadow-sm sm:text-sm border-gray-300 rounded-md" %>
Inverted?
<%= form.radio_button :inverted, true, class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300" %>
<%= form.label :inverted_true, "Yes", class: "font-medium text-gray-700" %>
<%= form.radio_button :inverted, false, class: "focus:ring-indigo-500 h-4 w-4 text-indigo-600 border-gray-300" %>
<%= form.label :inverted_false, "No", class: "font-medium text-gray-700" %>
<%= form.submit class: "inline-flex justify-center py-2 px-4 border border-transparent shadow-sm text-sm font-medium rounded-md text-white bg-indigo-600 hover:bg-indigo-700 focus:outline-none focus:ring-2 focus:ring-offset-2 focus:ring-indigo-500" %>
<% end %>