[#4181] Add a total field to deliverables.
This commit is contained in:
1 parent
7efaf8dbe2
commit
ae8c75a051
6 files changed
+47
-1
No files matched your search
@@ -16,6 +16,14 @@ class Deliverable < ActiveRecord::Base
|
||||
''
|
||||
end
|
||||
|
||||
def total=(v)
|
||||
if v.is_a? String
|
||||
write_attribute(:total, v.gsub(/[$ ,]/, ''))
|
||||
else
|
||||
write_attribute(:total, v)
|
||||
end
|
||||
end
|
||||
|
||||
if Rails.env.test?
|
||||
generator_for :title, :method => :next_title
|
||||
|
||||
|
||||
@@ -5,6 +5,8 @@
|
||||
<%= 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'} %>
|
||||
|
||||
<%= form.input :total, :input_html => {:size => 10} %>
|
||||
<% end %>
|
||||
<% form.buttons do %>
|
||||
<%= form.commit_button :label => l(:button_save) %>
|
||||
|
||||
Reference in new issue
Block a user