mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-22 11:54:41 +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
|
@ -44,15 +44,17 @@ class CurrencyAdminForm extends BaseEntityAdminForm
|
|||
{
|
||||
$is_new = $entity->getID() === null;
|
||||
|
||||
$builder->add('iso_code', CurrencyType::class , ['required' => true,
|
||||
$builder->add('iso_code', CurrencyType::class, [
|
||||
'required' => false,
|
||||
'label' => 'currency.iso_code.label',
|
||||
'label' => $this->trans->trans('currency.edit.iso_code'),
|
||||
'preferred_choices' => ['EUR', 'USD', 'GBP', 'JPY', 'CNY'],
|
||||
'attr' => ['class' => 'selectpicker', 'data-live-search' => true],
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]);
|
||||
|
||||
$builder->add('exchange_rate', MoneyType::class, ['required' => false,
|
||||
'label' => 'currency.exchange_rate.label', 'currency' => $this->params->get('default_currency'),
|
||||
$builder->add('exchange_rate', MoneyType::class, [
|
||||
'required' => false,
|
||||
'label' => $this->trans->trans('currency.edit.exchange_rate'),
|
||||
'currency' => $this->params->get('default_currency'),
|
||||
'scale' => 6,
|
||||
'disabled' => !$this->security->isGranted($is_new ? 'create' : 'edit', $entity)]);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue