forked from science-ation/science-ation
keep username and email synced if the checkbox is checked.
This commit is contained in:
parent
d5912ac1e8
commit
994759d660
@ -224,8 +224,17 @@ $().ready(function() {
|
||||
$("#username").attr("disabled", username_link);
|
||||
$("#username_link").click(function() {
|
||||
$("#username").attr("disabled", this.checked);
|
||||
username_link_change();
|
||||
});
|
||||
|
||||
function username_link_change() {
|
||||
if($("#username_link").is(":checked")) {
|
||||
$("#username").val($('#email').val());
|
||||
}
|
||||
}
|
||||
$("#email").change(username_link_change);
|
||||
$("#email").keyup(username_link_change);
|
||||
|
||||
});
|
||||
</script>
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user