<%= error_messages_for 'deliverable' %>

<%= f.text_field :subject, :required => true %>

<%= f.text_area :description, :cols => 60, :rows => (@deliverable.description.blank? ? 10 : [[10, @deliverable.description.length / 50].max, 100].min), :accesskey => accesskey(:edit), :class => 'wiki-edit' %>

<%= f.text_field :due, :size => 10 %><%= calendar_for('deliverable_due') %>

<%= f.check_box(:project_manager_signoff) %>

<%= f.check_box(:client_signoff) %>

<%= field_with_budget_observer_and_totals(f, @deliverable, :overhead, :overhead_percent, @settings[:budget_non_billable_overhead]) %> <%= field_with_budget_observer_and_totals(f, @deliverable, :materials, :materials_percent, @settings[:budget_materials]) %> <%= field_with_budget_observer_and_totals(f, @deliverable, :profit, :profit_percent, @settings[:budget_profit]) %>
<%= check_box(:deliverable, :type, {}, FixedDeliverable.name, HourlyDeliverable.name) %> <%= observe_field('deliverable_type', :function => "new Budget.changeType();") %>
<%= text_field :deliverable, :cost_per_hour, :size => 7 %>
<%= text_field :deliverable, :total_hours, :size => 7 %> <%= content_tag(:span, 0, :class => "budget-calculation", :id => 'variableCost') %>
<%= content_tag(:span, 0, :id => 'total-budget-calculation', :class => "budget-calculation") %>
<%= f.hidden_field :budget %> <%= observe_form('deliverable-form', :function => "new Budget.updateAmounts();", :on => 'blur') %>
<%= mode == :create ? submit_tag(l(:button_create)) : submit_tag(l(:button_update)) %> <%= link_to_remote l(:label_preview), { :url => { :controller => 'deliverables', :action => 'preview', :id => @project }, :method => 'post', :update => 'preview', :with => "Form.serialize('deliverable-form')", :complete => "Element.scrollTo('preview')" }, :accesskey => accesskey(:preview) %> <%# Same as `wikitoolbar_for 'deliverable_description'` but without the help link %> <%= javascript_include_tag('jstoolbar/jstoolbar') %> <%= javascript_include_tag("jstoolbar/lang/jstoolbar-#{current_language}") %> <%= javascript_tag("var toolbar = new jsToolBar($('deliverable_description'));toolbar.draw();") %>
<% content_for :header_tags do %> <% end %>