mirror of
https://github.com/NodeBB/NodeBB.git
synced 2026-03-06 12:31:33 +01:00
on account deletion modal, focus on text input
This commit is contained in:
@@ -153,7 +153,7 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
||||
function handleAccountDelete() {
|
||||
$('#deleteAccountBtn').on('click', function() {
|
||||
translator.translate('[[user:delete_account_confirm]]', function(translated) {
|
||||
bootbox.confirm(translated + '<p><input type="text" class="form-control" id="confirm-username" /></p>', function(confirm) {
|
||||
var modal = bootbox.confirm(translated + '<p><input type="text" class="form-control" id="confirm-username" /></p>', function(confirm) {
|
||||
if (!confirm) {
|
||||
return;
|
||||
}
|
||||
@@ -169,6 +169,10 @@ define('forum/account/edit', ['forum/account/header', 'uploader', 'translator'],
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
modal.on('shown.bs.modal', function() {
|
||||
modal.find('input').focus();
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user