mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-20 19:05:14 +02:00
Allow to put parameters in different groups.
This commit is contained in:
parent
43857ce985
commit
2899db0206
31 changed files with 114 additions and 23 deletions
|
@ -47,7 +47,7 @@ class ParameterType extends AbstractType
|
|||
'attr' => [
|
||||
'placeholder' => 'parameters.symbol.placeholder',
|
||||
'class' => 'form-control-sm',
|
||||
'style' => 'max-width: 15ch;',
|
||||
'style' => 'max-width: 12ch;',
|
||||
],
|
||||
]);
|
||||
$builder->add('value_text', TextType::class, [
|
||||
|
@ -66,7 +66,7 @@ class ParameterType extends AbstractType
|
|||
'step' => 'any',
|
||||
'placeholder' => 'parameters.max.placeholder',
|
||||
'class' => 'form-control-sm',
|
||||
'style' => 'max-width: 15ch;',
|
||||
'style' => 'max-width: 12ch;',
|
||||
],
|
||||
]);
|
||||
$builder->add('value_min', NumberType::class, [
|
||||
|
@ -76,7 +76,7 @@ class ParameterType extends AbstractType
|
|||
'step' => 'any',
|
||||
'placeholder' => 'parameters.min.placeholder',
|
||||
'class' => 'form-control-sm',
|
||||
'style' => 'max-width: 15ch;',
|
||||
'style' => 'max-width: 12ch;',
|
||||
],
|
||||
]);
|
||||
$builder->add('value_typical', NumberType::class, [
|
||||
|
@ -86,7 +86,7 @@ class ParameterType extends AbstractType
|
|||
'step' => 'any',
|
||||
'placeholder' => 'parameters.typical.placeholder',
|
||||
'class' => 'form-control-sm',
|
||||
'style' => 'max-width: 15ch;',
|
||||
'style' => 'max-width: 12ch;',
|
||||
],
|
||||
]);
|
||||
$builder->add('unit', TextType::class, [
|
||||
|
@ -98,12 +98,21 @@ class ParameterType extends AbstractType
|
|||
'style' => 'max-width: 8ch;',
|
||||
],
|
||||
]);
|
||||
|
||||
$builder->add('group', TextType::class, [
|
||||
'required' => false,
|
||||
'empty_data' => '',
|
||||
'attr' => [
|
||||
'placeholder' => 'parameter.group.placeholder',
|
||||
'class' => 'form-control-sm',
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
public function configureOptions(OptionsResolver $resolver): void
|
||||
{
|
||||
$resolver->setDefaults([
|
||||
'data_class' => AbstractParameter::class,
|
||||
]);
|
||||
'data_class' => AbstractParameter::class,
|
||||
]);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -52,6 +52,7 @@ use App\Entity\Parts\MeasurementUnit;
|
|||
use App\Entity\Parts\Part;
|
||||
use App\Entity\PriceInformations\Orderdetail;
|
||||
use App\Form\AttachmentFormType;
|
||||
use App\Form\ParameterGroupType;
|
||||
use App\Form\ParameterType;
|
||||
use App\Form\Type\MasterPictureAttachmentType;
|
||||
use App\Form\Type\SIUnitType;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue