sfd
parent
730b622239
commit
1600373e37
|
@ -17,7 +17,7 @@ def join_discord(v):
|
|||
|
||||
if v.is_suspended != 0: return "You're banned"
|
||||
|
||||
if 'rdrama' in request.host and v.admin_level == 0 and v.patron == 0 and v.truecoins < 150: return f"You must earn 150 {COINS_NAME} before entering the Discord server. You earn {COINS_NAME} by making posts/comments and getting upvoted."
|
||||
if 'rdrama' in request.host and v.admin_level == 0 and v.patron == 0 and v.coins < 150: return f"You must earn 150 {COINS_NAME} before entering the Discord server. You earn {COINS_NAME} by making posts/comments and getting upvoted."
|
||||
|
||||
if v.shadowbanned or v.agendaposter: return ""
|
||||
|
||||
|
|
|
@ -4,59 +4,7 @@
|
|||
<head>
|
||||
<script src="https://cdn.jsdelivr.net/npm/bootstrap@5.1.1/dist/js/bootstrap.bundle.min.js"></script>
|
||||
|
||||
<script>
|
||||
document.getElementById('password-register').addEventListener('input', function () {
|
||||
|
||||
var charCount = document.getElementById("password-register").value;
|
||||
var id = document.getElementById("passwordHelpRegister");
|
||||
var successID = document.getElementById("passwordHelpSuccess");
|
||||
|
||||
if (charCount.length >= 8) {
|
||||
id.classList.add("d-none");
|
||||
successID.classList.remove("d-none");
|
||||
}
|
||||
else {
|
||||
id.classList.remove("d-none");
|
||||
successID.classList.add("d-none");
|
||||
};
|
||||
|
||||
});
|
||||
document.getElementById('username-register').addEventListener('input', function () {
|
||||
|
||||
var charCount = document.getElementById("username-register").value;
|
||||
var id = document.getElementById("usernameHelpRegister");
|
||||
var successID = document.getElementById("usernameHelpSuccess");
|
||||
|
||||
var API = '/is_available/' + charCount;
|
||||
|
||||
if (charCount.length >= 3) {
|
||||
|
||||
$.getJSON(API, function(result) {
|
||||
$.each(result, function(i, field) {
|
||||
if (field == false) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">Username already taken :(';
|
||||
}
|
||||
});
|
||||
});
|
||||
|
||||
}
|
||||
|
||||
if (!/[^a-zA-Z0-9_\-$]/.test(charCount)) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-success mt-1">Username is a-okay!';
|
||||
|
||||
if (charCount.length < 3) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-muted mt-1">Username must be at least 3 characters long.';
|
||||
}
|
||||
else if (charCount.length > 25) {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">Username must be 25 characters or less.';
|
||||
}
|
||||
}
|
||||
else {
|
||||
id.innerHTML = '<span class="form-text font-weight-bold text-danger mt-1">No special characters or spaces allowed.</span>';
|
||||
};
|
||||
|
||||
});
|
||||
</script>
|
||||
<script src="/assets/js/signup.js"></script>
|
||||
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
|
||||
|
|
Loading…
Reference in New Issue