Skip to content

Commit

Permalink
rename button to "Send Verification Email", remove popup #8227
Browse files Browse the repository at this point in the history
  • Loading branch information
pdurbin committed Apr 5, 2022
1 parent 8c70b7a commit 8b1500c
Show file tree
Hide file tree
Showing 4 changed files with 3 additions and 35 deletions.
1 change: 1 addition & 0 deletions doc/release-notes/8227-verify-email.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
The "Verify Email" button has been changed to "Send Verification Email" and rather than sometimes showing a popup now always sends a fresh verification email (and invalidates previous verification emails).
Original file line number Diff line number Diff line change
Expand Up @@ -546,11 +546,6 @@ public boolean showVerifyEmailButton() {
return !confirmEmailService.hasVerifiedEmail(currentUser);
}

public boolean getHasActiveVerificationToken(){
//for user page to determine how to handle Confirm Email click
return confirmEmailService.hasActiveVerificationToken(currentUser);
}

public boolean isEmailIsVerified() {
return confirmEmailService.hasVerifiedEmail(currentUser);
}
Expand Down
6 changes: 2 additions & 4 deletions src/main/java/propertyFiles/Bundle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -183,8 +183,6 @@ contact.context.support.ending=\n\n---\n\nMessage sent from Support contact form
account.info=Account Information
account.edit=Edit Account
account.apiToken=API Token
account.emailvalidation.header=Email Validation
account.emailvalidation.token.exists=A verification email has been sent to {0}. Please check your inbox.
user.isShibUser=Account information cannot be edited when logged in through an institutional account.
user.helpShibUserMigrateOffShibBeforeLink=Leaving your institution? Please contact
user.helpShibUserMigrateOffShibAfterLink=for assistance.
Expand Down Expand Up @@ -364,10 +362,10 @@ authenticationProvider.name.shib=Shibboleth

#confirmemail.xhtml
confirmEmail.pageTitle=Email Verification
confirmEmail.submitRequest=Verify Email
confirmEmail.submitRequest=Send Verification Email
confirmEmail.submitRequest.success=A verification email has been sent to {0}. Note, the verify link will expire after {1}.
confirmEmail.details.success=Email address verified!
confirmEmail.details.failure=We were unable to verify your email address. Please navigate to your Account Information page and click the "Verify Email" button.
confirmEmail.details.failure=We were unable to verify your email address. Please navigate to your Account Information page and click the "Send Verification Email" button.
confirmEmail.details.goToAccountPageButton=Go to Account Information
confirmEmail.notVerified=Not Verified
confirmEmail.verified=Verified
Expand Down
26 changes: 0 additions & 26 deletions src/main/webapp/dataverseuser.xhtml
Original file line number Diff line number Diff line change
Expand Up @@ -484,7 +484,6 @@
id="verifyEmailButton"
action="#{DataverseUserPage.sendConfirmEmail()}"
update="@([id$=verifyEmailButton]), :messagePanel"
onclick="if (!testHasEmailToken(#{DataverseUserPage.getHasActiveVerificationToken()})) return false;"
>
<span class="glyphicon glyphicon-ok"></span> #{bundle['confirmEmail.submitRequest']}
</p:commandLink>
Expand Down Expand Up @@ -754,32 +753,7 @@
</div>
</p:tab>
</p:tabView>
<p:dialog id="tokenExists" styleClass="smallPopUp"
header="#{bundle['account.emailvalidation.header']}" widgetVar="tokenExists" modal="true">

<h:outputFormat value="#{bundle['account.emailvalidation.token.exists']}" escape="false">
<o:param>#{DataverseUserPage.currentUser.email}</o:param>
</h:outputFormat>


<div class="button-block">
<button class="btn btn-default" onclick="PF('tokenExists').hide();" type="button">
#{bundle.close}
</button>
</div>
</p:dialog>
</h:form>
<script>
//<![CDATA[
function testHasEmailToken(hasActiveVerificationToken) {
if (hasActiveVerificationToken) {
PF("tokenExists").show();
} else {
return true;
}
}
//]]>
</script>
</ui:define>
</ui:composition>
</h:body>
Expand Down

0 comments on commit 8b1500c

Please sign in to comment.