mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-16 14:39:37 +00:00
only autofocus if new
This commit is contained in:
parent
76f0b05a09
commit
47c0d78985
2 changed files with 2 additions and 2 deletions
|
|
@ -71,7 +71,7 @@ class BaseEntityAdminForm extends AbstractType
|
|||
'label' => 'name.label',
|
||||
'attr' => [
|
||||
'placeholder' => 'part.name.placeholder',
|
||||
'autofocus' => true,
|
||||
'autofocus' => $is_new,
|
||||
],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
|
|
|||
|
|
@ -115,7 +115,7 @@ class PartBaseType extends AbstractType
|
|||
'label' => 'part.edit.name',
|
||||
'attr' => [
|
||||
'placeholder' => 'part.edit.name.placeholder',
|
||||
'autofocus' => true,
|
||||
'autofocus' => $new_part,
|
||||
],
|
||||
])
|
||||
->add('description', RichTextEditorType::class, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue