<%= render :partial => 'context_state_group', :object => @active_contexts, :locals => { :state => 'active', :no_contexts => @no_active_contexts} %> <%= render :partial => 'context_state_group', :object => @hidden_contexts, :locals => { :state => 'hidden', :no_contexts => @no_hidden_contexts} %>
« Hide form <% apply_behavior '#toggle_context_new a:click', :prevent_default => true do |page| page << "TracksForm.toggle('toggle_context_new', 'context_new', 'context-form', '« Hide form', 'Hide new context form', 'Create a new context »', 'Add a context');" end %>
<% form_remote_tag( :url => contexts_path, :method => :post, :html=> { :id => 'context-form', :name => 'context', :class => 'inline-form'}, :before => "$('context_new_submit').startWaiting()", :complete => "$('context_new_submit').stopWaiting()", :condition => "!$('context_new_submit').isWaiting()") do -%>
<%= error_messages_for('context') %>

<%= text_field( "context", "name" ) %>
<%= check_box( "context", "hide" ) %>


<% end -%>
<% sortable_element 'list-contexts-active', get_listing_sortable_options sortable_element 'list-contexts-hidden', get_listing_sortable_options -%>