diff options
author | Nicolas LÅ“uillet <nicolas.loeuillet@smile.fr> | 2015-10-05 22:16:18 +0200 |
---|---|---|
committer | Nicolas LÅ“uillet <nicolas.loeuillet@smile.fr> | 2015-10-05 22:16:18 +0200 |
commit | ec3ce598f6423fcccd88a4fdd77f817c50bc5ab6 (patch) | |
tree | 1897d513ea9f1041e19e29b1e763eb8969f3b51c | |
parent | 4c5e5441831430af2b8f49dbeb0c76da6993eceb (diff) | |
download | wallabag-ec3ce598f6423fcccd88a4fdd77f817c50bc5ab6.tar.gz wallabag-ec3ce598f6423fcccd88a4fdd77f817c50bc5ab6.tar.zst wallabag-ec3ce598f6423fcccd88a4fdd77f817c50bc5ab6.zip |
material design for register/login/recover pages
29 files changed, 384 insertions, 337 deletions
diff --git a/app/config/config.yml b/app/config/config.yml index a4d18c6d..0d893ecf 100644 --- a/app/config/config.yml +++ b/app/config/config.yml | |||
@@ -160,8 +160,6 @@ fos_user: | |||
160 | firewall_name: main | 160 | firewall_name: main |
161 | user_class: Wallabag\UserBundle\Entity\User | 161 | user_class: Wallabag\UserBundle\Entity\User |
162 | registration: | 162 | registration: |
163 | form: | ||
164 | type: wallabag_user_registration | ||
165 | confirmation: | 163 | confirmation: |
166 | enabled: true | 164 | enabled: true |
167 | 165 | ||
diff --git a/src/Wallabag/CoreBundle/Command/InstallCommand.php b/src/Wallabag/CoreBundle/Command/InstallCommand.php index 140fdf9e..6ebbd93c 100644 --- a/src/Wallabag/CoreBundle/Command/InstallCommand.php +++ b/src/Wallabag/CoreBundle/Command/InstallCommand.php | |||
@@ -188,9 +188,10 @@ class InstallCommand extends ContainerAwareCommand | |||
188 | 188 | ||
189 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); | 189 | $em = $this->getContainer()->get('doctrine.orm.entity_manager'); |
190 | 190 | ||
191 | $user = new User(); | 191 | $userManager = $this->getContainer()->get('fos_user.user_manager'); |
192 | $user = $userManager->createUser(); | ||
192 | $user->setUsername($dialog->ask($this->defaultOutput, '<question>Username</question> <comment>(default: wallabag)</comment> :', 'wallabag')); | 193 | $user->setUsername($dialog->ask($this->defaultOutput, '<question>Username</question> <comment>(default: wallabag)</comment> :', 'wallabag')); |
193 | $user->setPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag')); | 194 | $user->setPlainPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag')); |
194 | $user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', '')); | 195 | $user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', '')); |
195 | $user->setEnabled(true); | 196 | $user->setEnabled(true); |
196 | 197 | ||
diff --git a/src/Wallabag/CoreBundle/Form/Type/RegistrationType.php b/src/Wallabag/CoreBundle/Form/Type/RegistrationType.php deleted file mode 100644 index 47d4f341..00000000 --- a/src/Wallabag/CoreBundle/Form/Type/RegistrationType.php +++ /dev/null | |||
@@ -1,24 +0,0 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\CoreBundle\Form\Type; | ||
4 | |||
5 | use Symfony\Component\Form\AbstractType; | ||
6 | use Symfony\Component\Form\FormBuilderInterface; | ||
7 | |||
8 | class RegistrationType extends AbstractType | ||
9 | { | ||
10 | public function buildForm(FormBuilderInterface $builder, array $options) | ||
11 | { | ||
12 | $builder->add('name'); | ||
13 | } | ||
14 | |||
15 | public function getParent() | ||
16 | { | ||
17 | return 'fos_user_registration'; | ||
18 | } | ||
19 | |||
20 | public function getName() | ||
21 | { | ||
22 | return 'wallabag_user_registration'; | ||
23 | } | ||
24 | } | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/base.html.twig b/src/Wallabag/CoreBundle/Resources/views/base.html.twig index 152c5c28..c94c0044 100644 --- a/src/Wallabag/CoreBundle/Resources/views/base.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/base.html.twig | |||
@@ -45,7 +45,7 @@ | |||
45 | <script src="{{ asset('themes/_global/js/bookmarklet.js') }}"></script> | 45 | <script src="{{ asset('themes/_global/js/bookmarklet.js') }}"></script> |
46 | {% endblock %} | 46 | {% endblock %} |
47 | 47 | ||
48 | <title>{% block title %}{% endblock %} - wallabag</title> | 48 | <title>{% block title %}{% endblock %}</title> |
49 | {% endblock %} | 49 | {% endblock %} |
50 | </head> | 50 | </head> |
51 | 51 | ||
@@ -60,7 +60,7 @@ | |||
60 | 60 | ||
61 | {% block messages %}{% endblock %} | 61 | {% block messages %}{% endblock %} |
62 | 62 | ||
63 | <div id="content" class="w600p"> | 63 | <div id="content"> |
64 | {% block content %}{% endblock %} | 64 | {% block content %}{% endblock %} |
65 | </div> | 65 | </div> |
66 | </main> | 66 | </main> |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/forgotPassword.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/forgotPassword.html.twig deleted file mode 100644 index 4476ea7b..00000000 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/forgotPassword.html.twig +++ /dev/null | |||
@@ -1,31 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | |||
9 | {% block content %} | ||
10 | <form action="{{ path('forgot_password') }}" method="post" name="forgotPasswordform"> | ||
11 | <fieldset class="w500p center"> | ||
12 | <h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2> | ||
13 | |||
14 | {{ form_errors(form) }} | ||
15 | |||
16 | <p>Enter your email address below and we'll send you password reset instructions.</p> | ||
17 | |||
18 | <div class="row"> | ||
19 | {{ form_label(form.email) }} | ||
20 | {{ form_errors(form.email) }} | ||
21 | {{ form_widget(form.email) }} | ||
22 | </div> | ||
23 | |||
24 | <div class="row mts txtcenter"> | ||
25 | <button type="submit">Send me reset instructions</button> | ||
26 | </div> | ||
27 | </fieldset> | ||
28 | |||
29 | {{ form_rest(form) }} | ||
30 | </form> | ||
31 | {% endblock %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/reset.html.twig b/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/reset.html.twig deleted file mode 100644 index fda88af2..00000000 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/reset.html.twig +++ /dev/null | |||
@@ -1,35 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}Change password{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | |||
9 | {% block content %} | ||
10 | <form action="{{ path('forgot_password_reset', {'token': token}) }}" method="post" name="loginform"> | ||
11 | <fieldset class="w500p center"> | ||
12 | <h2 class="mbs txtcenter">{% trans %}Change password{% endtrans %}</h2> | ||
13 | |||
14 | {{ form_errors(form) }} | ||
15 | |||
16 | <div class="row"> | ||
17 | {{ form_label(form.new_password.first) }} | ||
18 | {{ form_errors(form.new_password.first) }} | ||
19 | {{ form_widget(form.new_password.first) }} | ||
20 | </div> | ||
21 | |||
22 | <div class="row"> | ||
23 | {{ form_label(form.new_password.second) }} | ||
24 | {{ form_errors(form.new_password.second) }} | ||
25 | {{ form_widget(form.new_password.second) }} | ||
26 | </div> | ||
27 | |||
28 | <div class="row mts txtcenter"> | ||
29 | <button type="submit">Change password</button> | ||
30 | </div> | ||
31 | </fieldset> | ||
32 | |||
33 | {{ form_rest(form) }} | ||
34 | </form> | ||
35 | {% endblock %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css index 7a4e7df2..eb33f042 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/css/main.css | |||
@@ -250,9 +250,14 @@ main ul.row { | |||
250 | } | 250 | } |
251 | 251 | ||
252 | .card .card-action a { | 252 | .card .card-action a { |
253 | color: #ffffff; | ||
253 | margin: 0; | 254 | margin: 0; |
254 | } | 255 | } |
255 | 256 | ||
257 | .card .card-action a:hover { | ||
258 | color: #ffffff; | ||
259 | } | ||
260 | |||
256 | .settings .div_tabs { | 261 | .settings .div_tabs { |
257 | padding-bottom: 15px; | 262 | padding-bottom: 15px; |
258 | } | 263 | } |
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/img/logo-other_themes.png b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/img/logo-other_themes.png index 32543a44..c90aa46f 100755 --- a/src/Wallabag/CoreBundle/Resources/views/themes/material/public/img/logo-other_themes.png +++ b/src/Wallabag/CoreBundle/Resources/views/themes/material/public/img/logo-other_themes.png | |||
Binary files differ | |||
diff --git a/src/Wallabag/UserBundle/Controller/ResettingController.php b/src/Wallabag/UserBundle/Controller/ResettingController.php new file mode 100644 index 00000000..8aa1e230 --- /dev/null +++ b/src/Wallabag/UserBundle/Controller/ResettingController.php | |||
@@ -0,0 +1,75 @@ | |||
1 | <?php | ||
2 | |||
3 | namespace Wallabag\UserBundle\Controller; | ||
4 | |||
5 | use FOS\UserBundle\FOSUserEvents; | ||
6 | use FOS\UserBundle\Event\FormEvent; | ||
7 | use FOS\UserBundle\Event\GetResponseUserEvent; | ||
8 | use FOS\UserBundle\Event\FilterUserResponseEvent; | ||
9 | use Symfony\Component\HttpFoundation\Request; | ||
10 | use Symfony\Component\HttpFoundation\RedirectResponse; | ||
11 | use Symfony\Component\HttpKernel\Exception\NotFoundHttpException; | ||
12 | |||
13 | class ResettingController extends \FOS\UserBundle\Controller\ResettingController | ||
14 | { | ||
15 | /** | ||
16 | * Extends ResettingController to change the redirection after success. | ||
17 | * | ||
18 | * @param Request $request | ||
19 | * @param $token | ||
20 | * | ||
21 | * @return null|RedirectResponse|\Symfony\Component\HttpFoundation\Response | ||
22 | */ | ||
23 | public function resetAction(Request $request, $token) | ||
24 | { | ||
25 | /** @var $formFactory \FOS\UserBundle\Form\Factory\FactoryInterface */ | ||
26 | $formFactory = $this->get('fos_user.resetting.form.factory'); | ||
27 | /** @var $userManager \FOS\UserBundle\Model\UserManagerInterface */ | ||
28 | $userManager = $this->get('fos_user.user_manager'); | ||
29 | /** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */ | ||
30 | $dispatcher = $this->get('event_dispatcher'); | ||
31 | |||
32 | $user = $userManager->findUserByConfirmationToken($token); | ||
33 | |||
34 | if (null === $user) { | ||
35 | throw new NotFoundHttpException(sprintf('The user with "confirmation token" does not exist for value "%s"', $token)); | ||
36 | } | ||
37 | |||
38 | $event = new GetResponseUserEvent($user, $request); | ||
39 | $dispatcher->dispatch(FOSUserEvents::RESETTING_RESET_INITIALIZE, $event); | ||
40 | |||
41 | if (null !== $event->getResponse()) { | ||
42 | return $event->getResponse(); | ||
43 | } | ||
44 | |||
45 | $form = $formFactory->createForm(); | ||
46 | $form->setData($user); | ||
47 | |||
48 | $form->handleRequest($request); | ||
49 | |||
50 | if ($form->isValid()) { | ||
51 | $event = new FormEvent($form, $request); | ||
52 | $dispatcher->dispatch(FOSUserEvents::RESETTING_RESET_SUCCESS, $event); | ||
53 | |||
54 | $userManager->updateUser($user); | ||
55 | |||
56 | if (null === $response = $event->getResponse()) { | ||
57 | $this->get('session')->getFlashBag()->add( | ||
58 | 'notice', | ||
59 | 'Password updated' | ||
60 | ); | ||
61 | $url = $this->generateUrl('homepage'); | ||
62 | $response = new RedirectResponse($url); | ||
63 | } | ||
64 | |||
65 | $dispatcher->dispatch(FOSUserEvents::RESETTING_RESET_COMPLETED, new FilterUserResponseEvent($user, $request, $response)); | ||
66 | |||
67 | return $response; | ||
68 | } | ||
69 | |||
70 | return $this->render('FOSUserBundle:Resetting:reset.html.twig', array( | ||
71 | 'token' => $token, | ||
72 | 'form' => $form->createView(), | ||
73 | )); | ||
74 | } | ||
75 | } | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig new file mode 100644 index 00000000..e5c1876b --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register.html.twig | |||
@@ -0,0 +1,20 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}create an account{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | {% block messages %}{% endblock %} | ||
9 | |||
10 | {% block content %} | ||
11 | <form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register"> | ||
12 | <fieldset class="w500p center"> | ||
13 | <h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2> | ||
14 | {% include "FOSUserBundle:Registration:register_content.html.twig" %} | ||
15 | </fieldset> | ||
16 | </form> | ||
17 | {% endblock %} | ||
18 | |||
19 | {% block footer %} | ||
20 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig new file mode 100644 index 00000000..f1f899d2 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Registration/register_content.html.twig | |||
@@ -0,0 +1,38 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | ||
2 | |||
3 | {{ form_errors(form) }} | ||
4 | {{ form_widget(form._token) }} | ||
5 | |||
6 | {% for flashMessage in app.session.flashbag.get('notice') %} | ||
7 | <span><p>{{ flashMessage }}</p></span> | ||
8 | {% endfor %} | ||
9 | |||
10 | <div class="row"> | ||
11 | {{ form_errors(form.email) }} | ||
12 | <label for="fos_user_registration_form_email">{% trans %}Email{% endtrans %}</label> | ||
13 | <input type="text" id="fos_user_registration_form_email" name="fos_user_registration_form[email]" /> | ||
14 | </div> | ||
15 | |||
16 | <div class="row"> | ||
17 | {{ form_errors(form.username) }} | ||
18 | <label for="fos_user_registration_form_username">{% trans %}Username{% endtrans %}</label> | ||
19 | <input type="text" id="fos_user_registration_form_username" name="fos_user_registration_form[username]" /> | ||
20 | </div> | ||
21 | |||
22 | <div class="row"> | ||
23 | {{ form_errors(form.plainPassword.first) }} | ||
24 | <label for="fos_user_registration_form_plainPassword_first">{% trans %}Password{% endtrans %}</label> | ||
25 | <input type="password" id="fos_user_registration_form_plainPassword_first" name="fos_user_registration_form[plainPassword][first]" /> | ||
26 | </div> | ||
27 | |||
28 | <div class="row"> | ||
29 | {{ form_errors(form.plainPassword.second) }} | ||
30 | <label for="fos_user_registration_form_plainPassword_second">{% trans %}Repeat password{% endtrans %}</label> | ||
31 | <input type="password" id="fos_user_registration_form_plainPassword_second" name="fos_user_registration_form[plainPassword][second]" /> | ||
32 | </div> | ||
33 | |||
34 | |||
35 | <div class="row mts txtcenter"> | ||
36 | <button type="submit">{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}</button> | ||
37 | <a href="{{ path('fos_user_security_login') }}" class="button">{% trans %}Login{% endtrans %}</a> | ||
38 | </div> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/checkEmail.html.twig index 056d65b5..056d65b5 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/checkEmail.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/checkEmail.html.twig | |||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig new file mode 100644 index 00000000..10094e83 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request.html.twig | |||
@@ -0,0 +1,20 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | {% block messages %}{% endblock %} | ||
9 | |||
10 | {% block content %} | ||
11 | <form action="{{ path('fos_user_resetting_send_email') }}" method="post" name="forgotPasswordform"> | ||
12 | <fieldset class="w500p center"> | ||
13 | <h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2> | ||
14 | {% include "FOSUserBundle:Resetting:request_content.html.twig" %} | ||
15 | </fieldset> | ||
16 | </form> | ||
17 | {% endblock %} | ||
18 | |||
19 | {% block footer %} | ||
20 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig new file mode 100644 index 00000000..1f8da8d7 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Resetting/request_content.html.twig | |||
@@ -0,0 +1,17 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | ||
2 | |||
3 | {% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %} | ||
4 | |||
5 | {% if invalid_username is defined %} | ||
6 | <p>{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}) }}</p> | ||
7 | {% endif %} | ||
8 | |||
9 | <div class="row"> | ||
10 | <label for="username">{{ 'resetting.request.username'|trans }}</label> | ||
11 | <input type="text" id="username" name="username" required="required" /> | ||
12 | </div> | ||
13 | |||
14 | <div class="row mts txtcenter"> | ||
15 | <button type="submit">{{ 'resetting.request.submit'|trans }}</button> | ||
16 | <a href="{{ path('fos_user_security_login') }}" class="button">{% trans %}Login{% endtrans %}</a> | ||
17 | </div> | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/login.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Security/login.html.twig index 9a59dfc6..0e7bba0f 100644 --- a/src/Wallabag/CoreBundle/Resources/views/themes/baggy/Security/login.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/baggy/Security/login.html.twig | |||
@@ -8,7 +8,7 @@ | |||
8 | {% block messages %}{% endblock %} | 8 | {% block messages %}{% endblock %} |
9 | 9 | ||
10 | {% block content %} | 10 | {% block content %} |
11 | <form action="{{ path('login_check') }}" method="post" name="loginform"> | 11 | <form action="{{ path('fos_user_security_check') }}" method="post" name="loginform"> |
12 | <fieldset class="w500p center"> | 12 | <fieldset class="w500p center"> |
13 | <h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2> | 13 | <h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2> |
14 | {% if error %} | 14 | {% if error %} |
@@ -33,7 +33,7 @@ | |||
33 | <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" /> | 33 | <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" /> |
34 | <button type="submit">Login</button> | 34 | <button type="submit">Login</button> |
35 | <a href="{{ path('fos_user_registration_register') }}" class="button">{% trans %}Register{% endtrans %}</a> | 35 | <a href="{{ path('fos_user_registration_register') }}" class="button">{% trans %}Register{% endtrans %}</a> |
36 | <a href="{{ path('forgot_password') }}" class="small">Forgot your password?</a> | 36 | <a href="{{ path('fos_user_resetting_request') }}" class="small">Forgot your password?</a> |
37 | </div> | 37 | </div> |
38 | </fieldset> | 38 | </fieldset> |
39 | </form> | 39 | </form> |
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig new file mode 100644 index 00000000..e7b7318b --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/ChangePassword/changePassword_content.html.twig | |||
@@ -0,0 +1,12 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | ||
2 | |||
3 | <form action="{{ path('fos_user_change_password') }}" {{ form_enctype(form) }} method="POST" class="fos_user_change_password"> | ||
4 | <div class="card-content"> | ||
5 | <div class="row"> | ||
6 | {{ form_widget(form) }} | ||
7 | <div> | ||
8 | <input type="submit" value="{{ 'change_password.submit'|trans }}" /> | ||
9 | </div> | ||
10 | </div> | ||
11 | </div> | ||
12 | </form> | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/checkEmail.html.twig new file mode 100644 index 00000000..50937276 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/checkEmail.html.twig | |||
@@ -0,0 +1,11 @@ | |||
1 | {% extends "FOSUserBundle::layout.html.twig" %} | ||
2 | |||
3 | {% trans_default_domain 'FOSUserBundle' %} | ||
4 | |||
5 | {% block fos_user_content %} | ||
6 | <div class="card-content"> | ||
7 | <div class="row"> | ||
8 | <p>{{ 'registration.check_email'|trans({'%email%': user.email}) }}</p> | ||
9 | </div> | ||
10 | </div> | ||
11 | {% endblock fos_user_content %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/confirmed.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/confirmed.html.twig new file mode 100644 index 00000000..c6d4d3d2 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/confirmed.html.twig | |||
@@ -0,0 +1,17 @@ | |||
1 | {% extends "FOSUserBundle::layout.html.twig" %} | ||
2 | |||
3 | {% trans_default_domain 'FOSUserBundle' %} | ||
4 | |||
5 | {% block fos_user_content %} | ||
6 | <div class="card-content"> | ||
7 | <div class="row"> | ||
8 | <p>{{ 'registration.confirmed'|trans({'%username%': user.username}) }}</p> | ||
9 | {% if targetUrl %} | ||
10 | <p><a href="{{ targetUrl }}">{{ 'registration.back'|trans }}</a></p> | ||
11 | {% endif %} | ||
12 | </div> | ||
13 | <div class="card-action center"> | ||
14 | <a href="{{ path('homepage') }}" class="waves-effect waves-light btn"><i class="material-icons left"></i> {% trans %}Go to your account{% endtrans %}</a> | ||
15 | </div> | ||
16 | </div> | ||
17 | {% endblock fos_user_content %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register.html.twig deleted file mode 100644 index d765c851..00000000 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register.html.twig +++ /dev/null | |||
@@ -1,32 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}create an account{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}register{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | {% block messages %}{% endblock %} | ||
9 | |||
10 | {% block content %} | ||
11 | <main class="valign-wrapper"> | ||
12 | <div class="valign row"> | ||
13 | <div class="card sw"> | ||
14 | <div class="center"><img src="{{ asset('themes/baggy/img/logo-other_themes.png') }}" alt="wallabag logo" /></div> | ||
15 | |||
16 | {% include "FOSUserBundle:Registration:register_content.html.twig" %} | ||
17 | |||
18 | </div> | ||
19 | <div class="center"> | ||
20 | <a href="{{ path('fos_user_security_login') }}">{% trans %}Already have an account?{% endtrans %}</a> | ||
21 | </div> | ||
22 | </div> | ||
23 | </main> | ||
24 | <style> | ||
25 | main { | ||
26 | padding: 0; | ||
27 | } | ||
28 | </style> | ||
29 | {% endblock %} | ||
30 | |||
31 | {% block footer %} | ||
32 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig index 26a91433..b356f58c 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Registration/register_content.html.twig | |||
@@ -2,12 +2,44 @@ | |||
2 | 2 | ||
3 | <form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register"> | 3 | <form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register"> |
4 | <div class="card-content"> | 4 | <div class="card-content"> |
5 | {{ form_widget(form) }} | 5 | <div class="row"> |
6 | <input type="submit" value="{{ 'registration.submit'|trans }}" /> | 6 | |
7 | {{ form_errors(form) }} | ||
8 | {{ form_widget(form._token) }} | ||
9 | |||
10 | {% for flashMessage in app.session.flashbag.get('notice') %} | ||
11 | <span class="black-text"><p>{{ flashMessage }}</p></span> | ||
12 | {% endfor %} | ||
13 | |||
14 | <div class="input-field col s12"> | ||
15 | {{ form_errors(form.email) }} | ||
16 | <label for="fos_user_registration_form_email">{% trans %}Email{% endtrans %}</label> | ||
17 | <input type="text" id="fos_user_registration_form_email" name="fos_user_registration_form[email]" /> | ||
18 | </div> | ||
19 | |||
20 | <div class="input-field col s12"> | ||
21 | {{ form_errors(form.username) }} | ||
22 | <label for="fos_user_registration_form_username">{% trans %}Username{% endtrans %}</label> | ||
23 | <input type="text" id="fos_user_registration_form_username" name="fos_user_registration_form[username]" /> | ||
24 | </div> | ||
25 | |||
26 | <div class="input-field col s12"> | ||
27 | {{ form_errors(form.plainPassword.first) }} | ||
28 | <label for="fos_user_registration_form_plainPassword_first">{% trans %}Password{% endtrans %}</label> | ||
29 | <input type="password" id="fos_user_registration_form_plainPassword_first" name="fos_user_registration_form[plainPassword][first]" /> | ||
30 | </div> | ||
31 | |||
32 | <div class="input-field col s12"> | ||
33 | {{ form_errors(form.plainPassword.second) }} | ||
34 | <label for="fos_user_registration_form_plainPassword_second">{% trans %}Repeat password{% endtrans %}</label> | ||
35 | <input type="password" id="fos_user_registration_form_plainPassword_second" name="fos_user_registration_form[plainPassword][second]" /> | ||
36 | </div> | ||
37 | </div> | ||
7 | </div> | 38 | </div> |
8 | <div class="card-action"> | 39 | <div class="card-action center"> |
40 | <a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Login{% endtrans %}</a> | ||
9 | <button class="btn waves-effect waves-light" type="submit" name="send"> | 41 | <button class="btn waves-effect waves-light" type="submit" name="send"> |
10 | {% trans %}Create account{% endtrans %} | 42 | {{ 'registration.submit'|trans({}, 'FOSUserBundle') }} |
11 | <i class="mdi-content-send right"></i> | 43 | <i class="mdi-content-send right"></i> |
12 | </button> | 44 | </button> |
13 | </div> | 45 | </div> |
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/checkEmail.html.twig new file mode 100644 index 00000000..66cbdc28 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/checkEmail.html.twig | |||
@@ -0,0 +1,11 @@ | |||
1 | {% extends "FOSUserBundle::layout.html.twig" %} | ||
2 | |||
3 | {% trans_default_domain 'FOSUserBundle' %} | ||
4 | |||
5 | {% block fos_user_content %} | ||
6 | <div class="card-content"> | ||
7 | <div class="row"> | ||
8 | {{ 'resetting.check_email'|trans({'%email%': email}) }} | ||
9 | </div> | ||
10 | </div> | ||
11 | {% endblock fos_user_content %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig new file mode 100644 index 00000000..0eec4301 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/passwordAlreadyRequested.html.twig | |||
@@ -0,0 +1,11 @@ | |||
1 | {% extends "FOSUserBundle::layout.html.twig" %} | ||
2 | |||
3 | {% trans_default_domain 'FOSUserBundle' %} | ||
4 | |||
5 | {% block fos_user_content %} | ||
6 | <div class="card-content"> | ||
7 | <div class="row"> | ||
8 | {{ 'resetting.password_already_requested'|trans }} | ||
9 | </div> | ||
10 | </div> | ||
11 | {% endblock fos_user_content %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/request_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/request_content.html.twig new file mode 100644 index 00000000..e871d7be --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/request_content.html.twig | |||
@@ -0,0 +1,26 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | ||
2 | <form action="{{ path('fos_user_resetting_send_email') }}" method="POST" class="fos_user_resetting_request"> | ||
3 | <div class="card-content"> | ||
4 | <div class="row"> | ||
5 | <p>{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}</p> | ||
6 | {% for flashMessage in app.session.flashbag.get('notice') %} | ||
7 | <span class="black-text"><p>{{ flashMessage }}</p></span> | ||
8 | {% endfor %} | ||
9 | |||
10 | {% if invalid_username is defined %} | ||
11 | <p>{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}) }}</p> | ||
12 | {% endif %} | ||
13 | |||
14 | <div class="input-field col s12"> | ||
15 | <label for="username">{{ 'resetting.request.username'|trans }}</label> | ||
16 | <input type="text" id="username" name="username" required="required" /> | ||
17 | </div> | ||
18 | </div> | ||
19 | </div> | ||
20 | <div class="card-action center"> | ||
21 | <a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Login{% endtrans %}</a> | ||
22 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
23 | {{ 'resetting.request.submit'|trans }} | ||
24 | </button> | ||
25 | </div> | ||
26 | </form> | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig new file mode 100644 index 00000000..f7e061dd --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Resetting/reset_content.html.twig | |||
@@ -0,0 +1,15 @@ | |||
1 | {% trans_default_domain 'FOSUserBundle' %} | ||
2 | |||
3 | <form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_resetting_reset"> | ||
4 | <div class="card-content"> | ||
5 | <div class="row"> | ||
6 | {{ form_widget(form) }} | ||
7 | </div> | ||
8 | <div class="card-action center"> | ||
9 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
10 | {{ 'resetting.reset.submit'|trans }} | ||
11 | <i class="mdi-content-send right"></i> | ||
12 | </button> | ||
13 | </div> | ||
14 | </div> | ||
15 | </form> | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/checkEmail.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Security/checkEmail.html.twig deleted file mode 100644 index 8f698e17..00000000 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/checkEmail.html.twig +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | |||
9 | {% block content %} | ||
10 | <main class="valign-wrapper"> | ||
11 | <div class="valign row"> | ||
12 | <h1>{% trans %}Forgot password{% endtrans %}</h1> | ||
13 | <div class="card sw"> | ||
14 | <div class="card-content"> | ||
15 | <span class="card-title black-text"> | ||
16 | <p>{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}</p> | ||
17 | </span> | ||
18 | </div> | ||
19 | </div> | ||
20 | </div> | ||
21 | </main> | ||
22 | <style> | ||
23 | main { | ||
24 | padding: 0; | ||
25 | } | ||
26 | </style> | ||
27 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/forgotPassword.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Security/forgotPassword.html.twig deleted file mode 100644 index 9750f8ba..00000000 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/forgotPassword.html.twig +++ /dev/null | |||
@@ -1,59 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | |||
9 | {% block content %} | ||
10 | <main class="valign-wrapper"> | ||
11 | <div class="valign row"> | ||
12 | <h1>{% trans %}Forgot password{% endtrans %}</h1> | ||
13 | <div class="card sw"> | ||
14 | <form action="{{ path('forgot_password') }}" method="post" name="forgotPasswordform"> | ||
15 | <div class="card-content"> | ||
16 | |||
17 | <span class="card-title black-text"><p>{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}</p></span> | ||
18 | |||
19 | {% if form_errors(form) %} | ||
20 | <span class="black-text">{{ form_errors(form) }}</span> | ||
21 | {% endif %} | ||
22 | |||
23 | {% for flashMessage in app.session.flashbag.get('notice') %} | ||
24 | <span class="black-text"><p>{{ flashMessage }}</p></span> | ||
25 | {% endfor %} | ||
26 | |||
27 | {% if form_errors(form.email) %} | ||
28 | <span class="black-text">{{ form_errors(form.email) }}</span> | ||
29 | {% endif %} | ||
30 | |||
31 | <div class="input-field s12"> | ||
32 | {{ form_label(form.email) }} | ||
33 | {{ form_widget(form.email) }} | ||
34 | </div> | ||
35 | |||
36 | </div> | ||
37 | <div class="card-action"> | ||
38 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
39 | {% trans %}Send{% endtrans %} | ||
40 | <i class="mdi-content-send right"></i> | ||
41 | </button> | ||
42 | </div> | ||
43 | {{ form_rest(form) }} | ||
44 | </form> | ||
45 | </div> | ||
46 | <div class="center"> | ||
47 | <a href="{{ path('login') }}">{% trans %}Back to login{% endtrans %}</a> | ||
48 | </div> | ||
49 | </div> | ||
50 | </main> | ||
51 | <style> | ||
52 | main { | ||
53 | padding: 0; | ||
54 | } | ||
55 | </style> | ||
56 | {% endblock %} | ||
57 | |||
58 | {% block footer %} | ||
59 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig index e9532037..6bf99bf8 100644 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/Security/login.html.twig | |||
@@ -1,69 +1,46 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | 1 | {% extends "FOSUserBundle::layout.html.twig" %} |
2 | 2 | ||
3 | {% block title %}{% trans %}login to your wallabag{% endtrans %}{% endblock %} | 3 | {% block fos_user_content %} |
4 | <form action="{{ path('fos_user_security_check') }}" method="post" name="loginform"> | ||
5 | <div class="card-content"> | ||
4 | 6 | ||
5 | {% block body_class %}login{% endblock %} | 7 | {% if error %} |
8 | <span class="black-text">{{ error.message }}</span> | ||
9 | {% endif %} | ||
6 | 10 | ||
7 | {% block menu %}{% endblock %} | 11 | {% for flashMessage in app.session.flashbag.get('notice') %} |
8 | {% block messages %}{% endblock %} | 12 | <span class="black-text"><p>{{ flashMessage }}</p></span> |
13 | {% endfor %} | ||
9 | 14 | ||
10 | {% block content %} | 15 | <div class="row"> |
11 | <main class="valign-wrapper"> | ||
12 | <div class="valign row"> | ||
13 | <div class="card sw"> | ||
14 | <div class="center"><img src="{{ asset('themes/baggy/img/logo-other_themes.png') }}" alt="wallabag logo" /></div> | ||
15 | <form action="{{ path('fos_user_security_check') }}" method="post" name="loginform"> | ||
16 | <div class="card-content"> | ||
17 | 16 | ||
18 | {% if error %} | 17 | <div class="input-field col s12"> |
19 | <span class="black-text">{{ error.message }}</span> | 18 | <label for="username">{% trans %}Username{% endtrans %}</label> |
20 | {% endif %} | 19 | <input type="text" id="username" name="_username" value="{{ last_username }}" /> |
21 | 20 | </div> | |
22 | {% for flashMessage in app.session.flashbag.get('notice') %} | ||
23 | <span class="black-text"><p>{{ flashMessage }}</p></span> | ||
24 | {% endfor %} | ||
25 | |||
26 | <div class="row"> | ||
27 | |||
28 | <div class="input-field col s12"> | ||
29 | <label for="username">{% trans %}Username{% endtrans %}</label> | ||
30 | <input type="text" id="username" name="_username" value="{{ last_username }}" /> | ||
31 | </div> | ||
32 | |||
33 | <div class="input-field col s12"> | ||
34 | <label for="password">{% trans %}Password{% endtrans %}</label> | ||
35 | <input type="password" id="password" name="_password" /> | ||
36 | </div> | ||
37 | |||
38 | <div class="input-field col s12"> | ||
39 | <input type="checkbox" id="remember_me" name="_remember_me" checked /> | ||
40 | <label for="remember_me">{% trans %}Keep me logged in{% endtrans %}</label> | ||
41 | </div> | ||
42 | |||
43 | </div> | ||
44 | 21 | ||
45 | </div> | 22 | <div class="input-field col s12"> |
46 | <div class="card-action"> | 23 | <label for="password">{% trans %}Password{% endtrans %}</label> |
47 | <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" /> | 24 | <input type="password" id="password" name="_password" /> |
48 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
49 | {% trans %}Login{% endtrans %} | ||
50 | <i class="mdi-content-send right"></i> | ||
51 | </button> | ||
52 | <a href="{{ path('fos_user_registration_register') }}">{% trans %}Register{% endtrans %}</a> | ||
53 | </div> | ||
54 | </form> | ||
55 | </div> | 25 | </div> |
56 | <div class="center"> | 26 | |
57 | <a href="{{ path('fos_user_resetting_request') }}">{% trans %}Forgot your password?{% endtrans %}</a> | 27 | <div class="input-field col s12"> |
28 | <input type="checkbox" id="remember_me" name="_remember_me" checked /> | ||
29 | <label for="remember_me">{% trans %}Keep me logged in{% endtrans %}</label> | ||
58 | </div> | 30 | </div> |
59 | </div> | ||
60 | </main> | ||
61 | <style> | ||
62 | main { | ||
63 | padding: 0; | ||
64 | } | ||
65 | </style> | ||
66 | {% endblock %} | ||
67 | 31 | ||
68 | {% block footer %} | 32 | </div> |
69 | {% endblock %} | 33 | </div> |
34 | <div class="card-action center"> | ||
35 | <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" /> | ||
36 | <a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Register{% endtrans %}</a> | ||
37 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
38 | {% trans %}Login{% endtrans %} | ||
39 | <i class="mdi-content-send right"></i> | ||
40 | </button> | ||
41 | </div> | ||
42 | <div class="center"> | ||
43 | <a href="{{ path('fos_user_resetting_request') }}">{% trans %}Forgot your password?{% endtrans %}</a> | ||
44 | </div> | ||
45 | </form> | ||
46 | {% endblock fos_user_content %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/reset.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/Security/reset.html.twig deleted file mode 100644 index 09d0b634..00000000 --- a/src/Wallabag/UserBundle/Resources/views/themes/material/Security/reset.html.twig +++ /dev/null | |||
@@ -1,57 +0,0 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}Change password{% endtrans %}{% endblock %} | ||
4 | |||
5 | {% block body_class %}login{% endblock %} | ||
6 | |||
7 | {% block menu %}{% endblock %} | ||
8 | |||
9 | {% block content %} | ||
10 | <main class="valign-wrapper"> | ||
11 | <div class="valign row"> | ||
12 | <div class="card sw"> | ||
13 | <form action="{{ path('forgot_password_reset', {'token': token}) }}" method="post" name="loginform"> | ||
14 | <div class="card-content"> | ||
15 | |||
16 | <span class="card-title black-text"><p>{% trans %}Change password{% endtrans %}</p></span> | ||
17 | |||
18 | {% if form_errors(form) %} | ||
19 | <span class="black-text">{{ form_errors(form) }}</span> | ||
20 | {% endif %} | ||
21 | |||
22 | {% if form_errors(form.new_password.first) %} | ||
23 | <span class="black-text">{{ form_errors(form.new_password.first) }}</span> | ||
24 | {% endif %} | ||
25 | |||
26 | {% if form_errors(form.new_password.second) %} | ||
27 | <span class="black-text">{{ form_errors(form.new_password.second) }}</span> | ||
28 | {% endif %} | ||
29 | |||
30 | <div class="input-field s12"> | ||
31 | {{ form_label(form.new_password.first) }} | ||
32 | {{ form_widget(form.new_password.first) }} | ||
33 | </div> | ||
34 | |||
35 | <div class="input-field s12"> | ||
36 | {{ form_label(form.new_password.second) }} | ||
37 | {{ form_widget(form.new_password.second) }} | ||
38 | </div> | ||
39 | |||
40 | </div> | ||
41 | <div class="card-action"> | ||
42 | <button class="btn waves-effect waves-light" type="submit" name="send"> | ||
43 | {% trans %}Change password{% endtrans %} | ||
44 | <i class="mdi-content-send right"></i> | ||
45 | </button> | ||
46 | </div> | ||
47 | {{ form_rest(form) }} | ||
48 | </form> | ||
49 | </div> | ||
50 | </div> | ||
51 | </main> | ||
52 | <style> | ||
53 | main { | ||
54 | padding: 0; | ||
55 | } | ||
56 | </style> | ||
57 | {% endblock %} | ||
diff --git a/src/Wallabag/UserBundle/Resources/views/themes/material/layout.html.twig b/src/Wallabag/UserBundle/Resources/views/themes/material/layout.html.twig new file mode 100644 index 00000000..0305ea45 --- /dev/null +++ b/src/Wallabag/UserBundle/Resources/views/themes/material/layout.html.twig | |||
@@ -0,0 +1,26 @@ | |||
1 | {% extends "WallabagCoreBundle::layout.html.twig" %} | ||
2 | |||
3 | {% block title %}Welcome on wallabag!{% endblock %} | ||
4 | |||
5 | {% block menu %}{% endblock %} | ||
6 | {% block messages %}{% endblock %} | ||
7 | |||
8 | {% block content %} | ||
9 | <main class="valign-wrapper"> | ||
10 | <div class="valign row"> | ||
11 | <div class="card sw"> | ||
12 | <div class="center"><img src="{{ asset('themes/material/img/logo-other_themes.png') }}" alt="wallabag logo" /></div> | ||
13 | {% block fos_user_content %} | ||
14 | {% endblock fos_user_content %} | ||
15 | </div> | ||
16 | </div> | ||
17 | </main> | ||
18 | <style> | ||
19 | main { | ||
20 | padding: 0; | ||
21 | } | ||
22 | </style> | ||
23 | {% endblock %} | ||
24 | |||
25 | {% block footer %} | ||
26 | {% endblock %} | ||