https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=39567 David Cook <dcook@prosentient.com.au> changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dcook@prosentient.com.au --- Comment #13 from David Cook <dcook@prosentient.com.au> --- I'm digging the move to using an ES module. However, as per JS1 from the coding guidelines, I think we should keep all the relevant JS code in a separate file. You can do that with the following: [% Asset.js("js/form-submit.js",{'type' => 'module'}) | $raw %] Then rather than exporting the function, you can just run it in koha-tmpl/intranet-tmpl/prog/js/form-submit.js Alternatively, if we think we do want to export it for whatever reason, then I'd suggest we make something like koha-tmpl/intranet-tmpl/prog/js/esm/form-submit.js to store the module and have koha-tmpl/intranet-tmpl/prog/js/form-submit.js stay as the initiator script which invokes the function at load time. -- Also, could we get a name change on this bug report to reflect its current nature? -- You are receiving this mail because: You are watching all bug changes.