Bug 35032 - Remove the use of "onclick" from Koha to MARC mapping template
Summary: Remove the use of "onclick" from Koha to MARC mapping template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: System Administration (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/admin/koha2marclinks.pl
Keywords:
Depends on:
Blocks:
 
Reported: 2023-10-11 15:40 UTC by Owen Leonard
Modified: 2024-07-04 20:37 UTC (History)
4 users (show)

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


Attachments
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template (3.98 KB, patch)
2023-10-11 15:49 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template (4.04 KB, patch)
2023-10-11 18:52 UTC, ByWater Sandboxes
Details | Diff | Splinter Review
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template (4.10 KB, patch)
2023-10-12 17:38 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-10-11 15:40:48 UTC
There are a couple of uses of "onclick" in the Koha to MARC mapping template. These should be removed in favor of defining events in JavaScript.
Comment 1 Owen Leonard 2023-10-11 15:49:06 UTC
Created attachment 156851 [details] [review]
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template

This patch eliminates two instances of "onclick" from the Koha to MARC
mapping template, moving these event handlers into JS in the footer.

To test, apply the patch and go to Administration -> Koha to MARC
mapping.

- Click "Add" next to a Koha field.
  - You should get a JS popup asking for entry of a MARC tag. Confirm
    that this process completes correctly.
- Test a "Remove" link too. It should work to remove mapping from a Koha
  field.
- Test the "Cancel" choice in both the "Add" and "Remove" cases to
  confirm that the operation is cancelled.
Comment 2 ByWater Sandboxes 2023-10-11 18:52:56 UTC
Created attachment 156877 [details] [review]
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template

This patch eliminates two instances of "onclick" from the Koha to MARC
mapping template, moving these event handlers into JS in the footer.

To test, apply the patch and go to Administration -> Koha to MARC
mapping.

- Click "Add" next to a Koha field.
  - You should get a JS popup asking for entry of a MARC tag. Confirm
    that this process completes correctly.
- Test a "Remove" link too. It should work to remove mapping from a Koha
  field.
- Test the "Cancel" choice in both the "Add" and "Remove" cases to
  confirm that the operation is cancelled.

Signed-off-by: Andrew  Fuerste-Henry <andrewfh@dubcolib.org>
Comment 3 Nick Clemens (kidclamp) 2023-10-12 17:38:59 UTC
Created attachment 156988 [details] [review]
Bug 35032: Remove the use of "onclick" from Koha to MARC mapping template

This patch eliminates two instances of "onclick" from the Koha to MARC
mapping template, moving these event handlers into JS in the footer.

To test, apply the patch and go to Administration -> Koha to MARC
mapping.

- Click "Add" next to a Koha field.
  - You should get a JS popup asking for entry of a MARC tag. Confirm
    that this process completes correctly.
- Test a "Remove" link too. It should work to remove mapping from a Koha
  field.
- Test the "Cancel" choice in both the "Add" and "Remove" cases to
  confirm that the operation is cancelled.

Signed-off-by: Andrew  Fuerste-Henry <andrewfh@dubcolib.org>
Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 4 Tomás Cohen Arazi (tcohen) 2023-10-18 13:23:34 UTC
Pushed to master for 23.11.

Nice work everyone, thanks!
Comment 5 Fridolin Somers 2023-10-25 06:43:24 UTC
Does not apply easy on 23.05.x
It is minor so I skip.