Bug 37267

Summary: Allow specifying a target in form-submit.js
Product: Koha Reporter: Phil Ringnalda <phil>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: nick
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: ---
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Circulation function:
Bug Depends on: 36246    
Bug Blocks:    

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 ***