Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve forms #18

Merged
merged 3 commits into from
Aug 25, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Database: require password only when creating the database
  • Loading branch information
jmsche committed Aug 24, 2021
commit 767472389eab4943abe14a8e59a5e65e15ca9fbd
2 changes: 1 addition & 1 deletion src/Controller/Admin/DatabaseCrudController.php
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ public function configureFields(string $pageName): iterable
yield TextField::new('plainPassword', 'database.field.password')
->setHelp('database.help.password')
->onlyOnForms()
->setRequired(true);
->setRequired(Crud::PAGE_NEW === $pageName);
yield NumberField::new('maxBackups', 'database.field.max_backups');

yield CollectionField::new('backups', 'database.field.backups')
Expand Down
2 changes: 1 addition & 1 deletion translations/messages.en.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ database:
created_at: Created at
backups: Backups
help:
password: Passwords are hashed and aren't displayed unhashed. They will be unhashed only when necessary to launch backups. You have to fill this field at each update.
password: Passwords are hashed and aren't displayed unhashed. They will be unhashed only when necessary to launch backups.
admin_label:
singular: Database
plural: Databases
Expand Down
2 changes: 1 addition & 1 deletion translations/messages.fr.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ database:
created_at: Ajoutée le
backups: Sauvegardes
help:
password: Les mots de passe seront cryptés et n'apparaîtront pas en clair. Ils seront décryptés uniquement lorsqu'ils seront nécessaires pour lancer les sauvegardes. Vous devez renseigner ce champ à chaque modification.
password: Les mots de passe seront cryptés et n'apparaîtront pas en clair. Ils seront décryptés uniquement lorsqu'ils seront nécessaires pour lancer les sauvegardes.
admin_label:
singular: Base de données
plural: Bases de données
Expand Down