fix registration
This commit is contained in:
+27
-2
@@ -117,6 +117,21 @@
|
||||
<p class="text-muted small mb-0">We've sent a verification link to your email address. Click it to activate your account.</p>
|
||||
</div>
|
||||
|
||||
<!-- Fallback: email failed, show verify link directly -->
|
||||
<div id="verify_link_panel" class="d-none py-3">
|
||||
<div class="alert alert-warning small mb-3">
|
||||
<i class="ti ti-alert-triangle me-1"></i>
|
||||
Account created, but the verification email could not be sent (server email is not configured).
|
||||
Use the link below to verify your account:
|
||||
</div>
|
||||
<div class="input-group">
|
||||
<input type="text" class="form-control form-control-sm font-monospace" id="verify_link_input" readonly>
|
||||
<button class="btn btn-sm btn-outline-secondary" onclick="copy_verify_link()">
|
||||
<i class="ti ti-copy"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<p class="text-center text-muted small mb-0">
|
||||
Already have an account?
|
||||
<a href="<?php echo $server_url?>login/index.php" class="link-primary">Sign in</a>
|
||||
@@ -237,12 +252,22 @@
|
||||
confirm_password: confirm,
|
||||
})},
|
||||
onSuccess: function (r) {
|
||||
// Hide form, show success panel
|
||||
$('input, button, .row, .mb-3, .mb-4').hide();
|
||||
$('#success_panel').removeClass('d-none');
|
||||
if (r.verify_url) {
|
||||
$('#verify_link_input').val(r.verify_url);
|
||||
$('#verify_link_panel').removeClass('d-none');
|
||||
} else {
|
||||
$('#success_panel').removeClass('d-none');
|
||||
}
|
||||
},
|
||||
});
|
||||
}
|
||||
function copy_verify_link() {
|
||||
const val = $('#verify_link_input').val();
|
||||
navigator.clipboard.writeText(val).then(function () {
|
||||
bootbox.alert('Verification link copied to clipboard.');
|
||||
});
|
||||
}
|
||||
</script>
|
||||
|
||||
</body>
|
||||
|
||||
Reference in New Issue
Block a user