improv
This commit is contained in:
parent
66c4c1fe4f
commit
2c2e34b71e
42 changed files with 910 additions and 939 deletions
|
@ -1,11 +1,14 @@
|
|||
<?php
|
||||
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace App\Form;
|
||||
|
||||
use App\Entity\DrinkType;
|
||||
use App\Entity\InventoryRecord;
|
||||
use Symfony\Bridge\Doctrine\Form\Type\EntityType;
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\NumberType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\OptionsResolver\OptionsResolver;
|
||||
|
||||
|
@ -14,19 +17,14 @@ class InventoryRecordForm extends AbstractType
|
|||
public function buildForm(FormBuilderInterface $builder, array $options): void
|
||||
{
|
||||
$builder
|
||||
->add('quantity')
|
||||
->add('timestamp', null, [
|
||||
'widget' => 'single_text',
|
||||
])
|
||||
->add('createdAt', null, [
|
||||
'widget' => 'single_text',
|
||||
])
|
||||
->add('updatedAt', null, [
|
||||
'widget' => 'single_text',
|
||||
])
|
||||
->add('quantity', NumberType::class)
|
||||
->add('drinkType', EntityType::class, [
|
||||
'class' => DrinkType::class,
|
||||
'choice_label' => 'id',
|
||||
'attr' => [
|
||||
'style' => 'display: none;',
|
||||
],
|
||||
'label' => false,
|
||||
])
|
||||
;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue