<%= form_for [:admin, @vimeo_video], :url => @url_override || @url, :html => {:multipart => true} do |f| %> <%= render :partial => "/shared/admin/error_messages", :locals => { :object => @vimeo_video, :include_object_name => false } %> <div class='field'> <% if action_name =~ /(edit)|(update)/ %> <p> <%= t('.use_current_vimeo_video') %> <em><%= t('.or') %></em><%= t('.replace_vimeo_video') %> </p> <p> <%= f.file_field :vimeo_video %> </p> <% else %> <% # we must only hint at multiple when it's a new record otherwise update fails. %> <%= f.file_field :vimeo_video, :multiple => true %> <% end %> </div> <div class='field'> <label><%= t('.maximum_vimeo_video_size', :megabytes => VimeoVideo::MAX_SIZE_IN_MB) %></label> </div> <input type='hidden' name='wymeditor' value='<%= params[:wymeditor] %>'> <%= render :partial => "/shared/admin/form_actions", :locals => { :f => f, :continue_editing => false, :hide_cancel => (@app_dialog or action_name == "insert" or from_dialog?), :delete_title => t('delete', :scope => 'admin.vimeo_videos'), :delete_confirmation => t('message', :scope => 'shared.admin.delete', :title => @vimeo_video.title || @vimeo_video.vid) } -%> <% if @app_dialog %> <input type='hidden' name='app_dialog' value='<%= @app_dialog %>' /> <input type='hidden' name='field' value='<%= @field %>' /> <input type='hidden' name='update_vimeo_video' value='<%= @update_vimeo_video %>' /> <input type='hidden' name='thumbnail' value='<%= @thumbnail %>' /> <input type='hidden' name='callback' value='<%= @callback %>' /> <input type='hidden' name='conditions' value='<%= @conditions %>' /> <% end %> <% end %> <% if action_name =~ /(edit)|(update)/ %> <div id='existing_vimeo_video'> <label><%=t('.current_vimeo_video') %></label> <%#= image_fu @vimeo_video.image, '225x255>', :class => "brown_border" %> <%= content_tag :span, @vimeo_video.vid, :class => "brown_border" %> </div> <% end %>