2020-03-11 09:43:55 -04:00
|
|
|
// discourse-skip-module
|
2018-10-25 09:52:01 -04:00
|
|
|
(function() {
|
|
|
|
setTimeout(function() {
|
|
|
|
const $activateButton = $("#activate-account-button");
|
|
|
|
$activateButton.on("click", function() {
|
|
|
|
$activateButton.prop("disabled", true);
|
|
|
|
const hpPath = document.getElementById("data-activate-account").dataset
|
|
|
|
.path;
|
|
|
|
$.ajax(hpPath)
|
|
|
|
.then(function(hp) {
|
|
|
|
$("#password_confirmation").val(hp.value);
|
|
|
|
$("#challenge").val(
|
|
|
|
hp.challenge
|
|
|
|
.split("")
|
|
|
|
.reverse()
|
|
|
|
.join("")
|
|
|
|
);
|
|
|
|
$("#activate-account-form").submit();
|
|
|
|
})
|
|
|
|
.fail(function() {
|
|
|
|
$activateButton.prop("disabled", false);
|
|
|
|
});
|
|
|
|
});
|
|
|
|
}, 50);
|
|
|
|
})();
|