From f92fcb53ca78cc8822962e676b0db117e1a08aa5 Mon Sep 17 00:00:00 2001 From: Jeremy Benoist Date: Sun, 4 Dec 2016 13:51:58 +0100 Subject: Add CRUD for site credentials --- .../CoreBundle/Form/Type/SiteCredentialType.php | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 src/Wallabag/CoreBundle/Form/Type/SiteCredentialType.php (limited to 'src/Wallabag/CoreBundle/Form/Type') diff --git a/src/Wallabag/CoreBundle/Form/Type/SiteCredentialType.php b/src/Wallabag/CoreBundle/Form/Type/SiteCredentialType.php new file mode 100644 index 00000000..9db7c155 --- /dev/null +++ b/src/Wallabag/CoreBundle/Form/Type/SiteCredentialType.php @@ -0,0 +1,43 @@ +add('host', TextType::class, [ + 'label' => 'site_credential.form.host_label', + ]) + ->add('username', TextType::class, [ + 'label' => 'site_credential.form.username_label', + ]) + ->add('password', PasswordType::class, [ + 'label' => 'site_credential.form.password_label', + ]) + ->add('save', SubmitType::class, [ + 'label' => 'config.form.save', + ]) + ; + } + + public function configureOptions(OptionsResolver $resolver) + { + $resolver->setDefaults([ + 'data_class' => 'Wallabag\CoreBundle\Entity\SiteCredential', + ]); + } + + public function getBlockPrefix() + { + return 'site_credential'; + } +} -- cgit v1.2.3