mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-17 00:19:31 +00:00
Added an button to update a label profile from directly inside the label generator
Related to issue #994
This commit is contained in:
parent
a18ec373d2
commit
46d1a0cb1b
4 changed files with 50 additions and 1 deletions
|
|
@ -87,6 +87,16 @@ class LabelDialogType extends AbstractType
|
|||
]
|
||||
]);
|
||||
|
||||
if ($options['profile'] !== null) {
|
||||
$builder->add('update_profile', SubmitType::class, [
|
||||
'label' => 'label_generator.update_profile',
|
||||
'disabled' => !$this->security->isGranted('edit', $options['profile']),
|
||||
'attr' => [
|
||||
'class' => 'btn btn-outline-success'
|
||||
]
|
||||
]);
|
||||
}
|
||||
|
||||
$builder->add('update', SubmitType::class, [
|
||||
'label' => 'label_generator.update',
|
||||
]);
|
||||
|
|
@ -97,5 +107,6 @@ class LabelDialogType extends AbstractType
|
|||
parent::configureOptions($resolver);
|
||||
$resolver->setDefault('mapped', false);
|
||||
$resolver->setDefault('disable_options', false);
|
||||
$resolver->setDefault('profile', null);
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue