Use data-onclick instead of data-on-click-this. Load form by id instead of passed in element. Fixes #3250

This commit is contained in:
Isaac Connor 2021-05-22 13:59:10 -04:00
parent 1caeb67a3e
commit 4c99baf725
1 changed files with 8 additions and 4 deletions

View File

@ -1,11 +1,15 @@
var exportTimer = null;
function configureExportButton(element) {
var form = element.form;
function configureExportButton() {
var form = $j('#contentForm')[0];
if (!form) {
console.error("Form contentForm not found by jquery.");
return;
}
var eventCount = 0;
document.querySelectorAll('input[name="eids[]"]').forEach(function(el) {
if ( el.checked ) {
if (el.checked) {
eventCount ++;
}
});
@ -93,7 +97,7 @@ function getEventDetailModal(eid) {
}
function initPage() {
configureExportButton(this);
configureExportButton();
if ( exportReady ) {
setTimeout(startDownload, 1500, exportFile);
}