Sha256: eda90f666126ee24afd0851e0a1a7e909c8eb18e49ff4c37bfec1c241236f541

Contents?: true

Size: 1.86 KB

Versions: 2

Compression:

Stored size: 1.86 KB

Contents

<% if type == :select %>
  <%= render partial: 'active_element/components/form/select',
             locals: { form_id: id, form: form, field: field, options: options, component: component } %>
<% elsif type == :check_boxes %>
  <%= render partial: 'active_element/components/form/check_boxes',
             locals: { form_id: id, form: form, field: field, options: options, component: component } %>
<% elsif type == :json_field %>
  <%= render partial: 'active_element/components/form/json',
             locals: { form_id: id, form: form, field: field, field_id: ActiveElement.element_id, options: options, component: component } %>
<% elsif type == :text_search_field %>
  <%= render partial: 'active_element/components/form/text_search',
             locals: { form_id: id, form: form, field: field, options: options, component: component } %>
<% elsif type == :check_box %>
  <%= render partial: 'active_element/components/form/check_box',
             locals: { form_id: id, form: form, field: field, type: type, options: options, component: component } %>
<% elsif type == :text_area %>
  <%= render partial: 'active_element/components/form/text_area',
             locals: { form_id: id, form: form, field: field, type: type, options: options, component: component } %>
<% elsif type == :datetime_range_field %>
  <%= render partial: 'active_element/components/form/datetime_range_field',
             locals: { form_id: id, form: form, field: field, type: type, options: options, component: component } %>
<% else %>
  <%= render partial: 'active_element/components/form/generic_field',
             locals: { form_id: id, form: form, field: field, type: type, options: options, component: component } %>
<% end %>

<% unless component.valid?(field) %>
  <p class="text-danger pt-1 m-0 validation-error-message">
    <%= record.errors.full_messages_for(field).join(', ') %>
  </p>
<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
active_element-0.0.12 app/views/active_element/components/form/_field.html.erb
active_element-0.0.11 app/views/active_element/components/form/_field.html.erb