mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-21 01:25:55 +02:00
Show a notice flash if the content of labels is empty
This implements the suggestion of issue #297
This commit is contained in:
parent
742f1f4622
commit
20826daa18
2 changed files with 11 additions and 0 deletions
|
@ -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', [
|
||||
|
|
|
@ -11463,5 +11463,11 @@ Element 3</target>
|
|||
<target>Auto (decide based on system settings)</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="9N0N8aL" name="label_generator.no_lines_given">
|
||||
<segment>
|
||||
<source>label_generator.no_lines_given</source>
|
||||
<target>No text content given! The labels will remain empty.</target>
|
||||
</segment>
|
||||
</unit>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue