mirror of
https://github.com/fspc/BikeShed-1.git
synced 2025-02-28 16:53:23 -05:00
Needed to add task_list_id as attr_accessible
Also improved labels for adding task
This commit is contained in:
parent
2a6e10ee9d
commit
a11f5a1b91
@ -29,13 +29,14 @@ class Tasks < Netzke::Basepack::Grid
|
|||||||
end
|
end
|
||||||
|
|
||||||
def default_fields_for_forms
|
def default_fields_for_forms
|
||||||
fields = []
|
bike = Bike.find_by_id(session[:selected_bike_id])
|
||||||
fields << { :no_binding => true, :xtype => 'displayfield', :fieldLabel => "No Bike Selected", :value => "Select a Bike First!"}
|
bike = "Select a Bike First!" if bike.nil?
|
||||||
fields.concat( [
|
[
|
||||||
|
{ :no_binding => true, :xtype => 'displayfield', :fieldLabel => "Bike Selected", :value => "#{bike.to_s}"},
|
||||||
:done,
|
:done,
|
||||||
:task,
|
:task,
|
||||||
:notes
|
:notes,
|
||||||
])
|
]
|
||||||
end
|
end
|
||||||
|
|
||||||
#override with nil to remove actions
|
#override with nil to remove actions
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
class Task < ActiveRecord::Base
|
class Task < ActiveRecord::Base
|
||||||
attr_accessible :task, :notes, :done
|
attr_accessible :task, :notes, :done, :task_list_id
|
||||||
|
|
||||||
belongs_to :task_list
|
belongs_to :task_list
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user