aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/Wallabag
diff options
context:
space:
mode:
authorJeremy Benoist <jeremy.benoist@gmail.com>2016-12-04 13:51:58 +0100
committerJeremy Benoist <jeremy.benoist@gmail.com>2017-06-20 16:03:08 +0200
commitf92fcb53ca78cc8822962e676b0db117e1a08aa5 (patch)
tree80e4b828a6d96fe610728c1b60db4625767a5dd9 /src/Wallabag
parent873f6b8e03079d11fab541aa5b0bc6f8fe2d645e (diff)
downloadwallabag-f92fcb53ca78cc8822962e676b0db117e1a08aa5.tar.gz
wallabag-f92fcb53ca78cc8822962e676b0db117e1a08aa5.tar.zst
wallabag-f92fcb53ca78cc8822962e676b0db117e1a08aa5.zip
Add CRUD for site credentials
Diffstat (limited to 'src/Wallabag')
-rw-r--r--src/Wallabag/CoreBundle/Controller/SiteCredentialController.php138
-rw-r--r--src/Wallabag/CoreBundle/Entity/SiteCredential.php197
-rw-r--r--src/Wallabag/CoreBundle/Form/Type/SiteCredentialType.php43
-rw-r--r--src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php13
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.da.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.de.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.en.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.es.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml31
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.it.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml25
-rw-r--r--src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml5
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig60
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig44
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig53
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig20
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/edit.html.twig60
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/index.html.twig44
-rw-r--r--src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/new.html.twig53
23 files changed, 998 insertions, 13 deletions
diff --git a/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php
new file mode 100644
index 00000000..e7e43800
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Controller/SiteCredentialController.php
@@ -0,0 +1,138 @@
1<?php
2
3namespace Wallabag\CoreBundle\Controller;
4
5use Symfony\Component\HttpFoundation\Request;
6use Symfony\Bundle\FrameworkBundle\Controller\Controller;
7use Sensio\Bundle\FrameworkExtraBundle\Configuration\Method;
8use Sensio\Bundle\FrameworkExtraBundle\Configuration\Route;
9use Wallabag\UserBundle\Entity\User;
10use Wallabag\CoreBundle\Entity\SiteCredential;
11
12/**
13 * SiteCredential controller.
14 */
15class SiteCredentialController extends Controller
16{
17 /**
18 * Lists all User entities.
19 *
20 * @Route("/site-credential", name="site_credential_index")
21 * @Method("GET")
22 */
23 public function indexAction()
24 {
25 $em = $this->getDoctrine()->getManager();
26
27 $credentials = $em->getRepository('WallabagCoreBundle:SiteCredential')->findAll();
28
29 return $this->render('WallabagCoreBundle:SiteCredential:index.html.twig', array(
30 'credentials' => $credentials,
31 ));
32 }
33
34 /**
35 * Creates a new site credential entity.
36 *
37 * @Route("/site-credential/new", name="site_credential_new")
38 * @Method({"GET", "POST"})
39 */
40 public function newAction(Request $request)
41 {
42 $credential = new SiteCredential($this->getUser());
43
44 $form = $this->createForm('Wallabag\CoreBundle\Form\Type\SiteCredentialType', $credential);
45 $form->handleRequest($request);
46
47 if ($form->isSubmitted() && $form->isValid()) {
48 $em = $this->getDoctrine()->getManager();
49 $em->persist($credential);
50 $em->flush($credential);
51
52 $this->get('session')->getFlashBag()->add(
53 'notice',
54 $this->get('translator')->trans('flashes.site_credential.notice.added', ['%host%' => $credential->getHost()])
55 );
56
57 return $this->redirectToRoute('site_credential_edit', array('id' => $credential->getId()));
58 }
59
60 return $this->render('WallabagCoreBundle:SiteCredential:new.html.twig', array(
61 'credential' => $credential,
62 'form' => $form->createView(),
63 ));
64 }
65
66 /**
67 * Displays a form to edit an existing site credential entity.
68 *
69 * @Route("/site-credential/{id}/edit", name="site_credential_edit")
70 * @Method({"GET", "POST"})
71 */
72 public function editAction(Request $request, SiteCredential $siteCredential)
73 {
74 $deleteForm = $this->createDeleteForm($siteCredential);
75 $editForm = $this->createForm('Wallabag\CoreBundle\Form\Type\SiteCredentialType', $siteCredential);
76 $editForm->handleRequest($request);
77
78 if ($editForm->isSubmitted() && $editForm->isValid()) {
79 $em = $this->getDoctrine()->getManager();
80 $em->persist($siteCredential);
81 $em->flush();
82
83 $this->get('session')->getFlashBag()->add(
84 'notice',
85 $this->get('translator')->trans('flashes.site_credential.notice.updated', ['%host%' => $siteCredential->getHost()])
86 );
87
88 return $this->redirectToRoute('site_credential_edit', array('id' => $siteCredential->getId()));
89 }
90
91 return $this->render('WallabagCoreBundle:SiteCredential:edit.html.twig', array(
92 'credential' => $siteCredential,
93 'edit_form' => $editForm->createView(),
94 'delete_form' => $deleteForm->createView(),
95 ));
96 }
97
98 /**
99 * Deletes a site credential entity.
100 *
101 * @Route("/site-credential/{id}", name="site_credential_delete")
102 * @Method("DELETE")
103 */
104 public function deleteAction(Request $request, SiteCredential $siteCredential)
105 {
106 $form = $this->createDeleteForm($siteCredential);
107 $form->handleRequest($request);
108
109 if ($form->isSubmitted() && $form->isValid()) {
110 $this->get('session')->getFlashBag()->add(
111 'notice',
112 $this->get('translator')->trans('flashes.site_credential.notice.deleted', ['%host%' => $siteCredential->getHost()])
113 );
114
115 $em = $this->getDoctrine()->getManager();
116 $em->remove($siteCredential);
117 $em->flush();
118 }
119
120 return $this->redirectToRoute('site_credential_index');
121 }
122
123 /**
124 * Creates a form to delete a site credential entity.
125 *
126 * @param SiteCredential $siteCredential The site credential entity
127 *
128 * @return \Symfony\Component\Form\Form The form
129 */
130 private function createDeleteForm(SiteCredential $siteCredential)
131 {
132 return $this->createFormBuilder()
133 ->setAction($this->generateUrl('site_credential_delete', array('id' => $siteCredential->getId())))
134 ->setMethod('DELETE')
135 ->getForm()
136 ;
137 }
138}
diff --git a/src/Wallabag/CoreBundle/Entity/SiteCredential.php b/src/Wallabag/CoreBundle/Entity/SiteCredential.php
new file mode 100644
index 00000000..85ee07d4
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Entity/SiteCredential.php
@@ -0,0 +1,197 @@
1<?php
2
3namespace Wallabag\CoreBundle\Entity;
4
5use Doctrine\ORM\Mapping as ORM;
6use Symfony\Component\Validator\Constraints as Assert;
7use Wallabag\UserBundle\Entity\User;
8
9/**
10 * SiteCredential.
11 *
12 * @ORM\Entity(repositoryClass="Wallabag\CoreBundle\Repository\SiteCredentialRepository")
13 * @ORM\Table(name="`site_credential`")
14 * @ORM\HasLifecycleCallbacks()
15 */
16class SiteCredential
17{
18 /**
19 * @var int
20 *
21 * @ORM\Column(name="id", type="integer")
22 * @ORM\Id
23 * @ORM\GeneratedValue(strategy="AUTO")
24 */
25 private $id;
26
27 /**
28 * @var string
29 *
30 * @Assert\NotBlank()
31 * @Assert\Length(max=255)
32 * @ORM\Column(name="host", type="string", length=255)
33 */
34 private $host;
35
36 /**
37 * @var string
38 *
39 * @Assert\NotBlank()
40 * @Assert\Length(max=255)
41 * @ORM\Column(name="username", type="string", length=255)
42 */
43 private $username;
44
45 /**
46 * @var string
47 *
48 * @Assert\NotBlank()
49 * @Assert\Length(max=255)
50 * @ORM\Column(name="password", type="string", length=255)
51 */
52 private $password;
53
54 /**
55 * @var \DateTime
56 *
57 * @ORM\Column(name="createdAt", type="datetime")
58 */
59 private $createdAt;
60
61 /**
62 * @ORM\ManyToOne(targetEntity="Wallabag\UserBundle\Entity\User", inversedBy="site_credentials")
63 */
64 private $user;
65
66 /*
67 * @param User $user
68 */
69 public function __construct(User $user)
70 {
71 $this->user = $user;
72 }
73
74 /**
75 * Get id.
76 *
77 * @return int
78 */
79 public function getId()
80 {
81 return $this->id;
82 }
83
84 /**
85 * Set host.
86 *
87 * @param string $host
88 *
89 * @return SiteCredential
90 */
91 public function setHost($host)
92 {
93 $this->host = $host;
94
95 return $this;
96 }
97
98 /**
99 * Get host.
100 *
101 * @return string
102 */
103 public function getHost()
104 {
105 return $this->host;
106 }
107
108 /**
109 * Set username.
110 *
111 * @param string $username
112 *
113 * @return SiteCredential
114 */
115 public function setUsername($username)
116 {
117 $this->username = $username;
118
119 return $this;
120 }
121
122 /**
123 * Get username.
124 *
125 * @return string
126 */
127 public function getUsername()
128 {
129 return $this->username;
130 }
131
132 /**
133 * Set password.
134 *
135 * @param string $password
136 *
137 * @return SiteCredential
138 */
139 public function setPassword($password)
140 {
141 $this->password = $password;
142
143 return $this;
144 }
145
146 /**
147 * Get password.
148 *
149 * @return string
150 */
151 public function getPassword()
152 {
153 return $this->password;
154 }
155
156 /**
157 * Set createdAt.
158 *
159 * @param \DateTime $createdAt
160 *
161 * @return SiteCredential
162 */
163 public function setCreatedAt($createdAt)
164 {
165 $this->createdAt = $createdAt;
166
167 return $this;
168 }
169
170 /**
171 * Get createdAt.
172 *
173 * @return \DateTime
174 */
175 public function getCreatedAt()
176 {
177 return $this->createdAt;
178 }
179
180 /**
181 * @return User
182 */
183 public function getUser()
184 {
185 return $this->user;
186 }
187
188 /**
189 * @ORM\PrePersist
190 */
191 public function timestamps()
192 {
193 if (is_null($this->createdAt)) {
194 $this->createdAt = new \DateTime();
195 }
196 }
197}
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 @@
1<?php
2
3namespace Wallabag\CoreBundle\Form\Type;
4
5use Symfony\Component\Form\AbstractType;
6use Symfony\Component\Form\Extension\Core\Type\PasswordType;
7use Symfony\Component\Form\Extension\Core\Type\SubmitType;
8use Symfony\Component\Form\Extension\Core\Type\TextType;
9use Symfony\Component\Form\FormBuilderInterface;
10use Symfony\Component\OptionsResolver\OptionsResolver;
11
12class SiteCredentialType extends AbstractType
13{
14 public function buildForm(FormBuilderInterface $builder, array $options)
15 {
16 $builder
17 ->add('host', TextType::class, [
18 'label' => 'site_credential.form.host_label',
19 ])
20 ->add('username', TextType::class, [
21 'label' => 'site_credential.form.username_label',
22 ])
23 ->add('password', PasswordType::class, [
24 'label' => 'site_credential.form.password_label',
25 ])
26 ->add('save', SubmitType::class, [
27 'label' => 'config.form.save',
28 ])
29 ;
30 }
31
32 public function configureOptions(OptionsResolver $resolver)
33 {
34 $resolver->setDefaults([
35 'data_class' => 'Wallabag\CoreBundle\Entity\SiteCredential',
36 ]);
37 }
38
39 public function getBlockPrefix()
40 {
41 return 'site_credential';
42 }
43}
diff --git a/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php b/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php
new file mode 100644
index 00000000..501b4439
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Repository/SiteCredentialRepository.php
@@ -0,0 +1,13 @@
1<?php
2
3namespace Wallabag\CoreBundle\Repository;
4
5/**
6 * SiteCredentialRepository.
7 *
8 * This class was generated by the Doctrine ORM. Add your own custom
9 * repository methods below.
10 */
11class SiteCredentialRepository extends \Doctrine\ORM\EntityRepository
12{
13}
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
index 5e7afe27..ef58a16b 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.da.yml
@@ -518,6 +518,26 @@ user:
518 search: 518 search:
519 # placeholder: Filter by username or email 519 # placeholder: Filter by username or email
520 520
521site_credential:
522 # page_title: Site credentials management
523 # new_site_credential: Create a credential
524 # edit_site_credential: Edit an existing credential
525 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
526 # list:
527 # actions: Actions
528 # edit_action: Edit
529 # yes: Yes
530 # no: No
531 # create_new_one: Create a new credential
532 # form:
533 # username_label: 'Username'
534 # host_label: 'Host'
535 # password_label: 'Password'
536 # save: Save
537 # delete: Delete
538 # delete_confirm: Are you sure?
539 # back_to_list: Back to list
540
521error: 541error:
522 # page_title: An error occurred 542 # page_title: An error occurred
523 543
@@ -570,3 +590,8 @@ flashes:
570 # added: 'User "%username%" added' 590 # added: 'User "%username%" added'
571 # updated: 'User "%username%" updated' 591 # updated: 'User "%username%" updated'
572 # deleted: 'User "%username%" deleted' 592 # deleted: 'User "%username%" deleted'
593 site_credential:
594 notice:
595 # added: 'Site credential for "%host%" added'
596 # updated: 'Site credential for "%host%" updated'
597 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
index 00468575..d026a030 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.de.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 placeholder: Filtere nach Benutzer oder E-Mail-Adresse 520 placeholder: Filtere nach Benutzer oder E-Mail-Adresse
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 list:
528 actions: Aktionen
529 edit_action: Bearbeiten
530 yes: Ja
531 no: Nein
532 # create_new_one: Create a new credential
533 form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 save: Speichern
538 delete: Löschen
539 delete_confirm: Bist du sicher?
540 back_to_list: Zurück zur Liste
541
522error: 542error:
523 page_title: Ein Fehler ist aufgetreten 543 page_title: Ein Fehler ist aufgetreten
524 544
@@ -571,3 +591,8 @@ flashes:
571 added: 'Benutzer "%username%" hinzugefügt' 591 added: 'Benutzer "%username%" hinzugefügt'
572 updated: 'Benutzer "%username%" aktualisiert' 592 updated: 'Benutzer "%username%" aktualisiert'
573 deleted: 'Benutzer "%username%" gelöscht' 593 deleted: 'Benutzer "%username%" gelöscht'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
index 572084c1..12feb7dd 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.en.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 placeholder: Filter by username or email 520 placeholder: Filter by username or email
521 521
522site_credential:
523 page_title: Site credentials management
524 new_site_credential: Create a credential
525 edit_site_credential: Edit an existing credential
526 description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 list:
528 actions: Actions
529 edit_action: Edit
530 yes: Yes
531 no: No
532 create_new_one: Create a new credential
533 form:
534 username_label: 'Username'
535 host_label: 'Host'
536 password_label: 'Password'
537 save: Save
538 delete: Delete
539 delete_confirm: Are you sure?
540 back_to_list: Back to list
541
522error: 542error:
523 page_title: An error occurred 543 page_title: An error occurred
524 544
@@ -571,3 +591,8 @@ flashes:
571 added: 'User "%username%" added' 591 added: 'User "%username%" added'
572 updated: 'User "%username%" updated' 592 updated: 'User "%username%" updated'
573 deleted: 'User "%username%" deleted' 593 deleted: 'User "%username%" deleted'
594 site_credential:
595 notice:
596 added: 'Site credential for "%host%" added'
597 updated: 'Site credential for "%host%" updated'
598 deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
index 0f2a4a7b..2351d467 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.es.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 # placeholder: Filter by username or email 520 # placeholder: Filter by username or email
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 # list:
528 # actions: Actions
529 # edit_action: Edit
530 # yes: Yes
531 # no: No
532 # create_new_one: Create a new credential
533 # form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 # save: Save
538 # delete: Delete
539 # delete_confirm: Are you sure?
540 # back_to_list: Back to list
541
522error: 542error:
523 page_title: Ha ocurrido un error 543 page_title: Ha ocurrido un error
524 544
@@ -571,3 +591,8 @@ flashes:
571 added: 'Añadido el usuario "%username%"' 591 added: 'Añadido el usuario "%username%"'
572 updated: 'Actualizado el usuario "%username%"' 592 updated: 'Actualizado el usuario "%username%"'
573 deleted: 'Eliminado el usuario "%username%"' 593 deleted: 'Eliminado el usuario "%username%"'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
index a8900489..32e1ff42 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fa.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 # placeholder: Filter by username or email 520 # placeholder: Filter by username or email
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 # list:
528 # actions: Actions
529 # edit_action: Edit
530 # yes: Yes
531 # no: No
532 # create_new_one: Create a new credential
533 # form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 # save: Save
538 # delete: Delete
539 # delete_confirm: Are you sure?
540 # back_to_list: Back to list
541
522error: 542error:
523 # page_title: An error occurred 543 # page_title: An error occurred
524 544
@@ -571,3 +591,8 @@ flashes:
571 # added: 'User "%username%" added' 591 # added: 'User "%username%" added'
572 # updated: 'User "%username%" updated' 592 # updated: 'User "%username%" updated'
573 # deleted: 'User "%username%" deleted' 593 # deleted: 'User "%username%" deleted'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
index 6969b67b..e37abfd3 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.fr.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 placeholder: "Filtrer par nom d’utilisateur ou email" 520 placeholder: "Filtrer par nom d’utilisateur ou email"
521 521
522site_credential:
523 page_title: Gestion des accès aux sites
524 new_site_credential: Créer un accès à un site
525 edit_site_credential: Éditer l'accès d'un site
526 description: "Ici vous pouvez gérer les accès aux différents sites. Ces accès permettent de récupérer des contenus sur des sites qui requiert une authentification ou un paywall"
527 list:
528 actions: Actions
529 edit_action: Éditer
530 yes: Oui
531 no: Non
532 create_new_one: Créer un nouvel accès à un site
533 form:
534 username_label: 'Identifiant'
535 host_label: 'Domaine'
536 password_label: 'Mot de passe'
537 save: "Sauvegarder"
538 delete: "Supprimer"
539 delete_confirm: "Voulez-vous vraiment ?"
540 back_to_list: "Revenir à la liste"
541
522error: 542error:
523 page_title: "Une erreur est survenue" 543 page_title: "Une erreur est survenue"
524 544
@@ -568,6 +588,11 @@ flashes:
568 client_deleted: "Client %name% supprimé" 588 client_deleted: "Client %name% supprimé"
569 user: 589 user:
570 notice: 590 notice:
571 added: "Utilisateur \"%username%\" ajouté" 591 added: 'Utilisateur "%username%" ajouté'
572 updated: "Utilisateur \"%username%\" mis à jour" 592 updated: 'Utilisateur "%username%" mis à jour'
573 deleted: "Utilisateur \"%username%\" supprimé" 593 deleted: 'Utilisateur "%username%" supprimé'
594 site_credential:
595 notice:
596 added: 'Accès au site "%host%" ajouté'
597 updated: 'Accès au site "%host%" mis à jour'
598 deleted: 'Accès au site "%host%" supprimé'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
index c2007057..752085c8 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.it.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 # placeholder: Filter by username or email 520 # placeholder: Filter by username or email
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 # list:
528 # actions: Actions
529 # edit_action: Edit
530 # yes: Yes
531 # no: No
532 # create_new_one: Create a new credential
533 # form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 # save: Save
538 # delete: Delete
539 # delete_confirm: Are you sure?
540 # back_to_list: Back to list
541
522error: 542error:
523 # page_title: An error occurred 543 # page_title: An error occurred
524 544
@@ -571,3 +591,8 @@ flashes:
571 # added: 'User "%username%" added' 591 # added: 'User "%username%" added'
572 # updated: 'User "%username%" updated' 592 # updated: 'User "%username%" updated'
573 # deleted: 'User "%username%" deleted' 593 # deleted: 'User "%username%" deleted'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
index 3ac472d0..9e941de0 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.oc.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 placeholder: "Filtrar per nom d'utilizaire o corrièl" 520 placeholder: "Filtrar per nom d'utilizaire o corrièl"
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 list:
528 actions: 'Accions'
529 edit_action: 'Modificar'
530 yes: 'Ã’c'
531 no: 'Non'
532 # create_new_one: Create a new credential
533 form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 save: 'Enregistrar'
538 delete: 'Suprimir'
539 delete_confirm: 'Sètz segur ?'
540 back_to_list: 'Tornar a la lista'
541
522error: 542error:
523 page_title: Una error s'es produsida 543 page_title: Una error s'es produsida
524 544
@@ -571,3 +591,8 @@ flashes:
571 added: 'Utilizaire "%username%" ajustat' 591 added: 'Utilizaire "%username%" ajustat'
572 updated: 'Utilizaire "%username%" mes a jorn' 592 updated: 'Utilizaire "%username%" mes a jorn'
573 deleted: 'Utilizaire "%username%" suprimit' 593 deleted: 'Utilizaire "%username%" suprimit'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
index fa672387..38e051f5 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pl.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 placeholder: Filtruj po nazwie użytkownika lub adresie e-mail 520 placeholder: Filtruj po nazwie użytkownika lub adresie e-mail
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 list:
528 actions: Akcje
529 edit_action: Edytuj
530 yes: Tak
531 no: Nie
532 # create_new_one: Create a new credential
533 form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 save: Zapisz
538 delete: Usuń
539 delete_confirm: JesteÅ› pewien?
540 back_to_list: Powrót do listy
541
522error: 542error:
523 page_title: Wystąpił błąd 543 page_title: Wystąpił błąd
524 544
@@ -571,3 +591,8 @@ flashes:
571 added: 'Użytkownik "%username%" dodany' 591 added: 'Użytkownik "%username%" dodany'
572 updated: 'Użytkownik "%username%" zaktualizowany' 592 updated: 'Użytkownik "%username%" zaktualizowany'
573 deleted: 'Użytkownik "%username%" usunięty' 593 deleted: 'Użytkownik "%username%" usunięty'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
index 896ccb04..d3b245b8 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.pt.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 # placeholder: Filter by username or email 520 # placeholder: Filter by username or email
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 list:
528 actions: 'Ações'
529 edit_action: 'Editar'
530 yes: 'Sim'
531 no: 'Não'
532 # create_new_one: Create a new credential
533 form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 save: 'Salvar'
538 delete: 'Apagar'
539 delete_confirm: 'Tem certeza?'
540 back_to_list: 'Voltar para a lista'
541
522error: 542error:
523 # page_title: An error occurred 543 # page_title: An error occurred
524 544
@@ -571,3 +591,8 @@ flashes:
571 added: 'Usuário "%username%" adicionado' 591 added: 'Usuário "%username%" adicionado'
572 updated: 'Usuário "%username%" atualizado' 592 updated: 'Usuário "%username%" atualizado'
573 deleted: 'Usuário "%username%" removido' 593 deleted: 'Usuário "%username%" removido'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
index c447dc9b..66c72429 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.ro.yml
@@ -519,6 +519,26 @@ user:
519 search: 519 search:
520 # placeholder: Filter by username or email 520 # placeholder: Filter by username or email
521 521
522site_credential:
523 # page_title: Site credentials management
524 # new_site_credential: Create a credential
525 # edit_site_credential: Edit an existing credential
526 # description: "Here you can manage all credentials for sites which required them (create, edit and delete), like a paywall, an authentication, etc."
527 # list:
528 # actions: Actions
529 # edit_action: Edit
530 # yes: Yes
531 # no: No
532 # create_new_one: Create a new credential
533 # form:
534 # username_label: 'Username'
535 # host_label: 'Host'
536 # password_label: 'Password'
537 # save: Save
538 # delete: Delete
539 # delete_confirm: Are you sure?
540 # back_to_list: Back to list
541
522error: 542error:
523 # page_title: An error occurred 543 # page_title: An error occurred
524 544
@@ -571,3 +591,8 @@ flashes:
571 # added: 'User "%username%" added' 591 # added: 'User "%username%" added'
572 # updated: 'User "%username%" updated' 592 # updated: 'User "%username%" updated'
573 # deleted: 'User "%username%" deleted' 593 # deleted: 'User "%username%" deleted'
594 site_credential:
595 notice:
596 # added: 'Site credential for "%host%" added'
597 # updated: 'Site credential for "%host%" updated'
598 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
index 61e1a1ea..34ae5b87 100644
--- a/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
+++ b/src/Wallabag/CoreBundle/Resources/translations/messages.tr.yml
@@ -571,3 +571,8 @@ flashes:
571 # added: 'User "%username%" added' 571 # added: 'User "%username%" added'
572 # updated: 'User "%username%" updated' 572 # updated: 'User "%username%" updated'
573 # deleted: 'User "%username%" deleted' 573 # deleted: 'User "%username%" deleted'
574 site_credential:
575 notice:
576 # added: 'Site credential for "%host%" added'
577 # updated: 'Site credential for "%host%" updated'
578 # deleted: 'Site credential for "%host%" deleted'
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig
new file mode 100644
index 00000000..8448f17e
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/edit.html.twig
@@ -0,0 +1,60 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'site_credential.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'site_credential.edit_site_credential'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(edit_form) }}
16 {{ form_errors(edit_form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(edit_form.host) }}
21 {{ form_errors(edit_form.host) }}
22 {{ form_widget(edit_form.host) }}
23 </div>
24 </div>
25
26 <div class="row">
27 <div class="input-field col s12">
28 {{ form_label(edit_form.username) }}
29 {{ form_errors(edit_form.username) }}
30 {{ form_widget(edit_form.username) }}
31 </div>
32 </div>
33
34 <div class="row">
35 <div class="input-field col s12">
36 {{ form_label(edit_form.password) }}
37 {{ form_errors(edit_form.password) }}
38 {{ form_widget(edit_form.password) }}
39 </div>
40 </div>
41
42 <br/>
43
44 {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
45 {{ form_widget(edit_form._token) }}
46 </form>
47 <p>
48 {{ form_start(delete_form) }}
49 <button onclick="return confirm('{{ 'site_credential.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'site_credential.form.delete'|trans }}</button>
50 {{ form_end(delete_form) }}
51 </p>
52 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
53 </div>
54 </div>
55 </div>
56 </div>
57 </div>
58 </div>
59
60{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig
new file mode 100644
index 00000000..fda60b31
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/index.html.twig
@@ -0,0 +1,44 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'site_credential.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <p class="help">{{ 'site_credential.description'|trans|raw }}</p>
13
14 <table class="bordered">
15 <thead>
16 <tr>
17 <th>{{ 'site_credential.form.host_label'|trans }}</th>
18 <th>{{ 'site_credential.form.username_label'|trans }}</th>
19 <th>{{ 'site_credential.list.actions'|trans }}</th>
20 </tr>
21 </thead>
22 <tbody>
23 {% for credential in credentials %}
24 <tr>
25 <td>{{ credential.host }}</td>
26 <td>{{ credential.username }}</td>
27 <td>
28 <a href="{{ path('site_credential_edit', { 'id': credential.id }) }}">{{ 'site_credential.list.edit_action'|trans }}</a>
29 </td>
30 </tr>
31 {% endfor %}
32 </tbody>
33 </table>
34 <br />
35 <p>
36 <a href="{{ path('site_credential_new') }}" class="waves-effect waves-light btn">{{ 'site_credential.list.create_new_one'|trans }}</a>
37 </p>
38 </div>
39 </div>
40 </div>
41 </div>
42 </div>
43
44{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig
new file mode 100644
index 00000000..bf713902
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/SiteCredential/new.html.twig
@@ -0,0 +1,53 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'site_credential.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'site_credential.new_site_credential'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(form) }}
16 {{ form_errors(form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(form.host) }}
21 {{ form_errors(form.host) }}
22 {{ form_widget(form.host) }}
23 </div>
24 </div>
25
26 <div class="row">
27 <div class="input-field col s12">
28 {{ form_label(form.username) }}
29 {{ form_errors(form.username) }}
30 {{ form_widget(form.username) }}
31 </div>
32 </div>
33
34 <div class="row">
35 <div class="input-field col s12">
36 {{ form_label(form.password) }}
37 {{ form_errors(form.password) }}
38 {{ form_widget(form.password) }}
39 </div>
40 </div>
41
42 {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
43 {{ form_rest(form) }}
44 </form>
45 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
46 </div>
47 </div>
48 </div>
49 </div>
50 </div>
51 </div>
52
53{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
index 9b0816eb..1e10bf38 100644
--- a/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/Config/index.html.twig
@@ -66,13 +66,13 @@
66 </div> 66 </div>
67 </div> 67 </div>
68 68
69 <div class="row"> 69 <div class="row">
70 <div class="input-field col s12"> 70 <div class="input-field col s12">
71 {{ form_errors(form.config.action_mark_as_read) }} 71 {{ form_label(form.config.action_mark_as_read) }}
72 {{ form_widget(form.config.action_mark_as_read) }} 72 {{ form_errors(form.config.action_mark_as_read) }}
73 {{ form_label(form.config.action_mark_as_read) }} 73 {{ form_widget(form.config.action_mark_as_read) }}
74 </div>
74 </div> 75 </div>
75 </div>
76 76
77 <div class="row"> 77 <div class="row">
78 <div class="input-field col s11"> 78 <div class="input-field col s11">
@@ -254,11 +254,11 @@
254 {{ form_start(form.pwd) }} 254 {{ form_start(form.pwd) }}
255 {{ form_errors(form.pwd) }} 255 {{ form_errors(form.pwd) }}
256 256
257 <div class="row"> 257 <div class="row">
258 <div class="input-field col s12"> 258 <div class="input-field col s12">
259 {{ 'config.form_password.description'|trans }} 259 {{ 'config.form_password.description'|trans }}
260 </div>
260 </div> 261 </div>
261 </div>
262 262
263 <div class="row"> 263 <div class="row">
264 <div class="input-field col s12"> 264 <div class="input-field col s12">
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/edit.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/edit.html.twig
new file mode 100644
index 00000000..8448f17e
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/edit.html.twig
@@ -0,0 +1,60 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'site_credential.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'site_credential.edit_site_credential'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(edit_form) }}
16 {{ form_errors(edit_form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(edit_form.host) }}
21 {{ form_errors(edit_form.host) }}
22 {{ form_widget(edit_form.host) }}
23 </div>
24 </div>
25
26 <div class="row">
27 <div class="input-field col s12">
28 {{ form_label(edit_form.username) }}
29 {{ form_errors(edit_form.username) }}
30 {{ form_widget(edit_form.username) }}
31 </div>
32 </div>
33
34 <div class="row">
35 <div class="input-field col s12">
36 {{ form_label(edit_form.password) }}
37 {{ form_errors(edit_form.password) }}
38 {{ form_widget(edit_form.password) }}
39 </div>
40 </div>
41
42 <br/>
43
44 {{ form_widget(edit_form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
45 {{ form_widget(edit_form._token) }}
46 </form>
47 <p>
48 {{ form_start(delete_form) }}
49 <button onclick="return confirm('{{ 'site_credential.form.delete_confirm'|trans|escape('js') }}')" type="submit" class="btn waves-effect waves-light red">{{ 'site_credential.form.delete'|trans }}</button>
50 {{ form_end(delete_form) }}
51 </p>
52 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
53 </div>
54 </div>
55 </div>
56 </div>
57 </div>
58 </div>
59
60{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/index.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/index.html.twig
new file mode 100644
index 00000000..fda60b31
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/index.html.twig
@@ -0,0 +1,44 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'site_credential.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <p class="help">{{ 'site_credential.description'|trans|raw }}</p>
13
14 <table class="bordered">
15 <thead>
16 <tr>
17 <th>{{ 'site_credential.form.host_label'|trans }}</th>
18 <th>{{ 'site_credential.form.username_label'|trans }}</th>
19 <th>{{ 'site_credential.list.actions'|trans }}</th>
20 </tr>
21 </thead>
22 <tbody>
23 {% for credential in credentials %}
24 <tr>
25 <td>{{ credential.host }}</td>
26 <td>{{ credential.username }}</td>
27 <td>
28 <a href="{{ path('site_credential_edit', { 'id': credential.id }) }}">{{ 'site_credential.list.edit_action'|trans }}</a>
29 </td>
30 </tr>
31 {% endfor %}
32 </tbody>
33 </table>
34 <br />
35 <p>
36 <a href="{{ path('site_credential_new') }}" class="waves-effect waves-light btn">{{ 'site_credential.list.create_new_one'|trans }}</a>
37 </p>
38 </div>
39 </div>
40 </div>
41 </div>
42 </div>
43
44{% endblock %}
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/new.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/new.html.twig
new file mode 100644
index 00000000..bf713902
--- /dev/null
+++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/SiteCredential/new.html.twig
@@ -0,0 +1,53 @@
1{% extends "WallabagCoreBundle::layout.html.twig" %}
2
3{% block title %}{{ 'site_credential.page_title'|trans }}{% endblock %}
4
5{% block content %}
6
7 <div class="row">
8 <div class="col s12">
9 <div class="card-panel">
10 <div class="row">
11 <div class="input-field col s12">
12 <h4>{{ 'site_credential.new_site_credential'|trans }}</h4>
13
14 <div id="set6" class="col s12">
15 {{ form_start(form) }}
16 {{ form_errors(form) }}
17
18 <div class="row">
19 <div class="input-field col s12">
20 {{ form_label(form.host) }}
21 {{ form_errors(form.host) }}
22 {{ form_widget(form.host) }}
23 </div>
24 </div>
25
26 <div class="row">
27 <div class="input-field col s12">
28 {{ form_label(form.username) }}
29 {{ form_errors(form.username) }}
30 {{ form_widget(form.username) }}
31 </div>
32 </div>
33
34 <div class="row">
35 <div class="input-field col s12">
36 {{ form_label(form.password) }}
37 {{ form_errors(form.password) }}
38 {{ form_widget(form.password) }}
39 </div>
40 </div>
41
42 {{ form_widget(form.save, {'attr': {'class': 'btn waves-effect waves-light'}}) }}
43 {{ form_rest(form) }}
44 </form>
45 <p><a class="waves-effect waves-light btn blue-grey" href="{{ path('site_credential_index') }}">{{ 'site_credential.form.back_to_list'|trans }}</a></p>
46 </div>
47 </div>
48 </div>
49 </div>
50 </div>
51 </div>
52
53{% endblock %}