diff --git a/view/template/acquisition/youtube_status.php b/view/template/acquisition/youtube_status.php
index 7892ecdd..b2933d8c 100644
--- a/view/template/acquisition/youtube_status.php
+++ b/view/template/acquisition/youtube_status.php
@@ -143,7 +143,7 @@
You need to provide an email
class="error-block">
- You need to verify your email
+ You need to verify your email! Click here to resend a verification email
diff --git a/web/js/yt2/FormValidation.js b/web/js/yt2/FormValidation.js
index 56dbe7e4..f7688c59 100644
--- a/web/js/yt2/FormValidation.js
+++ b/web/js/yt2/FormValidation.js
@@ -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) {