mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-07-20 10:57:40 +02:00
Added a button to update exchange rates via web gui.
This commit is contained in:
parent
ff7c1cddc7
commit
af42c3cca0
11 changed files with 1137 additions and 909 deletions
|
@ -46,6 +46,7 @@ use App\Entity\Base\AbstractNamedDBElement;
|
|||
use App\Form\Type\BigDecimalMoneyType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\CurrencyType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\MoneyType;
|
||||
use Symfony\Component\Form\Extension\Core\Type\SubmitType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
use Symfony\Component\Security\Core\Security;
|
||||
|
||||
|
@ -82,5 +83,16 @@ class CurrencyAdminForm extends BaseEntityAdminForm
|
|||
'scale' => 6,
|
||||
'disabled' => ! $this->security->isGranted($is_new ? 'create' : 'edit', $entity),
|
||||
]);
|
||||
|
||||
if(!$is_new) {
|
||||
$builder->add(
|
||||
'update_exchange_rate',
|
||||
SubmitType::class,
|
||||
[
|
||||
'label' => 'currency.edit.update_rate',
|
||||
'disabled' => ! $this->security->isGranted('edit', $entity)
|
||||
]
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue