mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-12-10 04:59:30 +00:00
Do not clear the mass import form if errors appeared
This commit is contained in:
parent
319ac406a8
commit
b457298152
1 changed files with 6 additions and 3 deletions
|
|
@ -380,12 +380,15 @@ abstract class BaseAdminController extends AbstractController
|
|||
}
|
||||
$em->flush();
|
||||
|
||||
if (count($results) > 0) {
|
||||
if (count($created_count) > 0) {
|
||||
$this->addFlash('success', t('entity.mass_creation_flash', ['%COUNT%' => $created_count]));
|
||||
}
|
||||
|
||||
//Recreate mass creation form, so we get the updated parent list and empty lines
|
||||
$mass_creation_form = $this->createForm(MassCreationForm::class, ['entity_class' => $this->entity_class]);
|
||||
if (count($errors)) {
|
||||
//Recreate mass creation form, so we get the updated parent list and empty lines
|
||||
$mass_creation_form = $this->createForm(MassCreationForm::class, ['entity_class' => $this->entity_class]);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return $this->render($this->twig_template, [
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue