[enh][ux] Prefill email field value with username if empty.

This commit is contained in:
opi 2016-05-06 17:17:09 +02:00
parent 6a1d5ac5ca
commit 93243f432f

View file

@ -23,8 +23,15 @@
// Password min length
data.password_min_length = PASSWORD_MIN_LENGTH;
c.view('user/user_create', data);
c.view('user/user_create', data, function(){
var usernameField = $('#username');
usernameField.on('blur', function(){
var emailField = $('#email');
if (emailField.val() == '') {
emailField.val(usernameField.val());
}
});
});
});
});