mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-03-15 03:38:50 +01:00
Autofocus for frequently used input fields
Fixes #1157. - Focus `name` field on new part - Focus `amount` on add/withdraw modal - Focus first "number type" input on any newly added collectionType table row... (debatable) It would be even more favorable if the user could configure if they want to use autofocus and/or for which fields/dialogs it should be enabled.
This commit is contained in:
@@ -71,6 +71,7 @@ class BaseEntityAdminForm extends AbstractType
|
||||
'label' => 'name.label',
|
||||
'attr' => [
|
||||
'placeholder' => 'part.name.placeholder',
|
||||
'autofocus' => true,
|
||||
],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
||||
Reference in New Issue
Block a user