Ver código fonte

Merge branch 'develop'

master
Guillaume 2 anos atrás
pai
commit
8a4efa35db
3 arquivos alterados com 51 adições e 44 exclusões
  1. +46
    -44
      Definition/Field/User/UserFieldDefinition.php
  2. +4
    -0
      Resources/assets/app/adminlte/index/index.scss
  3. +1
    -0
      Resources/translations/admin.fr.yaml

+ 46
- 44
Definition/Field/User/UserFieldDefinition.php Ver arquivo

@@ -26,30 +26,30 @@ class UserFieldDefinition extends AbstractFieldDefinition
$this->rolesDefinition = $rolesDefinition;
}

public function configureFieldsIndex(): array
public function configureIndex(): array
{
return [
'id',
'gender',
'lastname',
'firstname',
'email',
'id',
'gender',
'lastname',
'firstname',
'email',
'groupUsers'
];
}

public function configureFieldsForm(): array
public function configureForm(): array
{
return [
'id',
'gender',
'lastname',
'firstname',
'email',
'phone',
'birthdate',
'groupUsers',
'ticketTypesNotification'
'id',
'gender',
'lastname',
'firstname',
'email',
'phone',
'birthdate',
'groupUsers',
'ticketTypesNotification'
];
}

@@ -61,34 +61,36 @@ class UserFieldDefinition extends AbstractFieldDefinition
public function configureFields(): array
{
return [
'id' => IntegerField::new('id')->onlyOnIndex()->setSortable(true),
'gender' => ChoiceField::new('gender')->setChoices(
$this->translatorAdmin->transChoices(UserSolver::getGenderChoices(), 'User', 'gender')
)
->setFormTypeOption('expanded', true)
->setFormTypeOption('multiple', false)
->setSortable(true),
'lastname' => TextField::new('lastname')->setSortable(true),
'firstname' => TextField::new('firstname')->setSortable(true),
'email' => TextField::new('email')->setSortable(true),
'phone' => TextField::new('phone')->setSortable(true),
'birthdate' => DateField::new('birthdate')
->setFormTypeOption('required', false)
->setSortable(true),
'groupUsers' => AssociationField::new('groupUsers')->setSortable(true),
'ticketTypesNotification' => ChoiceField::new('ticketTypesNotification')
->setSortable(true)
->setFormTypeOption('expanded', false)
->setFormTypeOption('multiple', true)
->setChoices($this->translatorAdmin->transChoices(
TicketSolver::getTypeChoices(),
'Ticket',
'type'
)),
'roles' => ChoiceField::new('roles')
->allowMultipleChoices()
->autocomplete()
->setChoices($this->rolesDefinition->getRolesList()),
'id' => IntegerField::new('id')->onlyOnIndex()->setSortable(true),
'gender' => ChoiceField::new('gender')->setChoices(
$this->translatorAdmin->transChoices(UserSolver::getGenderChoices(), 'User', 'gender')
)
->setFormTypeOption('expanded', true)
->setFormTypeOption('multiple', false)
->setSortable(true),
'lastname' => TextField::new('lastname')->setSortable(true),
'firstname' => TextField::new('firstname')->setSortable(true),
'email' => TextField::new('email')->setSortable(true),
'phone' => TextField::new('phone')->setSortable(true),
'birthdate' => DateField::new('birthdate')
->setFormTypeOption('required', false)
->setSortable(true),
'groupUsers' => AssociationField::new('groupUsers')->setSortable(true),
'ticketTypesNotification' => ChoiceField::new('ticketTypesNotification')
->setSortable(true)
->setFormTypeOption('expanded', false)
->setFormTypeOption('multiple', true)
->setChoices(
$this->translatorAdmin->transChoices(
TicketSolver::getTypeChoices(),
'Ticket',
'type'
)
),
'roles' => ChoiceField::new('roles')
->allowMultipleChoices()
->autocomplete()
->setChoices($this->rolesDefinition->getRolesList()),
];
}


+ 4
- 0
Resources/assets/app/adminlte/index/index.scss Ver arquivo

@@ -1,3 +1,7 @@
.select2-dropdown {
min-width: 200px;
}

table.table {
.dropdown-actions {
display: inline-block ;

+ 1
- 0
Resources/translations/admin.fr.yaml Ver arquivo

@@ -57,6 +57,7 @@ entity:
1: Femme
birthdate: Date de naissance
groupUsers: Groupe d'utilisateurs
isVerified: Actif
Page:
label: Page
label_plurial: Pages

Carregando…
Cancelar
Salvar