<%= l(:label_spent_costs) %>

<% labelled_tabular_form_for :cost_entry, @cost_entry, :url => {:action => 'edit', :project_id => @cost_entry.project} do |f| %> <%= error_messages_for 'cost_entry' %> <%= back_url_hidden_field_tag %>

<%= f.text_field :issue_id, :size => 6, :required => true %> <%= h("#{@cost_entry.issue.tracker.name} ##{@cost_entry.issue.id}: #{@cost_entry.issue.subject}") if @cost_entry.issue %>

<%= f.text_field :spent_on, :size => 10, :required => true %><%= calendar_for('cost_entry_spent_on') %>

<% if User.current.allowed_to? :book_costs, @project %>

<%= f.select :user_id, user_collection_for_select_options, :required => true%>

<% end %>

<%= f.select :cost_type_id, cost_types_collection_for_select_options, :required => true %>

<%= f.text_field :units, :size => 6, :required => true %> <%= render :partial => "cost_type_unit_plural", :locals => {:cost_type => @cost_entry.cost_type} %> <%= observe_field ('cost_entry_cost_type_id', :update => 'cost_type_unit_plural', :url => {:action => :get_cost_type_unit_plural}, :with => :cost_type_id) %>

<%= f.text_field :comments, :size => 100 %>

<%= submit_tag l(:button_save) %> <% end %>