[#4477] Added a paid field to track when a FixedBudget is spent
This commit is contained in:
@@ -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}" %>
|
||||
|
||||
@@ -72,3 +72,4 @@ en:
|
||||
text_flash_deliverable_destroyed: "Deliverable: {{name}} was successfully destroyed."
|
||||
field_budget: Budget
|
||||
field_markup: Markup
|
||||
field_paid: Paid
|
||||
|
||||
10
db/migrate/017_add_paid_to_fixed_budgets.rb
Normal file
10
db/migrate/017_add_paid_to_fixed_budgets.rb
Normal 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
|
||||
@@ -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
|
||||
|
||||
|
||||
Reference in New Issue
Block a user