From 5099a87f81b6d3d0a10fc30575aabf0c0ffb199c Mon Sep 17 00:00:00 2001 From: joshuastegmaier Date: Fri, 9 Aug 2024 15:29:25 -0400 Subject: [PATCH] Fixed bug where the transcription form wasn't properly unlocked when OCR completes --- concordia/static/js/src/contribute.js | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/concordia/static/js/src/contribute.js b/concordia/static/js/src/contribute.js index f477ef02e..d87687011 100644 --- a/concordia/static/js/src/contribute.js +++ b/concordia/static/js/src/contribute.js @@ -117,11 +117,11 @@ function setupPage() { $form.on('submit', function (event) { event.preventDefault(); - var data = $form.data(); + var eventData = $form.data(); lockControls($form); - if (data.lockElement) { - lockControls($(data.lockElement)); + if (eventData.lockElement) { + lockControls($(eventData.lockElement)); } var formData = $form.serializeArray(); @@ -140,8 +140,8 @@ function setupPage() { $form: $form, }); unlockControls($form); - if (data.lockElement) { - unlockControls($(data.lockElement)); + if (eventData.lockElement) { + unlockControls($(eventData.lockElement)); } }) .fail(function (jqXHR, textStatus, errorThrown) { @@ -163,8 +163,8 @@ function setupPage() { jqXHR: jqXHR, }); unlockControls($form); - if (data.lockElement) { - unlockControls($(data.lockElement)); + if (eventData.lockElement) { + unlockControls($(eventData.lockElement)); } } });