Show a notice flash if the content of labels is empty

This implements the suggestion of issue #297
This commit is contained in:
Jan Böhmer 2023-06-27 00:18:47 +02:00
parent 742f1f4622
commit 20826daa18
2 changed files with 11 additions and 0 deletions

View file

@ -126,6 +126,11 @@ class LabelController extends AbstractController
new FormError($this->translator->trans('label_generator.no_entities_found'))
);
}
//When the profile lines are empty, show a notice flash
if (trim($form_options->getLines()) === '') {
$this->addFlash('notice', 'label_generator.no_lines_given');
}
}
return $this->render('label_system/dialog.html.twig', [