title = "Confirm Email"; $this->description = "Request a password reset, once you got the e-mail address, you can choose a new password"; $this->icon = "user-check"; } public function loadView() { parent::loadView(); $this->getDocument()->getHead()->addScript(Script::MIME_TEXT_JAVASCRIPT, "", ' $(document).ready(function() { var token = jsCore.getParameter("token"); if (token) { jsCore.apiCall("/user/confirmEmail", { token: token }, (res) => { $("#confirm-status").removeClass("alert-info"); if (!res.success) { $("#confirm-status").addClass("alert-danger"); $("#confirm-status").text("Error confirming e-mail address: " + res.msg); } else { $("#confirm-status").addClass("alert-success"); $("#confirm-status").text("Your e-mail address was successfully confirmed, you may now log in."); } }); } else { $("#confirm-status").removeClass("alert-info"); $("#confirm-status").addClass("alert-danger"); $("#confirm-status").text("The link you visited is no longer valid"); } });' ); } protected function getAccountContent() { $spinner = $this->createIcon("spinner"); $html = "