primo upload

This commit is contained in:
claus75a
2024-03-16 20:37:32 +01:00
commit e43b9b4b28
3019 changed files with 406000 additions and 0 deletions
+36
View File
@@ -0,0 +1,36 @@
var timer;
var $btn = $("#resend-token");
/**
* Start timeout which will show the "Resend Token" button
* after 60 seconds.
*/
function startTimer() {
timer = setTimeout(function () {
$btn.removeClass('d-none');
}, 60 * 1000);
}
/**
* Resend phone verification token.
*/
function resendToken() {
as.btn.loading($btn, $btn.data('loading-text'));
$.post("/two-factor/resend", user ? {user: user} : {})
.then(handleResendResponse)
.catch(handleResendResponse);
}
/**
* Handle response received from the server after
* resend token request was sent.
*/
function handleResendResponse() {
as.btn.stopLoading($btn);
$btn.addClass('d-none');
startTimer();
}
$btn.click(resendToken);
startTimer();