diff --git a/dataedit/static/peer_review/opr_contributor.js b/dataedit/static/peer_review/opr_contributor.js index 8ee94886b..6286a1d5e 100644 --- a/dataedit/static/peer_review/opr_contributor.js +++ b/dataedit/static/peer_review/opr_contributor.js @@ -631,19 +631,22 @@ function checkReviewComplete() { const fields = document.querySelectorAll('.field'); for (let field of fields) { let fieldName = field.id.slice(6); + const fieldValue = $(field).find('.value').text().replace(/\s+/g, ' ').trim(); const fieldState = getFieldState(fieldName); let reviewed = current_review["reviews"].find((review) => review.key === fieldName); - if (!reviewed && fieldState !== 'ok') { + if (!reviewed && fieldState !== 'ok' && !isEmptyValue(fieldValue)) { $('#submit_summary').addClass('disabled'); return; } } $('#submit_summary').removeClass('disabled'); - showToast("Success", "You have reviewed all fields an can submit the review to get feedback!", 'success'); + showToast("Success", "You have reviewed all fields and can submit the review to get feedback!", 'success'); } + + /** * Shows reviewer Comment and Suggestion Input options */