<% @todo = nil @initial_context_name = @context.name unless @context.nil? @initial_context_name ||= @project.default_context.name unless @project.nil? || @project.default_context.nil? @initial_context_name ||= current_user.contexts.first.name unless current_user.contexts.first.nil? @initial_project_name = @project.name unless @project.nil? -%>
« Hide form
<% form_remote_tag( :url => todos_path, :method => :post, :html=> { :id=>'todo-form-new-action', :name=>'todo', :class => 'inline-form' }, :before => "$('#todo_new_action_submit').block({message:null})", :complete => "$('#todo_new_action_submit').unblock()", :condition => "askIfNewContextProvided()") do -%>
<%= error_messages_for("item", :object_name => 'action') %>
<%= text_field( "todo", "description", "size" => 30, "tabindex" => 1, "maxlength" => 100, "autocomplete" => "off") %> <%= text_area( "todo", "notes", "cols" => 29, "rows" => 6, "tabindex" => 2) %> <%= text_field_tag "tag_list", @default_tags, :size => 30, :tabindex => 5 %> <%= content_tag("div", "", :id => "tag_list_auto_complete", :class => "auto_complete") %>
<%= text_field("todo", "due", "size" => 12, "class" => "Date", "tabindex" => 6, "autocomplete" => "off") %>
<%= text_field("todo", "show_from", "size" => 12, "class" => "Date", "tabindex" => 7, "autocomplete" => "off") %>
<%= text_field_tag "predecessor_list", nil, :size => 30, :tabindex => 8 %> <%= content_tag("div", "", :id => "predecessor_list_auto_complete", :class => "auto_complete") %> <%= auto_complete_field 'predecessor_list', { :url => {:controller => 'todos', :action => 'auto_complete_for_predecessor', :id => nil}, :tokens => [','] } %> <%= source_view_tag( @source_view ) %> <%= hidden_field_tag :_tag_name, @tag_name.underscore.gsub(/\s+/,'_') if source_view_is :tag %>
<% end -%>