Skip to content

Commit be14903

Browse files
Fix minor issues in administration (#4681)
2 parents 1d391b6 + 16f3cd6 commit be14903

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

src/Form/Admin/Product/ProductFormType.php

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -277,6 +277,18 @@ private function createBasicInformationGroup(
277277
'label' => 'Weight (g)',
278278
'required' => false,
279279
])
280+
->add('unit', ChoiceType::class, [
281+
'required' => true,
282+
'choices' => $this->unitFacade->getAll(),
283+
'choice_label' => 'name',
284+
'choice_value' => 'id',
285+
'constraints' => [
286+
new Constraints\NotBlank(
287+
message: 'Please choose unit',
288+
),
289+
],
290+
'label' => 'Unit',
291+
])
280292
->add('excludedTransports', ChoiceType::class, [
281293
'required' => false,
282294
'choices' => $this->transportFacade->getAll(),
@@ -313,6 +325,7 @@ private function createShortDescriptionsGroup(
313325
'entry_type' => TextareaType::class,
314326
'required' => false,
315327
'disabled' => $this->isProductVariant($product),
328+
'label' => false,
316329
]);
317330
}
318331

@@ -336,6 +349,7 @@ private function createDescriptionsGroup(FormBuilderInterface $builder, ?Product
336349
'entry_type' => CKEditorType::class,
337350
'required' => false,
338351
'disabled' => $this->isProductVariant($product),
352+
'label' => false,
339353
]);
340354
}
341355

@@ -420,20 +434,6 @@ private function createDisplayAvailabilityGroup(
420434
],
421435
]);
422436
}
423-
$builderDisplayAvailabilityGroup
424-
->add('unit', ChoiceType::class, [
425-
'required' => true,
426-
'choices' => $this->unitFacade->getAll(),
427-
'choice_label' => 'name',
428-
'choice_value' => 'id',
429-
'constraints' => [
430-
new Constraints\NotBlank(
431-
message: 'Please choose unit',
432-
),
433-
],
434-
'label' => 'Unit',
435-
]);
436-
437437
$builderDisplayAvailabilityGroup
438438
->add('orderingPriorityByDomainId', MultidomainType::class, [
439439
'entry_type' => TextType::class,

0 commit comments

Comments
 (0)