Skip to content

Instantly share code, notes, and snippets.

@pgdaniel
Created September 17, 2013 22:51
Show Gist options
  • Save pgdaniel/6601780 to your computer and use it in GitHub Desktop.
Save pgdaniel/6601780 to your computer and use it in GitHub Desktop.
<%= form_for [:publisher, @site, @single_widget], builder: FoundationFormBuilder, html: { role: "single-widget-form" } do |form| %>
<div role="form">
<%= form.errors_list %>
<%= field_set_tag "Basic Information" do %>
<%= render "publisher/widgets/basic_info_fields", form: form %>
<% end %>
<%= field_set_tag "Advanced Settings" do %>
<%= render "publisher/single_widgets/advanced_info_fields", form: form %>
<% end %>
<a href="" class="button small radius" role="add_another_video">+ Add Another Video</a>
<ul role="nested-video-fields" class="">
<%= form.fields_for @single_widget.videos do |video_fields| %>
<li>
<%= video_fields.text_field :filename %>
<a href="#" class="destroy">×</a>
</li>
<% end %>
</ul>
</div>
<%= form.submit "Save", class: "button", role: "save" %>
<%= form.submit "Save & Preview", class: "button secondary", role: "save" %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment