[#4180] Hide the total field on Hourly forms.

This commit is contained in:
Eric Davis
2010-07-02 12:08:13 -07:00
parent 5074667b28
commit 6f204fff5a
6 changed files with 20 additions and 12 deletions
+6 -2
View File
@@ -1,6 +1,10 @@
<% form.inputs do %>
<%= form.input :title, :required => true %>
<%= form.input(:type, :required => true, :as => :select, :collection => [["Fixed", "FixedDeliverable"],["Hourly", "HourlyDeliverable"]], :include_blank => false) if resource.new_record? %>
<% 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') %>
@@ -17,7 +21,7 @@
</li>
<% end %>
<%= form.input :total, :input_html => {:size => 10} %>
<%= form.input :total, :input_html => {:size => 10}, :wrapper_html => {:class => 'deliverable_total_input'} %>
<% end %>
<% form.buttons do %>
<%= form.commit_button :label => l(:button_save) %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= content_tag(:h2, h(resource.title)) %>
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverable_path(@project, @contract, resource), :html => {:class => 'tabular'} do |form| %>
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverable_path(@project, @contract, resource), :html => {:class => 'deliverable tabular'} do |form| %>
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, @contract)} %>
<% end %>
+1 -1
View File
@@ -1,5 +1,5 @@
<%= content_tag(:h2, l(:text_new_deliverable)) %>
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverables_path(@project, @contract), :html => {:class => 'tabular'} do |form| %>
<% semantic_form_for [@project, @contract, resource], :url => contract_deliverables_path(@project, @contract), :html => {:class => 'deliverable tabular'} do |form| %>
<%= render :partial => 'form', :object => form, :locals => {:cancel_path => contract_path(@project, @contract)} %>
<% end %>