@@ -54,6 +54,7 @@ class ChangePasswordFormType extends AbstractType | |||
PasswordType::class, | |||
[ | |||
'label' => 'form.account_password.field.current_password', | |||
'translation_domain' => 'admin', | |||
'mapped' => false, | |||
'constraints' => [ | |||
new NotBlank(), | |||
@@ -71,6 +72,7 @@ class ChangePasswordFormType extends AbstractType | |||
'first_options' => ['label' => 'form.account_password.field.new_password'], | |||
'second_options' => ['label' => 'form.account_password.field.new_password_repeat'], | |||
'invalid_message' => $this->translatorAdmin->trans('form.account_password.message.invalid_passwords'), | |||
'translation_domain' => 'admin', | |||
] | |||
); | |||
} |
@@ -32,23 +32,39 @@ class ProfileFormType extends AbstractType | |||
$builder->add( | |||
'firstname', | |||
TextType::class | |||
TextType::class, | |||
[ | |||
'label' => 'entity.default.fields.firstname', | |||
'translation_domain' => 'admin', | |||
] | |||
); | |||
$builder->add( | |||
'lastname', | |||
TextType::class | |||
TextType::class, | |||
[ | |||
'label' => 'entity.default.fields.lastname', | |||
'translation_domain' => 'admin', | |||
] | |||
); | |||
$builder->add( | |||
'email', | |||
EmailType::class | |||
EmailType::class, | |||
[ | |||
'label' => 'entity.default.fields.email', | |||
'translation_domain' => 'admin', | |||
] | |||
); | |||
if (property_exists($entityName, 'phone')) { | |||
$builder->add( | |||
'phone', | |||
TextType::class | |||
TextType::class, | |||
[ | |||
'label' => 'entity.default.fields.phone', | |||
'translation_domain' => 'admin', | |||
] | |||
); | |||
} | |||
} |
@@ -25,7 +25,7 @@ title: | |||
action: | |||
create: Créer | |||
edit: Éditer | |||
edit: Modifier | |||
save: Sauvegarder | |||
sort: Ordonner | |||
delete: Supprimer |
@@ -110,6 +110,7 @@ class TwigExtension extends AbstractExtension | |||
new TwigFilter('format_price', [$this, 'formatPrice']), | |||
new TwigFilter('sov_cache', [$this, 'sovCache']), | |||
new TwigFilter('slugify', [$this, 'slugify']), | |||
new TwigFilter('md5', [$this, 'md5']), | |||
]; | |||
} | |||
@@ -203,4 +204,8 @@ class TwigExtension extends AbstractExtension | |||
return $adminUrlGenerator->generateUrl(); | |||
} | |||
public function md5(string $text): string | |||
{ | |||
return md5($text); | |||
} | |||
} |