Add Link Keys form to supporterkey.html

This commit is contained in:
Eric Reed 2013-09-26 11:30:47 -04:00
parent 5636ec57bc
commit d4d5d97322
2 changed files with 69 additions and 0 deletions

View File

@ -55,6 +55,38 @@
return false;
},
linkSupporterKeys: function () {
Dashboard.showLoadingMsg();
var page = $.mobile.activePage;
var email = $('#txtNewEmail', page).val();
var newkey = $('#txtNewKey', page).val();
var oldkey = $('#txtOldKey', page).val();
var info = {
email: email,
newkey: newkey,
oldkey: oldkey
};
var url = "http://mb3admin.com/admin/service/supporter/linkKeys";
console.log(url);
$.post(url, info).done(function (res) {
var result = JSON.parse(res);
Dashboard.hideLoadingMsg();
if (result.Success) {
Dashboard.alert("Keys Linked.");
} else {
Dashboard.showError(result.ErrorMessage);
}
console.log(result);
});
return false;
},
retrieveSupporterKey: function () {
Dashboard.showLoadingMsg();

View File

@ -67,12 +67,49 @@
</p>
</form>
<hr/>
<h2>Multiple Key Linking</h2>
<p>
If your PayPal email address has changed causing you to have more than one MB3 supporter key, use this form to link the old key's
registrations with your new one.
</p>
<form id="linkKeysForm">
<div style="margin-top: 40px; margin-bottom: 40px">
<label for="txtEmail">Current Email Address</label>
<input type="email" required id="txtNewEmail" name="txtNewEmail" data-inline="true" />
<div class="fieldDescription">
<strong>The current email address to which your new key was sent.</strong>
</div>
</div>
<div style="margin-top: 40px; margin-bottom: 40px">
<label for="txtNewKey">New Supporter Key</label>
<input type="password" required="" id="txtNewKey" name="txtNewKey" data-inline="true" />
<div class="fieldDescription">
<strong>The supporter key that was sent to the above email address.</strong>
</div>
</div>
<div style="margin-top: 40px; margin-bottom: 40px">
<label for="txtOldKey">Old Supporter Key</label>
<input type="password" required id="txtOldKey" name="txtOldKey" data-inline="true" />
<div class="fieldDescription">
<strong>The supporter key attached to your previous email address.</strong>
</div>
</div>
<p>
<button type="submit" id="mbLinkKeysBtn" data-theme="b">Link Keys</button>
</p>
</form>
</div>
</div>
<script type="text/javascript">
$('#supporterKeyForm').on('submit', SupporterKeyPage.updateSupporterKey);
$('#lostKeyForm').on('submit', SupporterKeyPage.retrieveSupporterKey);
$('#linkKeysForm').on('submit', SupporterKeyPage.linkSupporterKeys);
</script>
</div>
</body>