diff --git a/commcare_connect/opportunity/tables.py b/commcare_connect/opportunity/tables.py index af270325..4c5a71e9 100644 --- a/commcare_connect/opportunity/tables.py +++ b/commcare_connect/opportunity/tables.py @@ -190,11 +190,14 @@ def render_view_profile(self, record): return format_html( ( """
- - + +
""" ), resend_invite_url, diff --git a/commcare_connect/static/js/project.js b/commcare_connect/static/js/project.js index 05b31f49..806b4c12 100644 --- a/commcare_connect/static/js/project.js +++ b/commcare_connect/static/js/project.js @@ -16,11 +16,13 @@ function refreshTooltips() { window.refreshTooltips = refreshTooltips; function handleResendInviteResponse(event) { - const response = event.detail.elt; - const resendModal = new bootstrap.Modal( - document.getElementById('resendInviteModal'), - ); - resendModal.show(); + if (event.detail.successful) { + const response = event.detail.elt; + const resendModal = new bootstrap.Modal( + document.getElementById('resendInviteModal'), + ); + resendModal.show(); + } } window.handleResendInviteResponse = handleResendInviteResponse;