Sha256: bf4195f5e2a5d1eea1759fbd286b1ef5df0b68491e5fa5dbb19e1c4a835a69cf

Contents?: true

Size: 1000 Bytes

Versions: 1

Compression:

Stored size: 1000 Bytes

Contents

ruby:
	form_options = {
		html: {
			multipart: true,
			novalidate: true,
			class: 'js-file-form',
			remote: true,
			data: {
				type: "html",
				form_manager_model: @item.fae_form_manager_model_name,
				form_manager_info: (@form_manager.present? ? @form_manager.to_json : nil)
			}
		}
	}
= simple_form_for([:admin, @item], form_options) do |f|
<% @form_attrs.each do |attr| -%>
  = fae_input f, :<%= attr %>
<% end -%>
<% @attachments.each do |attachment| %>
<% if attachment.type == :image -%>
  = fae_image_form f, :<%= attachment.name -%>
<% elsif attachment.type == :file -%>
  = fae_file_form f, :<%= attachment.name -%>
<% end -%>
<% end -%>
<% if options.polymorphic %>
  = f.hidden_field :<%= @polymorphic_name %>_id
  = f.hidden_field :<%= @polymorphic_name %>_type
<% elsif options.parent_model.present? %>
  = f.hidden_field :<%= options.parent_model.underscore %>_id
<% end -%>

  = f.submit
  = button_tag 'Cancel', type: 'button', class: 'js-cancel-nested cancel-nested-button'

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
fae-rails-2.2.0 lib/generators/fae/templates/views/_form_nested.html.slim