mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-08-04 10:14:44 +02:00
Explicitly call translator interface for form labels.
This helps us to extract the translation keys.
This commit is contained in:
parent
f132c65964
commit
758a2ba25d
16 changed files with 391 additions and 226 deletions
|
@ -45,18 +45,20 @@ class MeasurementUnitAdminForm extends BaseEntityAdminForm
|
|||
$is_new = $entity->getID() === null;
|
||||
|
||||
$builder->add('is_integer', CheckboxType::class, ['required' => false,
|
||||
'label' => 'measurement_unit.is_integer.label', 'help' => 'measurement_unit.is_integer.help',
|
||||
'label_attr'=> ['class' => 'checkbox-custom'],
|
||||
'label' => $this->trans->trans('measurement_unit.edit.is_integer'),
|
||||
'help' => $this->trans->trans('measurement_unit.edit.is_integer.help'),
|
||||
'label_attr' => ['class' => 'checkbox-custom'],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]);
|
||||
|
||||
$builder->add('use_si_prefix', CheckboxType::class, ['required' => false,
|
||||
'label' => 'measurement_unit.use_si_prefix.label', 'help' => 'measurement_unit.use_si_prefix.help',
|
||||
'label_attr'=> ['class' => 'checkbox-custom'],
|
||||
'label' => $this->trans->trans('measurement_unit.edit.use_si_prefix'),
|
||||
'help' => $this->trans->trans('measurement_unit.edit.use_si_prefix.help'),
|
||||
'label_attr' => ['class' => 'checkbox-custom'],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]);
|
||||
|
||||
$builder->add('unit', TextType::class, ['required' => false,
|
||||
'label' => 'measurement_unit.unit.label', 'attr' => ['placeholder' => 'measurement_unit.unit.placeholder'],
|
||||
'label' => $this->trans->trans('measurement_unit.edit.unit_symbol'),
|
||||
'attr' => ['placeholder' => $this->trans->trans('measurement_unit.edit.unit_symbol.placeholder')],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]);
|
||||
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue