<span class="errors">
<%= error_messages_for("todo") %>
</span>
<% this_year = user_time.to_date.strftime("%Y").to_i -%>
<p><label for="done">Done?</label></p>
<p><%= check_box_tag("done", 1, @todo && @todo.completed?, "tabindex" => 1) %></p>
<p><label for="todo_description">Next action</label></p>
<p><%= text_field( "todo", "description", "tabindex" => 2) %></p>
<p><label for="todo_notes">Notes</label></p>
<p><%= text_area( "todo", "notes", "cols" => 30, "rows" => 5, "tabindex" => 3) %></p>
<p><label for="todo_context_id">Context</label></p>
<p><%= collection_select( "todo", "context_id", @contexts, "id", "name", {"tabindex" => 4} ) %></p> <p><label for="todo_project_id">Project</label></p>
<p><%= collection_select( "todo", "project_id", @projects, "id", "name",
                          {:include_blank => true}, {"tabindex" => 5} ) %></p>
<p><label for="todo_due">Due</label></p>
<p><%= date_select("todo", "due", :order => [:day, :month, :year],
                    :start_year => this_year, :include_blank => true) %></p>
<p><label for="todo_show_from">Show from</label></p>
<p><%= date_select("todo", "show_from", :order => [:day, :month, :year], 
                    :start_year => this_year, :include_blank => true) %></p>
