Better messaging when changing email address

Fixes #1695
This commit is contained in:
Joseph Schorr 2016-08-16 13:13:52 -04:00
parent de9be6e993
commit 236cdc795f
2 changed files with 8 additions and 2 deletions

View file

@ -121,6 +121,7 @@
var errorDisplay = ApiService.errorDisplay('Could not change email address', callback);
ApiService.changeUserDetails(details).then(function() {
$scope.context.emailAwaitingChange = $scope.changeEmailInfo.email;
callback(true);
}, errorDisplay);
};

View file

@ -112,7 +112,12 @@
<tr quay-show="Features.MAILING">
<td>Email Address:</td>
<td>
<a class="co-modify-link" ng-click="showChangeEmail()">{{ context.viewuser.email }}</a>
<div ng-if="context.emailAwaitingChange">
An email has been sent to <code>{{ context.emailAwaitingChange }}</code>. Please click the Confirm button
to apply the email change.
</div>
<a class="co-modify-link" ng-click="showChangeEmail()" ng-if="!context.emailAwaitingChange">{{ context.viewuser.email }}</a>
</td>
</tr>
<tr quay-show="Config.AUTHENTICATION_TYPE == 'Database'">
@ -148,7 +153,7 @@
dialog-action-title="Change Email"
dialog-form="context.emailform">
<form name="context.emailform" class="co-single-field-dialog">
Please enter a new email address. A verification email will be sent before being applied.
Please enter a new email address. A verification email will be sent before the change is applied.
<input type="email" class="form-control" placeholder="Your new e-mail address"
ng-model="changeEmailInfo.email" required>
</form>