Files
redmine_contracts/app/views/deliverables/_form.html.erb
T

32 lines
1.5 KiB
ERB

<% form.inputs do %>
<%= form.input :title, :required => true %>
<% if resource.new_record? %>
<%= form.input(:type, :required => true, :as => :select, :collection => [["Fixed", "FixedDeliverable"],["Hourly", "HourlyDeliverable"]], :include_blank => false, :input_html => {:class => 'type'}) %>
<% else %>
<%= form.input :type, :as => :hidden, :class => 'type' %>
<% end %>
<%= form.input :manager, :required => true, :collection => @project.users %>
<%= form.input :start_date, :as => :string, :input_html => {:size => 10}, :hint => calendar_for('deliverable_start_date') %>
<%= form.input :end_date, :as => :string, :input_html => {:size => 10}, :hint => calendar_for('deliverable_end_date') %>
<%= form.input :notes, :input_html => {:class => 'wiki-edit', :rows => '5'} %>
<% unless resource.new_record? %>
<li class="boolean optional">
<%= label(resource.class.to_s.underscore, 'feature_sign_off') %>
<%= check_box resource.class.to_s.underscore, 'feature_sign_off' %>
</li>
<li class="boolean optional">
<%= label(resource.class.to_s.underscore, 'warranty_sign_off') %>
<%= check_box resource.class.to_s.underscore, 'warranty_sign_off' %>
</li>
<% end %>
<%= form.input :total, :input_html => {:size => 10}, :wrapper_html => {:class => 'deliverable_total_input'} %>
<% end %>
<% form.buttons do %>
<%= form.commit_button :label => l(:button_save) %>
<%= link_to(l(:button_cancel), cancel_path) %>
<% end %>
<%= wikitoolbar_for resource.to_underscore + '_notes' %>