Made orderdetails strings translatable.

This commit is contained in:
Jan Böhmer 2019-08-30 16:54:35 +02:00
parent 6e34cc3633
commit c4d5d4291b
4 changed files with 14 additions and 6 deletions

View file

@ -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

View file

@ -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);