52 lines
1.4 KiB
Plaintext
52 lines
1.4 KiB
Plaintext
<% provide(:title, 'Email Change Confirmation') %>
|
|
<% provide(:description, 'Your email has been changed successfully') %>
|
|
|
|
<div id="email-update-information" class="message-wrapper hidden">
|
|
<div class="left"><%= image_tag 'content/icon_information_big.png', :size=>'96x96' %></div>
|
|
<div class="message">
|
|
<h2>Success!</h2>
|
|
Your email has been changed. You will receive a notice email to your old email address.
|
|
</div>
|
|
</div>
|
|
<div id="email-update-alert" class="message-wrapper hidden">
|
|
<div class="left"><%= image_tag 'content/icon_alert_big.png', :size=>'96x96' %></div>
|
|
<div class="message">
|
|
<h2>Please Note:</h2>
|
|
This is either an expired or invalid email change confirmation link.
|
|
</div>
|
|
</div>
|
|
|
|
<script type="text/javascript">
|
|
|
|
function postFinalizeUpdateEmail(token) {
|
|
var url = "/api/users/update_email/" + token;
|
|
return $.ajax({
|
|
type: "POST",
|
|
dataType: "json",
|
|
url: url,
|
|
async: true,
|
|
processData: false
|
|
});
|
|
}
|
|
|
|
function showUpdateEmailSuccess() {
|
|
$('#email-update-information').show()
|
|
}
|
|
|
|
function showUpdateEmailFailure() {
|
|
$('#email-update-alert').show()
|
|
}
|
|
|
|
$(function() {
|
|
|
|
// check if this is a valid token
|
|
postFinalizeUpdateEmail(gon.update_email_token)
|
|
.done(showUpdateEmailSuccess)
|
|
.fail(showUpdateEmailFailure)
|
|
})
|
|
|
|
|
|
</script>
|
|
|
|
|