Bug 37267 - Allow specifying a target in form-submit.js
Summary: Allow specifying a target in form-submit.js
Status: RESOLVED DUPLICATE of bug 37192
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low normal
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 36246
Blocks:
  Show dependency treegraph
 
Reported: 2024-07-06 18:10 UTC by Phil Ringnalda
Modified: 2024-07-11 18:00 UTC (History)
1 user (show)

See Also:
Change sponsored?: ---
Patch complexity: ---
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Phil Ringnalda 2024-07-06 18:10:06 UTC
form-submit.js neatly takes care of links that used to do a GET but now have to POST if they were targeting the current window, but links that were opening a new window/tab with target="_blank" can't. form-submit.js should look for data-targetwindow and set its value as the target attribute of the form. 

Inconveniently, Bootstrap 4 uses data-target as the CSS selector you are targeting, though Bootstrap 5 namespaces it as data-bs-target, so we shouldn't use data-target.

And possibly while form-submit.js is still young enough to change, we should namespace all the things that are aimed at it rather than at the form it creates, data-fs-method, data-fs-action, and then we could use data-fs-target, and someone who needs to submit a form with an input awkwardly named either method or action could get away with it.
Comment 1 Phil Ringnalda 2024-07-11 18:00:12 UTC
Or, Lucas can just implement it while patching bug 37192

*** This bug has been marked as a duplicate of bug 37192 ***