From 5b098a43e57bbacc1a1f9f3915152d493043c06c Mon Sep 17 00:00:00 2001 From: Eric Davis Date: Thu, 1 Jul 2010 15:35:28 -0700 Subject: [PATCH] [#4181] Added warranty and feature signoff fields. --- app/views/deliverables/_form.html.erb | 11 +++++++++++ config/locales/en.yml | 2 ++ test/integration/deliverables_edit_test.rb | 4 ++++ 3 files changed, 17 insertions(+) diff --git a/app/views/deliverables/_form.html.erb b/app/views/deliverables/_form.html.erb index 686a985..8be58ab 100644 --- a/app/views/deliverables/_form.html.erb +++ b/app/views/deliverables/_form.html.erb @@ -6,6 +6,17 @@ <%= 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? %> +
  • + <%= label('deliverable', 'feature_sign_off') %> + <%= check_box 'deliverable', 'feature_sign_off' %> +
  • +
  • + <%= label('deliverable', 'warranty_sign_off') %> + <%= check_box 'deliverable', 'warranty_sign_off' %> +
  • + <% end %> + <%= form.input :total, :input_html => {:size => 10} %> <% end %> <% form.buttons do %> diff --git a/config/locales/en.yml b/config/locales/en.yml index ff70c7d..446f260 100644 --- a/config/locales/en.yml +++ b/config/locales/en.yml @@ -27,3 +27,5 @@ en: field_overhead: Overhead field_fixed: Fixed field_total: Total + field_feature_sign_off: Feature Sign Off + field_warranty_sign_off: Warranty Sign Off diff --git a/test/integration/deliverables_edit_test.rb b/test/integration/deliverables_edit_test.rb index 9e82483..52fa32f 100644 --- a/test/integration/deliverables_edit_test.rb +++ b/test/integration/deliverables_edit_test.rb @@ -26,12 +26,16 @@ class DeliverablesEditTest < ActionController::IntegrationTest end fill_in "Title", :with => 'An updated title' + check "Feature Sign Off" + check "Warranty Sign Off" click_button "Save" assert_response :success assert_template 'contracts/show' assert_equal "An updated title", @deliverable.reload.title + assert @deliverable.reload.warranty_sign_off? + assert @deliverable.reload.feature_sign_off? end end