Skip to content

Commit

Permalink
🐛 Fix parser field visibility on importer edit form
Browse files Browse the repository at this point in the history
The form initialization check was previously only looking for new forms
(#new_importer), causing the JavaScript field visibility logic to be
skipped entirely on edit pages. This meant parser-specific fields weren't
being properly hidden/shown when editing existing importers.

Added .edit_importer to the form check to ensure the field visibility
logic runs on both new and edit forms.
  • Loading branch information
Shana Moore committed Jan 17, 2025
1 parent f76a6bd commit 2356df2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/assets/javascripts/bulkrax/importers.js.erb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// All this logic will automatically be available in application.js.

function prepBulkrax(event) {
if($('form#new_importer').length < 1) {
if($('form#new_importer, form.edit_importer').length < 1) {
return true;
}

Expand Down

0 comments on commit 2356df2

Please sign in to comment.