Skip to content

Commit

Permalink
Ensure that only metadata profiles in the same institution are shown …
Browse files Browse the repository at this point in the history
…as options
  • Loading branch information
Alex Dolski committed Feb 7, 2024
1 parent 0bd1f31 commit 5dfb728
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
4 changes: 2 additions & 2 deletions app/views/collections/_properties_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@

.mb-3
= f.label :metadata_profile_id, "Metadata Profile"
= f.select :metadata_profile_id, MetadataProfile.where(institution: current_institution).order(:name).pluck(:name, :id),
= f.select :metadata_profile_id, MetadataProfile.where(institution: f.object.institution).order(:name).pluck(:name, :id),
{ include_blank: true }, class: "form-select"
%p.form-text
= icon_for(:info)
Expand All @@ -50,7 +50,7 @@

.mb-3
= f.label :submission_profile_id, "Submission Profile"
= f.select :submission_profile_id, SubmissionProfile.where(institution: current_institution).order(:name).pluck(:name, :id),
= f.select :submission_profile_id, SubmissionProfile.where(institution: f.object.institution).order(:name).pluck(:name, :id),
{ include_blank: true }, class: "form-select"
%p.form-text
= icon_for(:info)
Expand Down
2 changes: 1 addition & 1 deletion app/views/units/_properties_form.html.haml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@

.mb-3
= f.label :metadata_profile_id, "Metadata Profile"
= f.select :metadata_profile_id, MetadataProfile.all.pluck(:name, :id),
= f.select :metadata_profile_id, MetadataProfile.where(institution: f.object.institution).order(:name).pluck(:name, :id),
{ include_blank: true }, class: "form-select"
%p.form-text
= icon_for(:info)
Expand Down

0 comments on commit 5dfb728

Please sign in to comment.