From 75cff6cac755acb61107cd12077b58c3ae6d6ae6 Mon Sep 17 00:00:00 2001 From: Owen Leonard Date: Sun, 24 Apr 2016 21:11:52 -0400 Subject: [PATCH] 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 Signed-off-by: Kyle M Hall --- .../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 b55d685a7b..af2428149e 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 ) {
- - + +
-- 2.39.5