diff options
author | adev <adev2000@gmail.com> | 2017-05-05 00:12:16 +0200 |
---|---|---|
committer | adev <adev2000@gmail.com> | 2017-05-05 00:12:16 +0200 |
commit | ab9eb5cdb767510c0c2b9d1b114243741f748f89 (patch) | |
tree | e57d1509ea0cb3f38dccc3e9247c065a377d40d7 /src/Wallabag/ApiBundle | |
parent | 9579003045970d4feed9de955fe939d4f02fe439 (diff) | |
download | wallabag-ab9eb5cdb767510c0c2b9d1b114243741f748f89.tar.gz wallabag-ab9eb5cdb767510c0c2b9d1b114243741f748f89.tar.zst wallabag-ab9eb5cdb767510c0c2b9d1b114243741f748f89.zip |
Fix display the form errors correctly
Use `property_path` form option to map underscored form fields
to object properties
@see https://github.com/symfony/symfony/issues/9162#issuecomment-25431148
Fix #3067
Diffstat (limited to 'src/Wallabag/ApiBundle')
-rw-r--r-- | src/Wallabag/ApiBundle/Form/Type/ClientType.php | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/Wallabag/ApiBundle/Form/Type/ClientType.php b/src/Wallabag/ApiBundle/Form/Type/ClientType.php index 0ea1a9c5..eaea4feb 100644 --- a/src/Wallabag/ApiBundle/Form/Type/ClientType.php +++ b/src/Wallabag/ApiBundle/Form/Type/ClientType.php | |||
@@ -16,7 +16,11 @@ class ClientType extends AbstractType | |||
16 | { | 16 | { |
17 | $builder | 17 | $builder |
18 | ->add('name', TextType::class, ['label' => 'developer.client.form.name_label']) | 18 | ->add('name', TextType::class, ['label' => 'developer.client.form.name_label']) |
19 | ->add('redirect_uris', UrlType::class, ['required' => false, 'label' => 'developer.client.form.redirect_uris_label']) | 19 | ->add('redirect_uris', UrlType::class, [ |
20 | 'required' => false, | ||
21 | 'label' => 'developer.client.form.redirect_uris_label', | ||
22 | 'property_path' => 'redirectUris', | ||
23 | ]) | ||
20 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) | 24 | ->add('save', SubmitType::class, ['label' => 'developer.client.form.save_label']) |
21 | ; | 25 | ; |
22 | 26 | ||