mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2026-01-14 14:19:33 +00:00
Rebase auf Part-DB v2.1.2
This commit is contained in:
parent
7abc37fc9a
commit
360fed1f5e
33 changed files with 1020 additions and 162 deletions
|
|
@ -26,6 +26,7 @@ use App\Entity\Base\AbstractNamedDBElement;
|
|||
use App\Form\AssemblySystem\AssemblyBOMEntryCollectionType;
|
||||
use App\Form\Type\RichTextEditorType;
|
||||
use App\Services\LogSystem\EventCommentNeededHelper;
|
||||
use App\Settings\MiscSettings\AssemblySettings;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use Symfony\Component\Form\Extension\Core\Type\ChoiceType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\TextType;
|
||||
|
|
@ -36,9 +37,9 @@ class AssemblyAdminForm extends BaseEntityAdminForm
|
|||
public function __construct(
|
||||
protected Security $security,
|
||||
protected EventCommentNeededHelper $eventCommentNeededHelper,
|
||||
protected bool $useAssemblyIpnPlaceholder = false
|
||||
protected AssemblySettings $assemblySettings,
|
||||
) {
|
||||
parent::__construct($security, $eventCommentNeededHelper, $useAssemblyIpnPlaceholder);
|
||||
parent::__construct($security, $eventCommentNeededHelper, $assemblySettings);
|
||||
}
|
||||
|
||||
protected function additionalFormElements(FormBuilderInterface $builder, array $options, AbstractNamedDBElement $entity): void
|
||||
|
|
|
|||
|
|
@ -27,6 +27,7 @@ use App\Entity\PriceInformations\Currency;
|
|||
use App\Entity\ProjectSystem\Project;
|
||||
use App\Entity\UserSystem\Group;
|
||||
use App\Services\LogSystem\EventCommentType;
|
||||
use App\Settings\MiscSettings\AssemblySettings;
|
||||
use Symfony\Bundle\SecurityBundle\Security;
|
||||
use App\Entity\Base\AbstractNamedDBElement;
|
||||
use App\Entity\Base\AbstractStructuralDBElement;
|
||||
|
|
@ -51,7 +52,7 @@ class BaseEntityAdminForm extends AbstractType
|
|||
public function __construct(
|
||||
protected Security $security,
|
||||
protected EventCommentNeededHelper $eventCommentNeededHelper,
|
||||
protected bool $useAssemblyIpnPlaceholder = false
|
||||
protected AssemblySettings $assemblySettings,
|
||||
) {
|
||||
}
|
||||
|
||||
|
|
@ -73,7 +74,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(),
|
||||
'data' => $is_new && $entity instanceof Assembly && $this->assemblySettings->useIpnPlaceholderInName ? '%%ipn%%' : $entity->getName(),
|
||||
'attr' => [
|
||||
'placeholder' => 'part.name.placeholder',
|
||||
],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue