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 <aleishaamohia@hotmail.com>
Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Signed-off-by: Kyle M Hall <kyle@bywatersolutions.com>
$('#items').show();
}
});
+ $("#fileuploadbutton").on("click",function(e){
+ e.preventDefault();
+ StartUpload();
+ });
+ $("#fileuploadcancel").on("click",function(e){
+ e.preventDefault();
+ CancelUpload();
+ });
});
function CheckForm(f) {
if ($("#fileToUpload").value == '') {
</div> </li>
</ol>
<fieldset class="action">
- <button id="fileuploadbutton" onclick="StartUpload(); return false;">Upload file</button>
- <button id="fileuploadcancel" onclick="CancelUpload(); return false;">Cancel</button>
+ <button id="fileuploadbutton">Upload file</button>
+ <button id="fileuploadcancel">Cancel</button>
</fieldset>
</fieldset>