mirror of
https://github.com/TracksApp/tracks.git
synced 2026-01-27 03:06:11 +01:00
git-svn-id: http://www.rousette.org.uk/svn/tracks-repos/trunk@87 a4c988fc-2ded-0310-b66e-134b36920a42
58 lines
No EOL
2.2 KiB
Text
58 lines
No EOL
2.2 KiB
Text
<%
|
|
@item = action_edit_form
|
|
%>
|
|
<!-- %= error_messages_for 'item' % -->
|
|
<%= hidden_field( "item", "id" ) %>
|
|
<table>
|
|
<tr>
|
|
<td class="label"><label for="item_description">Next action</label></td>
|
|
<td><%= text_field( "item", "description", "tabindex" => 1 ) %></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><label for="item_notes">Notes</label></td>
|
|
<td><%= text_area( "item", "notes", "cols" => 20, "rows" => 5, "tabindex" => 2 ) %></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><label for="item_context_id">Context</label></td>
|
|
<td><select name="item[context_id]" id="item_context_id" tabindex="3">
|
|
<% for @place in @places %>
|
|
<% if @item %>
|
|
<% if @place.id == @item.context_id %>
|
|
<option value="<%= @place.id %>" selected="selected"><%= @place.name %></option>
|
|
<% else %>
|
|
<option value="<%= @place.id %>"><%= @place.name %></option>
|
|
<% end %>
|
|
<% else %>
|
|
<option value="<%= @place.id %>"><%= @place.name %></option>
|
|
<% end %>
|
|
<% end %>
|
|
</select></td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><label for="item_project_id">Project</label></td>
|
|
<td>
|
|
<select name="item[project_id]" id="item_project_id" tabindex="4">
|
|
<% if !@item.project_id? %>
|
|
<option selected="selected"></option>
|
|
<%= options_from_collection_for_select(@projects, "id", "name") %>
|
|
<% else %>
|
|
<option></option>
|
|
<%= options_from_collection_for_select(@projects, "id", "name", @item.project_id) %>
|
|
<% end %>
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
<tr>
|
|
<td class="label"><label for="item_due">Due</td>
|
|
<td><input name="item[due]" id="due_<%= @item.id %>" type="text" value="<%= format_date(@item.due) %>" tabindex="5" size="10" onFocus="Calendar.setup" /></td>
|
|
</tr>
|
|
<tr>
|
|
<td><input type="submit" value="Update" tabindex="6" />
|
|
<a href="javascript:void(0);" onclick="Element.toggle('item-<%= @item.id %>','action-<%= @item.id %>-edit-form');Form.reset('form-action-<%= @item.id %>');">Cancel</a></td>
|
|
</tr>
|
|
</table>
|
|
<script type="text/javascript">
|
|
Calendar.setup({ ifFormat:"<%= ApplicationController::DATE_FORMAT %>",firstDay:<%= ApplicationController::WEEK_STARTS_ON %>,showOthers:true,range:[2004, 2010],step:1,inputField:"due_<%= @item.id %>",cache:true,align:"TR" })
|
|
</script>
|
|
|
|
<% @item = nil %> |