<% if not request.xhr? %>
<table class="ajax-scaffold" cellpadding="0" cellspacing="0">
  <tbody>
<% end %>
<tr id="<%= "edit-flare-#{@flare.id}" %>" class="edit" <%= "style=\"display: none;\"" if request.xhr? %> >
	<td colspan="<%= num_columns %>">
		<%= form_remote_tag :url => { :controller => 'Feeds', :action => 'update', :id => @flare },
  		                   :loading => "AjaxScaffold.updateOnLoading(request,'flare',#{@flare.id});", 
		                     :success => "AjaxScaffold.updateOnSuccess(request,'flare',#{@flare.id});", 
		                     :failure => "AjaxScaffold.updateOnFailure(request,'flare',#{@flare.id});", 
		                     :html => { :action => url_for(:controller => 'Feeds', :action => 'update', :id => @flare),
		                                :id => "edit-flare-#{@flare.id}-form" } %>
  	  
      <% # Its actually okay to leave both of these elements (ex: form_errors will only generate HTML when in fallback mode) %>
      <% if request.xhr? %>
        <div id="<%= "update-flare-#{@flare.id}-errors" %>" style="display: none;" ></div>
      <% else %>
        <%= render :partial => 'form_errors' %>
      <% end %>
        <div class="red">Edit</div>
        <div class="articles">
  	  <%= render :partial => 'form' %>
  	
  	  <p>
  	  	<%= submit_tag "Update", :class => "submit" %>
  	  	<%= link_to_function "Cancel", "AjaxScaffold.updateOnCancel('flare',#{@flare.id});",
	                              :href => url_for(:controller => 'Feeds', :action => 'return_to_main') %>
  	  	<%= loading_indicator_tag 'flare', "update-#{@flare.id}" %>
  	  </p>
  	<%= end_form_tag %>
  	</div>
	</td>
</tr>
<% if not request.xhr? %>
  </tbody>
</table>
<% end %>