mirror of
https://github.com/Part-DB/Part-DB-server.git
synced 2025-06-20 17:15:51 +02:00
Show a warning flash, when creating a part from an info provider that has no category autoprovided
This partially fixes the problems described in discussion #808
This commit is contained in:
parent
273bde90f2
commit
c9e519d0b5
2 changed files with 10 additions and 0 deletions
|
@ -229,6 +229,10 @@ class PartController extends AbstractController
|
|||
$dto = $infoRetriever->getDetails($providerKey, $providerId);
|
||||
$new_part = $infoRetriever->dtoToPart($dto);
|
||||
|
||||
if ($new_part->getCategory() === null || $new_part->getCategory()->getID() === null) {
|
||||
$this->addFlash('warning', t("part.create_from_info_provider.no_category_yet"));
|
||||
}
|
||||
|
||||
return $this->renderPartForm('new', $request, $new_part, [
|
||||
'info_provider_dto' => $dto,
|
||||
]);
|
||||
|
|
|
@ -12257,5 +12257,11 @@ Please note, that you can not impersonate a disabled user. If you try you will g
|
|||
<target>Update existing part from info provider</target>
|
||||
</segment>
|
||||
</unit>
|
||||
<unit id="X5tEZJs" name="part.create_from_info_provider.no_category_yet">
|
||||
<segment>
|
||||
<source>part.create_from_info_provider.no_category_yet</source>
|
||||
<target>Category could not be automatically determined by the info provider. Review the data and select the category manually.</target>
|
||||
</segment>
|
||||
</unit>
|
||||
</file>
|
||||
</xliff>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue