mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-02-17 15:09:35 +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',
|
'label' => 'name.label',
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'placeholder' => 'part.name.placeholder',
|
'placeholder' => 'part.name.placeholder',
|
||||||
'autofocus' => true,
|
'autofocus' => $is_new,
|
||||||
],
|
],
|
||||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||||
]);
|
]);
|
||||||
|
|
|
||||||
|
|
@ -115,7 +115,7 @@ class PartBaseType extends AbstractType
|
||||||
'label' => 'part.edit.name',
|
'label' => 'part.edit.name',
|
||||||
'attr' => [
|
'attr' => [
|
||||||
'placeholder' => 'part.edit.name.placeholder',
|
'placeholder' => 'part.edit.name.placeholder',
|
||||||
'autofocus' => true,
|
'autofocus' => $new_part,
|
||||||
],
|
],
|
||||||
])
|
])
|
||||||
->add('description', RichTextEditorType::class, [
|
->add('description', RichTextEditorType::class, [
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue