From 4d79f8d79bce5dd89efbb57178e506fd55623415 Mon Sep 17 00:00:00 2001 From: core23 Date: Sat, 18 May 2024 18:56:44 +0200 Subject: [PATCH] Add status to show page --- src/Admin/Model/UserAdmin.php | 2 ++ src/Resources/translations/NucleosUserAdminBundle.de.xlf | 4 ++++ src/Resources/translations/NucleosUserAdminBundle.en.xlf | 4 ++++ 3 files changed, 10 insertions(+) diff --git a/src/Admin/Model/UserAdmin.php b/src/Admin/Model/UserAdmin.php index 7d1e5115..0fe96429 100644 --- a/src/Admin/Model/UserAdmin.php +++ b/src/Admin/Model/UserAdmin.php @@ -22,6 +22,7 @@ use Sonata\AdminBundle\Admin\AbstractAdmin; use Sonata\AdminBundle\Datagrid\DatagridMapper; use Sonata\AdminBundle\Datagrid\ListMapper; +use Sonata\AdminBundle\FieldDescription\FieldDescriptionInterface; use Sonata\AdminBundle\Form\FormMapper; use Sonata\AdminBundle\Form\Type\ModelType; use Sonata\AdminBundle\Show\ShowMapper; @@ -129,6 +130,7 @@ protected function configureShowFields(ShowMapper $show): void ->with('general', ['label' => 'show.group_general']) ->add('username') ->add('email') + ->add('enabled', FieldDescriptionInterface::TYPE_BOOLEAN) ->end() ->with('groups', ['label' => 'show.group_groups']) ->add('groups') diff --git a/src/Resources/translations/NucleosUserAdminBundle.de.xlf b/src/Resources/translations/NucleosUserAdminBundle.de.xlf index 533e4ba1..507c7272 100644 --- a/src/Resources/translations/NucleosUserAdminBundle.de.xlf +++ b/src/Resources/translations/NucleosUserAdminBundle.de.xlf @@ -426,6 +426,10 @@ list.label_id ID + + show.label_enabled + Aktiviert + diff --git a/src/Resources/translations/NucleosUserAdminBundle.en.xlf b/src/Resources/translations/NucleosUserAdminBundle.en.xlf index 74a352a7..cab2f234 100644 --- a/src/Resources/translations/NucleosUserAdminBundle.en.xlf +++ b/src/Resources/translations/NucleosUserAdminBundle.en.xlf @@ -394,6 +394,10 @@ list.label_id ID + + show.label_enabled + Enabled +