From 44a5c35705df95ec9ed9858063076df4faa436cc Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 24 Apr 2016 21:11:52 -0400 Subject: [PATCH] [PASSED QA] Bug 16337 - Remove the use of "onclick" from the stage MARC records template This patch reviseds the stage 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 -> Stage MARC records for import. - Select a MARC file for import. - Click the "Upload file" button. Your upload should be processed correctly. - Select a MARC file for import. - Click the "Upload file" button. - Click the "Cancel" button before the file has been uploaded. The upload should be cancelled. Signed-off-by: Aleisha Signed-off-by: Katrin Fischer --- .../intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt index e2b6425..223b4f9 100644 --- a/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt +++ b/koha-tmpl/intranet-tmpl/prog/en/modules/tools/stage-marc-import.tt @@ -23,6 +23,14 @@ $(document).ready(function(){ $('#items').show(); } }); + $("#fileuploadbutton").on("click",function(e){ + e.preventDefault(); + StartUpload(); + }); + $("#fileuploadcancel").on("click",function(e){ + e.preventDefault(); + CancelUpload(); + }); }); function CheckForm(f) { if ($("#fileToUpload").value == '') { @@ -137,8 +145,8 @@ function cbUpload( status, fileid ) {
- - + +
-- 1.9.1