|
@ -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 |
|
|