Sha256: 7c3f1357784bb12cc953cfb63b294ae5db2a1a1e9204a481f2eb797099e2df5e

Contents?: true

Size: 1.63 KB

Versions: 2

Compression:

Stored size: 1.63 KB

Contents

<%# - - - - - - - - - - - - %>
<%# TEXT / STRING           %>
<%# - - - - - - - - - - - - %>
<% if repeater_setting_child.field_type == 'text' || repeater_setting_child.field_type == 'string' %>
  <% current = repeater.find_or_create_a_field_by( repeater_setting_child.id, 'text' ) %>
  <%= f.simple_fields_for "texts_attributes[]", current do |ff| %>
    <%= render 'form_item_text', ff: ff, field_setting: repeater_setting_child %>
  <% end %>


<%# - - - - - - - - - - - - %>
<%# DATE                    %>
<%# - - - - - - - - - - - - %>
<% elsif repeater_setting_child.field_type == 'date' %>
  <% current = repeater.find_or_create_a_field_by( repeater_setting_child.id, 'date' ) %>
  <%= f.simple_fields_for "dates_attributes[]", current do |ff| %>
    <%= render 'form_item_date', ff: ff, field_setting: repeater_setting_child %>
  <% end %>


<%# - - - - - - - - - - - - %>
<%# ASSET                   %>
<%# - - - - - - - - - - - - %>
<% elsif repeater_setting_child.field_type == 'asset' %>
  <% current = repeater.find_or_create_a_field_by( repeater_setting_child.id, 'asset' ) %>
  <%= f.simple_fields_for "assets_attributes[]", current do |ff| %>
    <%= render 'form_item_asset', ff: ff, field_setting: repeater_setting_child %>
  <% end %>


<%# - - - - - - - - - - - - %>
<%# RADIO                   %>
<%# - - - - - - - - - - - - %>
<% elsif repeater_setting_child.field_type == 'radio' %>
  <% current = repeater.find_or_create_a_field_by( repeater_setting_child.id, 'radio' ) %>
  <%= f.simple_fields_for "radios_attributes[]", current do |ff| %>
    <%= render 'form_item_radio', ff: ff, field_setting: repeater_setting_child %>
  <% end %>


<% end %>

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
binda-0.0.6 app/views/binda/components/_form_section_repeater.html.erb
binda-0.0.5 app/views/binda/components/_form_section_repeater.html.erb