[Glitch] Add honeypot fields and minimum fill-out time for sign-up form
Port 49eb4d4ddf
to glitch-soc
Co-authored-by: Claire <claire.github-309c@sitedethib.com>
Signed-off-by: Claire <claire.github-309c@sitedethib.com>
This commit is contained in:
parent
237025b5ef
commit
9a5825f864
|
@ -151,6 +151,17 @@ function main() {
|
||||||
target.style.display = 'block';
|
target.style.display = 'block';
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
|
// Empty the honeypot fields in JS in case something like an extension
|
||||||
|
// automatically filled them.
|
||||||
|
delegate(document, '#registration_new_user,#new_user', 'submit', () => {
|
||||||
|
['user_website', 'user_confirm_password', 'registration_user_website', 'registration_user_confirm_password'].forEach(id => {
|
||||||
|
const field = document.getElementById(id);
|
||||||
|
if (field) {
|
||||||
|
field.value = '';
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
loadPolyfills()
|
loadPolyfills()
|
||||||
|
|
|
@ -345,6 +345,7 @@ code {
|
||||||
input[type=number],
|
input[type=number],
|
||||||
input[type=email],
|
input[type=email],
|
||||||
input[type=password],
|
input[type=password],
|
||||||
|
input[type=url],
|
||||||
textarea {
|
textarea {
|
||||||
box-sizing: border-box;
|
box-sizing: border-box;
|
||||||
font-size: 16px;
|
font-size: 16px;
|
||||||
|
@ -985,3 +986,10 @@ code {
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.input.user_confirm_password,
|
||||||
|
.input.user_website {
|
||||||
|
&:not(.field_with_errors) {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
Reference in New Issue