Sha256: 666a1bc5af3d32f6f2764634f8424f2bc2258030dbcc59b82b453236792ba4a3
Contents?: true
Size: 1.64 KB
Versions: 2
Compression:
Stored size: 1.64 KB
Contents
<%# - - - - - - - - - - - - %> <%# TEXT / STRING %> <%# - - - - - - - - - - - - %> <% if field_setting.field_type == 'text' || field_setting.field_type == 'string' %> <% current = @component.find_or_create_a_field_by( field_setting.id, 'text' ) %> <%= f.simple_fields_for "texts_attributes[]", current do |ff| %> <%= render 'form_item_text', ff: ff, field_setting: field_setting %> <% end %> <%# - - - - - - - - - - - - %> <%# DATE %> <%# - - - - - - - - - - - - %> <% elsif field_setting.field_type == 'date' %> <% current = @component.find_or_create_a_field_by( field_setting.id, 'date' ) %> <%= f.simple_fields_for "dates_attributes[]", current do |ff| %> <%= render 'form_item_date', ff: ff, field_setting: field_setting %> <% end %> <%# - - - - - - - - - - - - %> <%# ASSET %> <%# - - - - - - - - - - - - %> <% elsif field_setting.field_type == 'asset' %> <% current = @component.find_or_create_a_field_by( field_setting.id, 'asset' ) %> <%= f.simple_fields_for "assets_attributes[]", current do |ff| %> <%= render 'form_item_asset', ff: ff, field_setting: field_setting %> <% end %> <%# - - - - - - - - - - - - %> <%# REPEATER %> <%# - - - - - - - - - - - - %> <% elsif field_setting.field_type == 'repeater' %> <% repeaters = @component.repeaters.where( field_setting: field_setting ).order('position') %> <%= render 'form_item_repeater', f: f, repeater_setting: field_setting, repeaters: repeaters %> <% elsif ['radio', 'select', 'checkbox'].include? field_setting.field_type %> <%= render 'form_item_selectable', f: f, field_setting: field_setting %> <% end %>
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
binda-0.0.6 | app/views/binda/components/_form_section.html.erb |
binda-0.0.5 | app/views/binda/components/_form_section.html.erb |