<%= form_for( @essence_picture, :url => alchemy.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" %> <%- if @options[:caption_as_textarea] -%> <%= f.text_area "caption", :class => 'thin_border' %> <%- else -%> <%= f.text_field "caption", :class => 'thin_border' %> <%- end -%>
<%= f.label "title" %> <%= f.text_field "title", :class => 'thin_border' %>
<%= f.label "alt_tag" %> <%= f.text_field "alt_tag", :class => 'thin_border' %>
<%= f.label "render_size" %> <%= f.select( "render_size", options_for_select( [[t('Layout default'), @options[:image_size]]] + @options[:sizes].sort, @essence_picture.render_size ), :class => 'alchemy_selectbox' ) %>
<%= warning("Did not passed a Hash as sizes option", "Sizes Selector Error. Please provide a Hash.") %>
<%= f.label "css_class" %> <%= f.select "css_class", [[t("Layout default"), ""], [t("above"), "no_float"], [t("left"), "left"], [t("right"), "right"]], :class => 'alchemy_selectbox' %>
<%= f.label "css_class" %> <%= f.select("css_class", options_for_select([[t('None'), '']] + @options[:css_classes].sort, @essence_picture.css_class), :class => 'alchemy_selectbox') %>
<%= 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 t("save"), :class => 'button' %>
<% end %>