mirror of
https://github.com/NodeBB/NodeBB.git
synced 2025-10-26 08:36:12 +01:00
feat: focus username when modal is shown
This commit is contained in:
@@ -307,7 +307,7 @@ define('admin/manage/users', ['translator', 'benchpress', 'autocomplete'], funct
|
||||
function handleUserCreate() {
|
||||
$('#createUser').on('click', function () {
|
||||
Benchpress.parse('admin/partials/create_user_modal', {}, function (html) {
|
||||
bootbox.dialog({
|
||||
var modal = bootbox.dialog({
|
||||
message: html,
|
||||
title: '[[admin/manage/users:alerts.create]]',
|
||||
onEscape: true,
|
||||
@@ -326,6 +326,9 @@ define('admin/manage/users', ['translator', 'benchpress', 'autocomplete'], funct
|
||||
},
|
||||
},
|
||||
});
|
||||
modal.on('shown.bs.modal', function () {
|
||||
modal.find('#create-user-name').focus();
|
||||
});
|
||||
});
|
||||
return false;
|
||||
});
|
||||
|
||||
Reference in New Issue
Block a user