mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-19 08:39:34 +00:00
Assembly um IPN-Eingabemöglichkeit und Automatismus zur Name-Angabe erweitern
This commit is contained in:
parent
7e8d444ac8
commit
bdbaab98c5
29 changed files with 287 additions and 3 deletions
|
|
@ -48,8 +48,11 @@ use Symfony\Component\OptionsResolver\OptionsResolver;
|
|||
|
||||
class BaseEntityAdminForm extends AbstractType
|
||||
{
|
||||
public function __construct(protected Security $security, protected EventCommentNeededHelper $eventCommentNeededHelper)
|
||||
{
|
||||
public function __construct(
|
||||
protected Security $security,
|
||||
protected EventCommentNeededHelper $eventCommentNeededHelper,
|
||||
protected bool $useAssemblyIpnPlaceholder = false
|
||||
) {
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
|
|
@ -70,6 +73,7 @@ class BaseEntityAdminForm extends AbstractType
|
|||
->add('name', TextType::class, [
|
||||
'empty_data' => '',
|
||||
'label' => 'name.label',
|
||||
'data' => $is_new && $entity instanceof Assembly && $this->useAssemblyIpnPlaceholder ? '%%ipn%%' : $entity->getName(),
|
||||
'attr' => [
|
||||
'placeholder' => 'part.name.placeholder',
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue