Skip to content

fix(fundingrequests): run journal/publisher search on Enter in DOI type-change forms - #276

Open
fjen wants to merge 4 commits into
coda-oa:developfrom
fjen:fix/doi-import-search-submission
Open

fix(fundingrequests): run journal/publisher search on Enter in DOI type-change forms#276
fjen wants to merge 4 commits into
coda-oa:developfrom
fjen:fix/doi-import-search-submission

Conversation

@fjen

@fjen fjen commented Aug 21, 2026

Copy link
Copy Markdown
Collaborator

Pressing Enter in the journal or publisher search field submitted the enclosing form instead of triggering the HTMX search. For the article form this posted doi_preview_apply_type_change, which could apply the type change with a stale or unselected journal.

Change:

  • Suppress the forms' own submission (onsubmit="return false") and drop the article form's hx-post/action
  • Move the wizard_find_journal / wizard_find_publisher HTMX trigger from the Search button to the fieldset, so both Enter in the input and clicking the button run the search

Dialog in focus:
image

Comment thread src/coda/apps/templates/fundingrequests/partials/doi_type_change_to_article.html Outdated
@fjen
fjen force-pushed the fix/doi-import-search-submission branch 2 times, most recently from 9c108c8 to ece7d97 Compare September 2, 2026 09:24
fjen added 3 commits September 2, 2026 11:57
…pe-change forms

Pressing Enter in the journal or publisher search field submitted the
enclosing form instead of triggering the HTMX search. For the article
form this posted doi_preview_apply_type_change, which could apply the
type change with a stale or unselected journal. Form is now moved to
include just the selected search result.
…odal

Publisher radios in the DOI modal posted clear_publisher_error and
targeted #publisher-error, which only exists in the wizard step, so
htmx aborted every selection with a targetError.
Now mirroring doi_journal_row.html on the journal side.
The identifying column is now a <label for> of each row's radio, so
clicking a title/name selects the row and screen readers announce the
entity instead of an unnamed control.
@fjen
fjen force-pushed the fix/doi-import-search-submission branch from ece7d97 to d4bdabc Compare September 2, 2026 09:57
@fjen

fjen commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator Author

"Small" overhaul of the whole template mess around journal/publisher. Now the result rows dont send htmx requests to clear some error div. That way we also got rid of DOI specitic row templates.

…r-row endpoints

Selecting a journal/publisher result no longer posts from the row. The
error <ul> itself watches the radios (hx-trigger) and swaps itself empty
against one shared empty-response endpoint, so journal_row/publisher_row
are inert and shared with the DOI modal.

Removes the row_template override mechanism, doi_*_row.html and the
clear_journal_error/clear_publisher_error views, partials and URLs.
Side effect: no htmx targetError noise when selecting without an
active error, in either the wizard or the DOI modal.
@fjen
fjen force-pushed the fix/doi-import-search-submission branch from d4bdabc to 057ebee Compare September 2, 2026 10:00
@sonarqubecloud

sonarqubecloud Bot commented Sep 2, 2026

Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working fundingrequests ux User experience

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants