diff --git a/src/Form/Part/OrderdetailType.php b/src/Form/Part/OrderdetailType.php index 09623b75..d009a935 100644 --- a/src/Form/Part/OrderdetailType.php +++ b/src/Form/Part/OrderdetailType.php @@ -47,20 +47,26 @@ class OrderdetailType extends AbstractType public function buildForm(FormBuilderInterface $builder, array $options) { $builder->add('supplierpartnr', TextType::class, [ + 'label' => 'orderdetails.edit.supplierpartnr', 'required' => false, 'empty_data' => "" ]); - $builder->add('supplier', StructuralEntityType::class, ['class' => Supplier::class, 'disable_not_selectable' => true]); + $builder->add('supplier', StructuralEntityType::class, [ + 'class' => Supplier::class, 'disable_not_selectable' => true, + 'label' => 'orderdetails.edit.supplier' + ]); $builder->add('supplier_product_url', UrlType::class, [ 'required' => false, - 'empty_data' => "" + 'empty_data' => "", + 'label' => 'orderdetails.edit.url' ]); $builder->add('obsolete', CheckboxType::class, [ 'required' => false, - 'label_attr' => ['class' => 'checkbox-custom'] + 'label_attr' => ['class' => 'checkbox-custom'], + 'label' => 'orderdetails.edit.obsolete' ]); //Attachment section diff --git a/src/Form/Part/PricedetailType.php b/src/Form/Part/PricedetailType.php index ce6040e7..0794eaca 100644 --- a/src/Form/Part/PricedetailType.php +++ b/src/Form/Part/PricedetailType.php @@ -47,6 +47,7 @@ class PricedetailType extends AbstractType { public function buildForm(FormBuilderInterface $builder, array $options) { + //No labels needed, we define translation in templates $builder->add("min_discount_quantity", IntegerType::class); $builder->add("price_related_quantity", IntegerType::class); $builder->add("price", NumberType::class); diff --git a/templates/Parts/edit/edit_form_styles.html.twig b/templates/Parts/edit/edit_form_styles.html.twig index ea72b8ee..1cea4dcf 100644 --- a/templates/Parts/edit/edit_form_styles.html.twig +++ b/templates/Parts/edit/edit_form_styles.html.twig @@ -34,9 +34,9 @@ - - - + + + diff --git a/templates/Parts/edit/edit_part_info.html.twig b/templates/Parts/edit/edit_part_info.html.twig index 14900a19..ec8d1c4f 100644 --- a/templates/Parts/edit/edit_part_info.html.twig +++ b/templates/Parts/edit/edit_part_info.html.twig @@ -90,5 +90,6 @@ {{ form_row(form.save) }} {{ form_row(form.reset) }} + {{ form_errors(form) }} {{ form_end(form) }} {% endblock %} \ No newline at end of file
Min Qty.PricePrice Qty{% trans %}pricedetails.edit.min_qty{% endtrans %}{% trans %}pricedetails.edit.price{% endtrans %}{% trans %}pricedetails.edit.price_qty{% endtrans %}