Skip to content

Commit 82686b7

Browse files
j-awadaakochari
andauthored
ss-1754 Register user even when ROR is invalid (#442)
Co-authored-by: Arnold Kochari <arnold.kochari@scilifelab.se>
1 parent f895b21 commit 82686b7

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

static/js/form-helpers.js

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -82,14 +82,14 @@ document.addEventListener('DOMContentLoaded', function() {
8282
// Create error message element
8383
const errorDiv = document.createElement('div');
8484
errorDiv.id = 'validation_organization_custom';
85-
errorDiv.className = 'invalid-feedback pt-1';
85+
errorDiv.className = 'pt-1 text-warning';
8686
errorDiv.style.display = 'none';
8787
orgInput.parentNode.insertBefore(errorDiv, orgInput.nextSibling);
8888

8989
function showError(message) {
9090
errorDiv.innerHTML = `<p class="m-0">${message}</p>`;
9191
errorDiv.style.display = 'block';
92-
orgInput.classList.add('is-invalid');
92+
//orgInput.classList.add('is-invalid');
9393
isValidSelection = false;
9494
}
9595

@@ -140,7 +140,7 @@ document.addEventListener('DOMContentLoaded', function() {
140140
})
141141
.catch(error => {
142142
console.error('ROR verification error:', error);
143-
showError('Unable to verify organization. Please try again.');
143+
showError('Unable to verify organization.');
144144
return false;
145145
});
146146
}
@@ -226,13 +226,13 @@ document.addEventListener('DOMContentLoaded', function() {
226226
const inputValue = orgInput.value.trim();
227227

228228
if (inputValue && !isValidSelection) {
229-
e.preventDefault();
229+
// Submit even when ROR is invalid
230230
showError(
231-
'Please select a valid organization from the ROR list. ' +
231+
'No match found in ROR registry. You can still register, but please double-check your organization name. ' +
232232
'<a href="https://ror.org/search" target="_blank" rel="noopener">Search ROR registry</a>'
233233
);
234-
orgInput.focus();
235-
return false;
234+
} else {
235+
clearError();
236236
}
237237
});
238238
});

0 commit comments

Comments
 (0)