Bug 16372 - Replace the use of "onclick" for deletion confirmation in some templates
Summary: Replace the use of "onclick" for deletion confirmation in some 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: Arslan Farooq
QA Contact: Testopia
URL:
Keywords:
Depends on: 16058
Blocks: 16386
  Show dependency treegraph
 
Reported: 2016-04-27 16:30 UTC by Owen Leonard
Modified: 2017-12-07 22:15 UTC (History)
3 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 16372 - Replace the use of "onclick" for deletion confirmation in some templates (10.07 KB, patch)
2016-04-27 16:39 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 16372 - Replace the use of "onclick" for deletion confirmation in some templates (10.10 KB, patch)
2016-04-28 03:50 UTC, Arslan Farooq
Details | Diff | Splinter Review
[PASSED QA] Bug 16372 - Replace the use of "onclick" for deletion confirmation in some templates (10.15 KB, patch)
2016-04-28 09:54 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-27 16:30:09 UTC
Several templates include the use of an "onclick" attribute to handle deletion confirmations:

intranet-main.tt
patron_lists/lists.tt
patroncards/image-manage.tt
tools/koha-news.tt

These should be modified so that events are handled in JavaScript.
Comment 1 Owen Leonard 2016-04-27 16:39:59 UTC Comment hidden (obsolete)
Comment 2 Arslan Farooq 2016-04-28 03:50:39 UTC Comment hidden (obsolete)
Comment 3 Arslan Farooq 2016-04-28 03:52:21 UTC
Did QA tools as well, and it passed. However, there was that Plugins.pm message again "Compilation failed in require at /usr/local/lib/perl/5.14.2/Template/Plugins.pm line 206."

-----------------------------------------------------
FAIL	koha-tmpl/intranet-tmpl/prog/en/modules/intranet-main.tt
   OK	  forbidden patterns
   SKIP	  spelling
   OK	  tt_valid
   FAIL	  valid_template
		Attempt to reload Koha/Template/Plugin/Koha.pm aborted.
Compilation failed in require at /usr/local/lib/perl/5.14.2/Template/Plugins.pm line 206.



 OK	koha-tmpl/intranet-tmpl/prog/en/modules/patron_lists/lists.tt
   OK	  forbidden patterns
   SKIP	  spelling
   OK	  tt_valid
   OK	  valid_template

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/patroncards/image-manage.tt
   OK	  forbidden patterns
   SKIP	  spelling
   OK	  tt_valid
   OK	  valid_template

 OK	koha-tmpl/intranet-tmpl/prog/en/modules/tools/koha-news.tt
   OK	  forbidden patterns
   SKIP	  spelling
   OK	  tt_valid
   OK	  valid_template
-----------------------------------------------------
Comment 4 Katrin Fischer 2016-04-28 09:54:32 UTC
Created attachment 50887 [details] [review]
[PASSED QA] Bug 16372 - Replace the use of "onclick" for deletion confirmation in some templates

This patch removes the use of event attributes from several templates
where the attributes were used to handle deletion operations. I've
grouped these changes in one patch because each template had only small
changes to be made.

Unrelated change: Reformatted the "no news items" message which is
displayed if there are no news items.

To test, apply the patch and test deletion operations on the following
pages. Clicking "delete" should prompty you to confirm. Test both the
confirm and cancel actions.

- On the staff client home page, test deletion of a news item.
- On the patron lists page, test deletion of a patron list.
- In the patron card creator, choose Manage -> Images. Test the "Delete"
  button for a single image.
- On the news page, test deletion of a single news item.
- On the news page, test deletion of multiple items.

Signed-off-by: Arslan Farooq <arslanone@gmail.com>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 5 Kyle M Hall 2016-04-29 16:12:29 UTC
Pushed to master for the 16.05 release. Thanks Owen!