<%= form_for( @essence_picture, :url => admin_essence_picture_path(@essence_picture, :options => @options), :remote => true ) do |f| %> <%# Have to use a Hash here, because Rails has a Hash.to_params bug with nested Arrays!!!! %> <%- if @options[:sizes].is_a?(HashWithIndifferentAccess) -%> <%- elsif @options[:sizes] && !@options[:sizes].is_a?(HashWithIndifferentAccess) -%> <%- end -%> <%- if @options[:image_float_selector] -%> <%# Have to use a Hash here, because Rails has a Hash.to_params bug with nested Arrays!!!! %> <%- elsif @options[:css_classes].is_a?(HashWithIndifferentAccess) -%> <%- elsif @options[:css_classes] && !@options[:css_classes].is_a?(HashWithIndifferentAccess) -%> <%- end -%>
<%= f.label "caption", _("image_caption") %> <%- if @options[:caption_as_textarea] -%> <%= f.text_area "caption", :class => 'thin_border' %> <%- else -%> <%= f.text_field "caption", :class => 'thin_border long' %> <%- end -%>
<%= f.label "title", _("image_title") %> <%= f.text_field "title", :class => 'thin_border long' %>
<%= f.label "alt_tag", _("image_alt_tag") %> <%= f.text_field "alt_tag", :class => 'thin_border long' %>
<%= f.label "render_size", _("Size") %> <%= f.select( "render_size", options_for_select( [[_('Layout default'), @options[:image_size]]] + @options[:sizes].sort, @essence_picture.render_size ) ) %>
<%= warning("Did not passed a Hash as sizes option", "Sizes Selector Error. Please provide a Hash.") %>
<%= f.label "css_class", _("align_in_text") %> <%= f.select "css_class", [[_("Layout default"), ""], [_("above"), "no_float"], [_("left"), "left"], [_("right"), "right"]] %>
<%= f.label "css_class", _("Select style") %> <%= f.select("css_class", options_for_select([[_('None'), '']] + @options[:css_classes].sort, @essence_picture.css_class)) %>
<%= warning("Did not passed a Hash as css_classes option", "CSS Class Selector Error. Please provide a Hash.") %>
<%= hidden_field_tag 'content_id', @content.id %> <%= f.button _("save"), :class => 'button' %>
<% end %>