Merge pull request #1735 from coreos-inc/change-email

Better messaging when changing email address
This commit is contained in:
josephschorr 2016-08-16 14:31:24 -04:00 committed by GitHub
commit 32154344ce
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); var errorDisplay = ApiService.errorDisplay('Could not change email address', callback);
ApiService.changeUserDetails(details).then(function() { ApiService.changeUserDetails(details).then(function() {
$scope.context.emailAwaitingChange = $scope.changeEmailInfo.email;
callback(true); callback(true);
}, errorDisplay); }, errorDisplay);
}; };

View file

@ -112,7 +112,12 @@
<tr quay-show="Features.MAILING"> <tr quay-show="Features.MAILING">
<td>Email Address:</td> <td>Email Address:</td>
<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> </td>
</tr> </tr>
<tr quay-show="Config.AUTHENTICATION_TYPE == 'Database'"> <tr quay-show="Config.AUTHENTICATION_TYPE == 'Database'">
@ -148,7 +153,7 @@
dialog-action-title="Change Email" dialog-action-title="Change Email"
dialog-form="context.emailform"> dialog-form="context.emailform">
<form name="context.emailform" class="co-single-field-dialog"> <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" <input type="email" class="form-control" placeholder="Your new e-mail address"
ng-model="changeEmailInfo.email" required> ng-model="changeEmailInfo.email" required>
</form> </form>