Bug 16937 - Remove the use of "onclick" from the manage staged MARC records template
Summary: Remove the use of "onclick" from the manage staged MARC records template
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL: /cgi-bin/koha/tools/manage-marc-impor...
Keywords:
Depends on:
Blocks:
 
Reported: 2016-07-18 16:54 UTC by Owen Leonard
Modified: 2017-06-14 22:13 UTC (History)
5 users (show)

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


Attachments
Bug 16937 - Remove "onclick" from the manage staged MARC records template (6.15 KB, patch)
2016-07-18 17:54 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16937 - Remove "onclick" from the manage staged MARC records template (7.06 KB, patch)
2016-07-20 12:06 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF]Bug 16937: Remove "onclick" from the manage staged MARC records template (7.11 KB, patch)
2016-07-20 14:59 UTC, Héctor Eduardo Castro Avalos
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16937 [Revised] Remove "onclick" from the manage staged MARC records template (7.25 KB, patch)
2016-07-22 13:14 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16937 [Revised] Remove "onclick" from the manage staged MARC records template (7.26 KB, patch)
2016-07-25 16:48 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2016-07-18 16:54:59 UTC
There are several instances of "onclick" in manage-marc-import.tt which can be removed in favor of defining events in the JavaScript.
Comment 1 Owen Leonard 2016-07-18 17:54:06 UTC Comment hidden (obsolete)
Comment 2 Héctor Eduardo Castro Avalos 2016-07-19 15:50:00 UTC
Hi Owen

Sorry but patch doesn't apply

Applying: Bug 16937 - Remove "onclick" from the manage staged MARC records template
fatal: sha1 information is lacking or useless (koha-tmpl/intranet-tmpl/prog/en/modules/tools/manage-marc-import.tt).
Repository lacks necessary blobs to fall back on 3-way merge.
Cannot fall back to three-way merge.
Patch failed at 0001 Bug 16937 - Remove "onclick" from the manage staged MARC records template
Comment 3 Owen Leonard 2016-07-20 12:06:51 UTC Comment hidden (obsolete)
Comment 4 Owen Leonard 2016-07-20 12:07:45 UTC
(In reply to Héctor Eduardo Castro Avalos from comment #2)

> Sorry but patch doesn't apply

My fault: Forgot to squash all necessary commits. Please try again.
Comment 5 Héctor Eduardo Castro Avalos 2016-07-20 14:59:24 UTC Comment hidden (obsolete)
Comment 6 Jonathan Druart 2016-07-21 17:09:51 UTC
I always get "Clear all reservoir records staged in this batch?  This cannot be undone." even if I click on "Delete".
Comment 7 Owen Leonard 2016-07-22 13:14:04 UTC Comment hidden (obsolete)
Comment 8 Jonathan Druart 2016-07-25 16:48:05 UTC
Created attachment 53702 [details] [review]
Bug 16937 [Revised] Remove "onclick" from the manage staged MARC records template

This patch revises the manage staged MARC records template, removing
"onclick" attributes from the markup and defining those events in the
script.

To test, apply the patch and go to Tools -> Manage staged MARC records.

- If necessary, stage a MARC file for import.
- Click the name of the staged file and then the "Import this batch into
  the catalog" button. The batch should be correctly imported.
- Return to the list of staged MARC files.
- Click the name of an imported file and then the "Undo import into
  catalog" button. The import should be reverted.
- Return to the list of staged MARC files.
- Click the "Clean" button for any record. Confirm that the batch is
  cleaned.
- For any cleaned record, click the "Delete" button. The batch should be
  deleted.

Signed-off-by: Hector Castro <hector.hecaxmmx@gmail.com>
Works as advertised

QA revision: Corrected class name so that "delete" button triggers the
correct warning.

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Kyle M Hall 2016-09-09 14:16:15 UTC
Pushed to master for 16.11, thanks Owen!
Comment 10 Frédéric Demians 2016-09-13 07:09:44 UTC
Pushed in 16.05. Will be in 16.05.04.