Bladeren bron

Correctif

feature/symfony6.1
Fabien Normand 2 jaren geleden
bovenliggende
commit
796d8d4b8b
2 gewijzigde bestanden met toevoegingen van 3 en 2 verwijderingen
  1. +2
    -2
      Controller/AbstractAdminController.php
  2. +1
    -0
      Resources/translations/admin.fr.yaml

+ 2
- 2
Controller/AbstractAdminController.php Bestand weergeven

@@ -326,7 +326,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController
) {
if (!$this->isGranted(
Permission::EA_EXECUTE_ACTION,
['action' => "duplicate", 'entity' => $context->getEntity()]
['action' =>ActionDefinition::DUPLICATE, 'entity' => $context->getEntity()]
)) {
throw new ForbiddenActionException($context);
}
@@ -344,7 +344,7 @@ abstract class AbstractAdminController extends EaAbstractCrudController
->setEntityId($newEntity->getId())
->generateUrl();

$this->addFlashTranslator('success', 'duplicated');
$this->addFlashTranslator('success', ActionDefinition::DUPLICATE);

return $this->redirect($url);
}

+ 1
- 0
Resources/translations/admin.fr.yaml Bestand weergeven

@@ -156,6 +156,7 @@ entity:
created: L'élément a bien été créé
updated: L'élément a bien été mis à jour
deleted: L'élément a bien été supprimé
duplicate: L'élément a bien été dupliqué
error:
created: Une erreur est survenue à la création de l'élément
updated: Une erreur est survenue à la mis à jour de l'élément

Laden…
Annuleren
Opslaan