mirror of
https://github.com/YunoHost/yunohost-admin.git
synced 2024-09-03 20:06:15 +02:00
[enh][ux] Prefill email field value with username if empty.
This commit is contained in:
parent
6a1d5ac5ca
commit
93243f432f
1 changed files with 9 additions and 2 deletions
|
@ -23,8 +23,15 @@
|
||||||
|
|
||||||
// Password min length
|
// Password min length
|
||||||
data.password_min_length = PASSWORD_MIN_LENGTH;
|
data.password_min_length = PASSWORD_MIN_LENGTH;
|
||||||
|
c.view('user/user_create', data, function(){
|
||||||
c.view('user/user_create', data);
|
var usernameField = $('#username');
|
||||||
|
usernameField.on('blur', function(){
|
||||||
|
var emailField = $('#email');
|
||||||
|
if (emailField.val() == '') {
|
||||||
|
emailField.val(usernameField.val());
|
||||||
|
}
|
||||||
|
});
|
||||||
|
});
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue