[#4477] Added a paid field to track when a FixedBudget is spent

This commit is contained in:
Eric Davis
2010-09-22 10:49:36 -07:00
parent f8270498f3
commit d4de581b3c
4 changed files with 20 additions and 1 deletions

View File

@@ -85,6 +85,12 @@
</p>
<%= fixed_budget.text_field(:markup) %>
<p class="inline-hints">
<%= fixed_budget.label(:paid, l(:field_paid), :style => 'display: none;') %><%# Hidden label :| %>
<%= l(:field_paid) %>
</p>
<%= fixed_budget.check_box(:paid) %>
<p class="inline-hints" style="display:none;"><%= fixed_budget.label(:description, l(:field_description), :for => "fixed-description#{fixed_budget.object.object_id}")%></p>
<%= fixed_budget.text_area(:description, :class => 'wiki-edit', :rows => '5', :id => "fixed-description#{fixed_budget.object.object_id}") %>
<%= wikitoolbar_for "fixed-description#{fixed_budget.object.object_id}" %>

View File

@@ -72,3 +72,4 @@ en:
text_flash_deliverable_destroyed: "Deliverable: {{name}} was successfully destroyed."
field_budget: Budget
field_markup: Markup
field_paid: Paid

View File

@@ -0,0 +1,10 @@
class AddPaidToFixedBudgets < ActiveRecord::Migration
def self.up
add_column :fixed_budgets, :paid, :boolean
add_index :fixed_budgets, :paid
end
def self.down
remove_column :fixed_budgets, :paid
end
end

View File

@@ -406,9 +406,11 @@ class DeliverablesEditTest < ActionController::IntegrationTest
# * fixed title
# * fixed budget
# * fixed markup
# * fixed paid checkbox
# * fixed paid hidden field
# * total (hidden)
assert_select ".date-2010-01" do
assert_select "input", :count => 14
assert_select "input", :count => 16
assert_select "textarea.wiki-edit", :count => 1 # Fixed description
end