Allow users to save a new label profiles directly from the label generator dialog

This fixes issue #806
This commit is contained in:
Jan Böhmer 2025-01-05 22:00:07 +01:00
parent 9d09543eb9
commit f75704f77c
4 changed files with 76 additions and 1 deletions

View file

@ -71,6 +71,22 @@ class LabelDialogType extends AbstractType
'label' => false,
'disabled' => !$this->security->isGranted('@labels.edit_options') || $options['disable_options'],
]);
$builder->add('save_profile_name', TextType::class, [
'required' => false,
'attr' =>[
'placeholder' => 'label_generator.save_profile_name',
]
]);
$builder->add('save_profile', SubmitType::class, [
'label' => 'label_generator.save_profile',
'disabled' => !$this->security->isGranted('@labels.create_profiles'),
'attr' => [
'class' => 'btn btn-outline-success'
]
]);
$builder->add('update', SubmitType::class, [
'label' => 'label_generator.update',
]);