mirror of
https://github.com/LBRYFoundation/lbry.com.git
synced 2025-08-23 09:37:26 +00:00
add verification email resend
This commit is contained in:
parent
82b50f7dfd
commit
5b5f0adb43
2 changed files with 21 additions and 1 deletions
|
@ -143,7 +143,7 @@
|
|||
You need to provide an email
|
||||
</p>
|
||||
<p <?php echo ($statusData['has_verified_email']===false && $statusData['email']!=="") ? "" : "hidden"?> class="error-block">
|
||||
You need to verify your email
|
||||
You need to verify your email! <a href="#" onClick="return resendVerificationEmail()">Click here to resend a verification email</a>
|
||||
</p>
|
||||
|
||||
<fieldset-group>
|
||||
|
|
|
@ -38,6 +38,26 @@ function submitEditForm() {
|
|||
});
|
||||
}
|
||||
|
||||
function resendVerificationEmail(token, email) {
|
||||
let data = new FormData();
|
||||
data.append("status_token", $.trim($('#status_token').val()));
|
||||
data.append("email", $.trim($('#email').val()));
|
||||
|
||||
let xhr = new XMLHttpRequest();
|
||||
xhr.withCredentials = true;
|
||||
|
||||
xhr.addEventListener("readystatechange", function () {
|
||||
if (this.readyState === 4) {
|
||||
console.log(this.responseText);
|
||||
}
|
||||
});
|
||||
|
||||
xhr.open("POST", "http://localhost:8080/yt/resend_verification_email");
|
||||
xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");
|
||||
xhr.setRequestHeader("Accept", "*/*");
|
||||
xhr.send(data);
|
||||
}
|
||||
|
||||
function submitDetailsForm() {
|
||||
$("#youtube_claim").submit(function (event) {
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue