diff --git a/app/controllers/isa_studies_controller.rb b/app/controllers/isa_studies_controller.rb index 37bf15b36e..0a1c69711b 100644 --- a/app/controllers/isa_studies_controller.rb +++ b/app/controllers/isa_studies_controller.rb @@ -88,7 +88,7 @@ def study_params [:title, :description, :experimentalists, :investigation_id, { sop_ids: [] }, *creator_related_params, :position, { scales: [] }, { publication_ids: [] }, { discussion_links_attributes: %i[id url label _destroy] }, - { custom_metadata_attributes: determine_custom_metadata_keys }] + { custom_metadata_attributes: determine_custom_metadata_keys(:study) }] end def sample_type_params(params, field) diff --git a/app/views/isa_studies/_form.html.erb b/app/views/isa_studies/_form.html.erb index d8f09224b9..12c8af88ad 100644 --- a/app/views/isa_studies/_form.html.erb +++ b/app/views/isa_studies/_form.html.erb @@ -13,7 +13,8 @@ <%= study_fields.text_area :description, :rows=>5, :class=>"form-control rich-text-edit" %> - <%= render partial: 'custom_metadata/custom_metadata_type_selection', locals:{f:f, resource:@isa_study.study} %> + <%= render partial: 'custom_metadata/custom_metadata_type_selection', locals:{f:study_fields, resource:@isa_study.study} %> + <%= render partial: 'custom_metadata/custom_metadata_attribute_input', locals:{f:study_fields,resource:@isa_study.study, parent_resource: "isa_study"} %> <% unless @isa_study.study.experimentalists.blank? %>
The following <%= t(:sop).pluralize %> are associated with this <%= t(:study) %>:
- + <%= study_fields.fancy_multiselect :sops, { other_projects_checkbox: true, name: "isa_study[study][sop_ids]" } %> - + <% end %> <%= folding_panel("Define #{t(:sample_type)} for Sample") do %> <%= render partial: 'sample_types_form', locals: {f: f, sample_type: @isa_study.sample_collection, id_suffix: "_sample_collection_sample_type", action: action } if @isa_study.sample_collection %> <% end %> -<% end -%> +<% end -%> + - <%= form_submit_buttons(@isa_study.study) %>