keep username and email synced if the checkbox is checked.

This commit is contained in:
dave 2010-07-14 18:09:19 +00:00
parent d5912ac1e8
commit 994759d660

View File

@ -224,7 +224,16 @@ $().ready(function() {
$("#username").attr("disabled", username_link); $("#username").attr("disabled", username_link);
$("#username_link").click(function() { $("#username_link").click(function() {
$("#username").attr("disabled", this.checked); $("#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> </script>