Bug 16386 - Replace the use of "onclick" from patron card creator templates
Summary: Replace the use of "onclick" from patron card creator templates
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 16372
Blocks: 13041 16450 16457
  Show dependency treegraph
 
Reported: 2016-04-29 00:52 UTC by Owen Leonard
Modified: 2017-12-07 22:17 UTC (History)
4 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 16386 - Replace the use of "onclick" from patron card creator templates (17.69 KB, patch)
2016-05-04 01:00 UTC, Owen Leonard
Details | Diff | Splinter Review
[SIGNED-OFF] Bug 16386 - Replace the use of "onclick" from patron card creator templates (17.74 KB, patch)
2016-05-04 14:18 UTC, Bernardo Gonzalez Kriegel
Details | Diff | Splinter Review
[PASSED QA] Bug 16386 - Replace the use of "onclick" from patron card creator templates (17.79 KB, patch)
2016-05-05 22:02 UTC, Katrin Fischer
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-04-29 00:52:21 UTC
Several patron card creator templates include the use of an "onclick" attribute. These should be removed in favor of defining events in JavaScript.
Comment 1 Owen Leonard 2016-05-04 01:00:13 UTC Comment hidden (obsolete)
Comment 2 Bernardo Gonzalez Kriegel 2016-05-04 14:18:05 UTC Comment hidden (obsolete)
Comment 3 Katrin Fischer 2016-05-05 22:02:03 UTC
Created attachment 51265 [details] [review]
[PASSED QA] Bug 16386 - Replace the use of "onclick" from patron card creator templates

This patch removes the use of "onclick" from several patron card creator
templates. Events are defined instead in JavaScript.

Also changed:

- Patron search pop-up window is now slightly larger because I found it
  never quite large enough to prevent horizontal scrolling.
- Replaced "Borrower" with "Patron" in a couple of places.
- "Add" link in patron search pop-up is now styled as a Bootstrap
  button.
- Removed Bootstrap styles from some submit buttons.
- Some Font Awesome icons were made using the invalid element
  <icon></icon> instead of <i></i>. These are corrected.
- Fixed some other HTML validation errors.

To test, apply the patch and go to Tools -> Patron card creator.

- Choose New -> Card batch.
  - Click "Add patrons" and perform a search for patrons in the pop-up
    window.
  - Click the "Add" button. The corresponding borrowernumber should be
    added to the textarea in the parent window, and a message should
    appear at the top of the pop-up window confirming that the patron
    has been added. (Note: This patch fixes a version of Bug 13041 which
    prevented the "add" button from working on patrons whose name
    include an apostrophe).
  - In the parent page, in the list of patrons you added to the batch,
    confirm that clicking the "Delete" link triggers a confirmation
    dialog. Test both confirming and canceling.
  - Confirm that clicking the "Export" button next to an individual
    patron triggers a modal window.
    - In the export window, confirm that the "Cancel" link works to
      close the modal.
    - Click the "Export" button again and then the "Export" button in
      the modal.
      - Test that the "Done" button works to close the modal.
- Choose Manage -> Card batches.
  - Test the "Delete" and "Export" buttons as described above.

Signed-off-by: Bernardo Gonzalez Kriegel <bgkriegel@gmail.com>
All works, no errors.

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 4 Brendan Gallagher 2016-05-06 04:23:33 UTC
Pushed to Master - Should be in the May 2016 Release.  Thanks!
Comment 5 Christopher Brannon 2016-06-20 14:32:19 UTC
Would like to see this in 3.22.x.