|
|
|
@ -81,7 +81,7 @@ module WorkPackagesHelper |
|
|
|
|
def work_package_form_top_attributes(form, work_package, locals = {}) |
|
|
|
|
[ |
|
|
|
|
work_package_form_type_attribute(form, work_package, locals), |
|
|
|
|
work_package_form_type_attribute(form, work_package, locals), |
|
|
|
|
work_package_form_planning_element_type_attribute(form, work_package, locals), |
|
|
|
|
work_package_form_subject_attribute(form, work_package, locals), |
|
|
|
|
work_package_form_parent_attribute(form, work_package, locals), |
|
|
|
|
work_package_form_description_attribute(form, work_package, locals) |
|
|
|
@ -205,15 +205,15 @@ module WorkPackagesHelper |
|
|
|
|
field = form.select :type_id, locals[:project].types.collect {|t| [t.name, t.id]}, :required => true |
|
|
|
|
|
|
|
|
|
field += observe_field :work_package_type_id, :url => new_type_project_work_packages_path(locals[:project]), |
|
|
|
|
:update => :attributes, |
|
|
|
|
:method => :get, |
|
|
|
|
:with => "Form.serialize('work_package-form')" |
|
|
|
|
:update => :attributes, |
|
|
|
|
:method => :get, |
|
|
|
|
:with => "Form.serialize('work_package-form')" |
|
|
|
|
|
|
|
|
|
WorkPackageAttribute.new(:type, field) |
|
|
|
|
end |
|
|
|
|
end |
|
|
|
|
|
|
|
|
|
def work_package_form_type_attribute(form, work_package, locals = {}) |
|
|
|
|
def work_package_form_planning_element_type_attribute(form, work_package, locals = {}) |
|
|
|
|
if work_package.is_a?(PlanningElement) |
|
|
|
|
field = form.select :planning_element_type_id, |
|
|
|
|
(locals[:project].planning_element_types.collect { |m| [m.name, m.id] }), |
|
|
|
|