mirror of
https://github.com/wallabag/wallabag.git
synced 2025-01-09 08:25:25 +00:00
material design for register/login/recover pages
This commit is contained in:
parent
4c5e544183
commit
ec3ce598f6
29 changed files with 385 additions and 338 deletions
|
@ -160,8 +160,6 @@ fos_user:
|
|||
firewall_name: main
|
||||
user_class: Wallabag\UserBundle\Entity\User
|
||||
registration:
|
||||
form:
|
||||
type: wallabag_user_registration
|
||||
confirmation:
|
||||
enabled: true
|
||||
|
||||
|
|
|
@ -188,9 +188,10 @@ class InstallCommand extends ContainerAwareCommand
|
|||
|
||||
$em = $this->getContainer()->get('doctrine.orm.entity_manager');
|
||||
|
||||
$user = new User();
|
||||
$userManager = $this->getContainer()->get('fos_user.user_manager');
|
||||
$user = $userManager->createUser();
|
||||
$user->setUsername($dialog->ask($this->defaultOutput, '<question>Username</question> <comment>(default: wallabag)</comment> :', 'wallabag'));
|
||||
$user->setPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag'));
|
||||
$user->setPlainPassword($dialog->ask($this->defaultOutput, '<question>Password</question> <comment>(default: wallabag)</comment> :', 'wallabag'));
|
||||
$user->setEmail($dialog->ask($this->defaultOutput, '<question>Email:</question>', ''));
|
||||
$user->setEnabled(true);
|
||||
|
||||
|
|
|
@ -1,24 +0,0 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\CoreBundle\Form\Type;
|
||||
|
||||
use Symfony\Component\Form\AbstractType;
|
||||
use Symfony\Component\Form\FormBuilderInterface;
|
||||
|
||||
class RegistrationType extends AbstractType
|
||||
{
|
||||
public function buildForm(FormBuilderInterface $builder, array $options)
|
||||
{
|
||||
$builder->add('name');
|
||||
}
|
||||
|
||||
public function getParent()
|
||||
{
|
||||
return 'fos_user_registration';
|
||||
}
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return 'wallabag_user_registration';
|
||||
}
|
||||
}
|
|
@ -45,7 +45,7 @@
|
|||
<script src="{{ asset('themes/_global/js/bookmarklet.js') }}"></script>
|
||||
{% endblock %}
|
||||
|
||||
<title>{% block title %}{% endblock %} - wallabag</title>
|
||||
<title>{% block title %}{% endblock %}</title>
|
||||
{% endblock %}
|
||||
</head>
|
||||
|
||||
|
@ -60,7 +60,7 @@
|
|||
|
||||
{% block messages %}{% endblock %}
|
||||
|
||||
<div id="content" class="w600p">
|
||||
<div id="content">
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
|
|
|
@ -1,31 +0,0 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ path('forgot_password') }}" method="post" name="forgotPasswordform">
|
||||
<fieldset class="w500p center">
|
||||
<h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
|
||||
|
||||
{{ form_errors(form) }}
|
||||
|
||||
<p>Enter your email address below and we'll send you password reset instructions.</p>
|
||||
|
||||
<div class="row">
|
||||
{{ form_label(form.email) }}
|
||||
{{ form_errors(form.email) }}
|
||||
{{ form_widget(form.email) }}
|
||||
</div>
|
||||
|
||||
<div class="row mts txtcenter">
|
||||
<button type="submit">Send me reset instructions</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -1,35 +0,0 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}Change password{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ path('forgot_password_reset', {'token': token}) }}" method="post" name="loginform">
|
||||
<fieldset class="w500p center">
|
||||
<h2 class="mbs txtcenter">{% trans %}Change password{% endtrans %}</h2>
|
||||
|
||||
{{ form_errors(form) }}
|
||||
|
||||
<div class="row">
|
||||
{{ form_label(form.new_password.first) }}
|
||||
{{ form_errors(form.new_password.first) }}
|
||||
{{ form_widget(form.new_password.first) }}
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{ form_label(form.new_password.second) }}
|
||||
{{ form_errors(form.new_password.second) }}
|
||||
{{ form_widget(form.new_password.second) }}
|
||||
</div>
|
||||
|
||||
<div class="row mts txtcenter">
|
||||
<button type="submit">Change password</button>
|
||||
</div>
|
||||
</fieldset>
|
||||
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -250,9 +250,14 @@ main ul.row {
|
|||
}
|
||||
|
||||
.card .card-action a {
|
||||
color: #ffffff;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.card .card-action a:hover {
|
||||
color: #ffffff;
|
||||
}
|
||||
|
||||
.settings .div_tabs {
|
||||
padding-bottom: 15px;
|
||||
}
|
||||
|
|
Binary file not shown.
Before Width: | Height: | Size: 3.8 KiB After Width: | Height: | Size: 3 KiB |
75
src/Wallabag/UserBundle/Controller/ResettingController.php
Normal file
75
src/Wallabag/UserBundle/Controller/ResettingController.php
Normal file
|
@ -0,0 +1,75 @@
|
|||
<?php
|
||||
|
||||
namespace Wallabag\UserBundle\Controller;
|
||||
|
||||
use FOS\UserBundle\FOSUserEvents;
|
||||
use FOS\UserBundle\Event\FormEvent;
|
||||
use FOS\UserBundle\Event\GetResponseUserEvent;
|
||||
use FOS\UserBundle\Event\FilterUserResponseEvent;
|
||||
use Symfony\Component\HttpFoundation\Request;
|
||||
use Symfony\Component\HttpFoundation\RedirectResponse;
|
||||
use Symfony\Component\HttpKernel\Exception\NotFoundHttpException;
|
||||
|
||||
class ResettingController extends \FOS\UserBundle\Controller\ResettingController
|
||||
{
|
||||
/**
|
||||
* Extends ResettingController to change the redirection after success.
|
||||
*
|
||||
* @param Request $request
|
||||
* @param $token
|
||||
*
|
||||
* @return null|RedirectResponse|\Symfony\Component\HttpFoundation\Response
|
||||
*/
|
||||
public function resetAction(Request $request, $token)
|
||||
{
|
||||
/** @var $formFactory \FOS\UserBundle\Form\Factory\FactoryInterface */
|
||||
$formFactory = $this->get('fos_user.resetting.form.factory');
|
||||
/** @var $userManager \FOS\UserBundle\Model\UserManagerInterface */
|
||||
$userManager = $this->get('fos_user.user_manager');
|
||||
/** @var $dispatcher \Symfony\Component\EventDispatcher\EventDispatcherInterface */
|
||||
$dispatcher = $this->get('event_dispatcher');
|
||||
|
||||
$user = $userManager->findUserByConfirmationToken($token);
|
||||
|
||||
if (null === $user) {
|
||||
throw new NotFoundHttpException(sprintf('The user with "confirmation token" does not exist for value "%s"', $token));
|
||||
}
|
||||
|
||||
$event = new GetResponseUserEvent($user, $request);
|
||||
$dispatcher->dispatch(FOSUserEvents::RESETTING_RESET_INITIALIZE, $event);
|
||||
|
||||
if (null !== $event->getResponse()) {
|
||||
return $event->getResponse();
|
||||
}
|
||||
|
||||
$form = $formFactory->createForm();
|
||||
$form->setData($user);
|
||||
|
||||
$form->handleRequest($request);
|
||||
|
||||
if ($form->isValid()) {
|
||||
$event = new FormEvent($form, $request);
|
||||
$dispatcher->dispatch(FOSUserEvents::RESETTING_RESET_SUCCESS, $event);
|
||||
|
||||
$userManager->updateUser($user);
|
||||
|
||||
if (null === $response = $event->getResponse()) {
|
||||
$this->get('session')->getFlashBag()->add(
|
||||
'notice',
|
||||
'Password updated'
|
||||
);
|
||||
$url = $this->generateUrl('homepage');
|
||||
$response = new RedirectResponse($url);
|
||||
}
|
||||
|
||||
$dispatcher->dispatch(FOSUserEvents::RESETTING_RESET_COMPLETED, new FilterUserResponseEvent($user, $request, $response));
|
||||
|
||||
return $response;
|
||||
}
|
||||
|
||||
return $this->render('FOSUserBundle:Resetting:reset.html.twig', array(
|
||||
'token' => $token,
|
||||
'form' => $form->createView(),
|
||||
));
|
||||
}
|
||||
}
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}create an account{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
{% block messages %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register">
|
||||
<fieldset class="w500p center">
|
||||
<h2 class="mbs txtcenter">{% trans %}create an account{% endtrans %}</h2>
|
||||
{% include "FOSUserBundle:Registration:register_content.html.twig" %}
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,38 @@
|
|||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{{ form_errors(form) }}
|
||||
{{ form_widget(form._token) }}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<span><p>{{ flashMessage }}</p></span>
|
||||
{% endfor %}
|
||||
|
||||
<div class="row">
|
||||
{{ form_errors(form.email) }}
|
||||
<label for="fos_user_registration_form_email">{% trans %}Email{% endtrans %}</label>
|
||||
<input type="text" id="fos_user_registration_form_email" name="fos_user_registration_form[email]" />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{ form_errors(form.username) }}
|
||||
<label for="fos_user_registration_form_username">{% trans %}Username{% endtrans %}</label>
|
||||
<input type="text" id="fos_user_registration_form_username" name="fos_user_registration_form[username]" />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{ form_errors(form.plainPassword.first) }}
|
||||
<label for="fos_user_registration_form_plainPassword_first">{% trans %}Password{% endtrans %}</label>
|
||||
<input type="password" id="fos_user_registration_form_plainPassword_first" name="fos_user_registration_form[plainPassword][first]" />
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
{{ form_errors(form.plainPassword.second) }}
|
||||
<label for="fos_user_registration_form_plainPassword_second">{% trans %}Repeat password{% endtrans %}</label>
|
||||
<input type="password" id="fos_user_registration_form_plainPassword_second" name="fos_user_registration_form[plainPassword][second]" />
|
||||
</div>
|
||||
|
||||
|
||||
<div class="row mts txtcenter">
|
||||
<button type="submit">{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}</button>
|
||||
<a href="{{ path('fos_user_security_login') }}" class="button">{% trans %}Login{% endtrans %}</a>
|
||||
</div>
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
{% block messages %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ path('fos_user_resetting_send_email') }}" method="post" name="forgotPasswordform">
|
||||
<fieldset class="w500p center">
|
||||
<h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
|
||||
{% include "FOSUserBundle:Resetting:request_content.html.twig" %}
|
||||
</fieldset>
|
||||
</form>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
|
@ -0,0 +1,17 @@
|
|||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}
|
||||
|
||||
{% if invalid_username is defined %}
|
||||
<p>{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}) }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="row">
|
||||
<label for="username">{{ 'resetting.request.username'|trans }}</label>
|
||||
<input type="text" id="username" name="username" required="required" />
|
||||
</div>
|
||||
|
||||
<div class="row mts txtcenter">
|
||||
<button type="submit">{{ 'resetting.request.submit'|trans }}</button>
|
||||
<a href="{{ path('fos_user_security_login') }}" class="button">{% trans %}Login{% endtrans %}</a>
|
||||
</div>
|
|
@ -8,7 +8,7 @@
|
|||
{% block messages %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<form action="{{ path('login_check') }}" method="post" name="loginform">
|
||||
<form action="{{ path('fos_user_security_check') }}" method="post" name="loginform">
|
||||
<fieldset class="w500p center">
|
||||
<h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2>
|
||||
{% if error %}
|
||||
|
@ -33,7 +33,7 @@
|
|||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||
<button type="submit">Login</button>
|
||||
<a href="{{ path('fos_user_registration_register') }}" class="button">{% trans %}Register{% endtrans %}</a>
|
||||
<a href="{{ path('forgot_password') }}" class="small">Forgot your password?</a>
|
||||
<a href="{{ path('fos_user_resetting_request') }}" class="small">Forgot your password?</a>
|
||||
</div>
|
||||
</fieldset>
|
||||
</form>
|
|
@ -0,0 +1,12 @@
|
|||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
<form action="{{ path('fos_user_change_password') }}" {{ form_enctype(form) }} method="POST" class="fos_user_change_password">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
{{ form_widget(form) }}
|
||||
<div>
|
||||
<input type="submit" value="{{ 'change_password.submit'|trans }}" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "FOSUserBundle::layout.html.twig" %}
|
||||
|
||||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% block fos_user_content %}
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<p>{{ 'registration.check_email'|trans({'%email%': user.email}) }}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock fos_user_content %}
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "FOSUserBundle::layout.html.twig" %}
|
||||
|
||||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% block fos_user_content %}
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<p>{{ 'registration.confirmed'|trans({'%username%': user.username}) }}</p>
|
||||
{% if targetUrl %}
|
||||
<p><a href="{{ targetUrl }}">{{ 'registration.back'|trans }}</a></p>
|
||||
{% endif %}
|
||||
</div>
|
||||
<div class="card-action center">
|
||||
<a href="{{ path('homepage') }}" class="waves-effect waves-light btn"><i class="material-icons left"></i> {% trans %}Go to your account{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock fos_user_content %}
|
|
@ -1,32 +0,0 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}create an account{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}register{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
{% block messages %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main class="valign-wrapper">
|
||||
<div class="valign row">
|
||||
<div class="card sw">
|
||||
<div class="center"><img src="{{ asset('themes/baggy/img/logo-other_themes.png') }}" alt="wallabag logo" /></div>
|
||||
|
||||
{% include "FOSUserBundle:Registration:register_content.html.twig" %}
|
||||
|
||||
</div>
|
||||
<div class="center">
|
||||
<a href="{{ path('fos_user_security_login') }}">{% trans %}Already have an account?{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
|
@ -2,12 +2,44 @@
|
|||
|
||||
<form action="{{ path('fos_user_registration_register') }}" {{ form_enctype(form) }} method="POST" class="fos_user_registration_register">
|
||||
<div class="card-content">
|
||||
{{ form_widget(form) }}
|
||||
<input type="submit" value="{{ 'registration.submit'|trans }}" />
|
||||
<div class="row">
|
||||
|
||||
{{ form_errors(form) }}
|
||||
{{ form_widget(form._token) }}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<span class="black-text"><p>{{ flashMessage }}</p></span>
|
||||
{% endfor %}
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_errors(form.email) }}
|
||||
<label for="fos_user_registration_form_email">{% trans %}Email{% endtrans %}</label>
|
||||
<input type="text" id="fos_user_registration_form_email" name="fos_user_registration_form[email]" />
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_errors(form.username) }}
|
||||
<label for="fos_user_registration_form_username">{% trans %}Username{% endtrans %}</label>
|
||||
<input type="text" id="fos_user_registration_form_username" name="fos_user_registration_form[username]" />
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_errors(form.plainPassword.first) }}
|
||||
<label for="fos_user_registration_form_plainPassword_first">{% trans %}Password{% endtrans %}</label>
|
||||
<input type="password" id="fos_user_registration_form_plainPassword_first" name="fos_user_registration_form[plainPassword][first]" />
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
{{ form_errors(form.plainPassword.second) }}
|
||||
<label for="fos_user_registration_form_plainPassword_second">{% trans %}Repeat password{% endtrans %}</label>
|
||||
<input type="password" id="fos_user_registration_form_plainPassword_second" name="fos_user_registration_form[plainPassword][second]" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<div class="card-action center">
|
||||
<a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Login{% endtrans %}</a>
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{% trans %}Create account{% endtrans %}
|
||||
{{ 'registration.submit'|trans({}, 'FOSUserBundle') }}
|
||||
<i class="mdi-content-send right"></i>
|
||||
</button>
|
||||
</div>
|
||||
|
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "FOSUserBundle::layout.html.twig" %}
|
||||
|
||||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% block fos_user_content %}
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
{{ 'resetting.check_email'|trans({'%email%': email}) }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock fos_user_content %}
|
|
@ -0,0 +1,11 @@
|
|||
{% extends "FOSUserBundle::layout.html.twig" %}
|
||||
|
||||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
{% block fos_user_content %}
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
{{ 'resetting.password_already_requested'|trans }}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock fos_user_content %}
|
|
@ -0,0 +1,26 @@
|
|||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
<form action="{{ path('fos_user_resetting_send_email') }}" method="POST" class="fos_user_resetting_request">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
<p>{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}</p>
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<span class="black-text"><p>{{ flashMessage }}</p></span>
|
||||
{% endfor %}
|
||||
|
||||
{% if invalid_username is defined %}
|
||||
<p>{{ 'resetting.request.invalid_username'|trans({'%username%': invalid_username}) }}</p>
|
||||
{% endif %}
|
||||
|
||||
<div class="input-field col s12">
|
||||
<label for="username">{{ 'resetting.request.username'|trans }}</label>
|
||||
<input type="text" id="username" name="username" required="required" />
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="card-action center">
|
||||
<a href="{{ path('fos_user_security_login') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Login{% endtrans %}</a>
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{{ 'resetting.request.submit'|trans }}
|
||||
</button>
|
||||
</div>
|
||||
</form>
|
|
@ -0,0 +1,15 @@
|
|||
{% trans_default_domain 'FOSUserBundle' %}
|
||||
|
||||
<form action="{{ path('fos_user_resetting_reset', {'token': token}) }}" {{ form_enctype(form) }} method="POST" class="fos_user_resetting_reset">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
{{ form_widget(form) }}
|
||||
</div>
|
||||
<div class="card-action center">
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{{ 'resetting.reset.submit'|trans }}
|
||||
<i class="mdi-content-send right"></i>
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
|
@ -1,27 +0,0 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main class="valign-wrapper">
|
||||
<div class="valign row">
|
||||
<h1>{% trans %}Forgot password{% endtrans %}</h1>
|
||||
<div class="card sw">
|
||||
<div class="card-content">
|
||||
<span class="card-title black-text">
|
||||
<p>{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}</p>
|
||||
</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
|
@ -1,59 +0,0 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}Forgot password{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main class="valign-wrapper">
|
||||
<div class="valign row">
|
||||
<h1>{% trans %}Forgot password{% endtrans %}</h1>
|
||||
<div class="card sw">
|
||||
<form action="{{ path('forgot_password') }}" method="post" name="forgotPasswordform">
|
||||
<div class="card-content">
|
||||
|
||||
<span class="card-title black-text"><p>{% trans %}Enter your email address below and we'll send you password reset instructions.{% endtrans %}</p></span>
|
||||
|
||||
{% if form_errors(form) %}
|
||||
<span class="black-text">{{ form_errors(form) }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<span class="black-text"><p>{{ flashMessage }}</p></span>
|
||||
{% endfor %}
|
||||
|
||||
{% if form_errors(form.email) %}
|
||||
<span class="black-text">{{ form_errors(form.email) }}</span>
|
||||
{% endif %}
|
||||
|
||||
<div class="input-field s12">
|
||||
{{ form_label(form.email) }}
|
||||
{{ form_widget(form.email) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{% trans %}Send{% endtrans %}
|
||||
<i class="mdi-content-send right"></i>
|
||||
</button>
|
||||
</div>
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
</div>
|
||||
<div class="center">
|
||||
<a href="{{ path('login') }}">{% trans %}Back to login{% endtrans %}</a>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
|
@ -1,69 +1,46 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
{% extends "FOSUserBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}login to your wallabag{% endtrans %}{% endblock %}
|
||||
{% block fos_user_content %}
|
||||
<form action="{{ path('fos_user_security_check') }}" method="post" name="loginform">
|
||||
<div class="card-content">
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
{% if error %}
|
||||
<span class="black-text">{{ error.message }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
{% block messages %}{% endblock %}
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<span class="black-text"><p>{{ flashMessage }}</p></span>
|
||||
{% endfor %}
|
||||
|
||||
{% block content %}
|
||||
<main class="valign-wrapper">
|
||||
<div class="valign row">
|
||||
<div class="card sw">
|
||||
<div class="center"><img src="{{ asset('themes/baggy/img/logo-other_themes.png') }}" alt="wallabag logo" /></div>
|
||||
<form action="{{ path('fos_user_security_check') }}" method="post" name="loginform">
|
||||
<div class="card-content">
|
||||
<div class="row">
|
||||
|
||||
{% if error %}
|
||||
<span class="black-text">{{ error.message }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% for flashMessage in app.session.flashbag.get('notice') %}
|
||||
<span class="black-text"><p>{{ flashMessage }}</p></span>
|
||||
{% endfor %}
|
||||
|
||||
<div class="row">
|
||||
|
||||
<div class="input-field col s12">
|
||||
<label for="username">{% trans %}Username{% endtrans %}</label>
|
||||
<input type="text" id="username" name="_username" value="{{ last_username }}" />
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
<label for="password">{% trans %}Password{% endtrans %}</label>
|
||||
<input type="password" id="password" name="_password" />
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
<input type="checkbox" id="remember_me" name="_remember_me" checked />
|
||||
<label for="remember_me">{% trans %}Keep me logged in{% endtrans %}</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{% trans %}Login{% endtrans %}
|
||||
<i class="mdi-content-send right"></i>
|
||||
</button>
|
||||
<a href="{{ path('fos_user_registration_register') }}">{% trans %}Register{% endtrans %}</a>
|
||||
</div>
|
||||
</form>
|
||||
<div class="input-field col s12">
|
||||
<label for="username">{% trans %}Username{% endtrans %}</label>
|
||||
<input type="text" id="username" name="_username" value="{{ last_username }}" />
|
||||
</div>
|
||||
<div class="center">
|
||||
<a href="{{ path('fos_user_resetting_request') }}">{% trans %}Forgot your password?{% endtrans %}</a>
|
||||
|
||||
<div class="input-field col s12">
|
||||
<label for="password">{% trans %}Password{% endtrans %}</label>
|
||||
<input type="password" id="password" name="_password" />
|
||||
</div>
|
||||
|
||||
<div class="input-field col s12">
|
||||
<input type="checkbox" id="remember_me" name="_remember_me" checked />
|
||||
<label for="remember_me">{% trans %}Keep me logged in{% endtrans %}</label>
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
||||
</div>
|
||||
<div class="card-action center">
|
||||
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
|
||||
<a href="{{ path('fos_user_registration_register') }}" class="waves-effect waves-light grey btn"><i class="material-icons left"></i> {% trans %}Register{% endtrans %}</a>
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{% trans %}Login{% endtrans %}
|
||||
<i class="mdi-content-send right"></i>
|
||||
</button>
|
||||
</div>
|
||||
<div class="center">
|
||||
<a href="{{ path('fos_user_resetting_request') }}">{% trans %}Forgot your password?{% endtrans %}</a>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock fos_user_content %}
|
||||
|
|
|
@ -1,57 +0,0 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}{% trans %}Change password{% endtrans %}{% endblock %}
|
||||
|
||||
{% block body_class %}login{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main class="valign-wrapper">
|
||||
<div class="valign row">
|
||||
<div class="card sw">
|
||||
<form action="{{ path('forgot_password_reset', {'token': token}) }}" method="post" name="loginform">
|
||||
<div class="card-content">
|
||||
|
||||
<span class="card-title black-text"><p>{% trans %}Change password{% endtrans %}</p></span>
|
||||
|
||||
{% if form_errors(form) %}
|
||||
<span class="black-text">{{ form_errors(form) }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if form_errors(form.new_password.first) %}
|
||||
<span class="black-text">{{ form_errors(form.new_password.first) }}</span>
|
||||
{% endif %}
|
||||
|
||||
{% if form_errors(form.new_password.second) %}
|
||||
<span class="black-text">{{ form_errors(form.new_password.second) }}</span>
|
||||
{% endif %}
|
||||
|
||||
<div class="input-field s12">
|
||||
{{ form_label(form.new_password.first) }}
|
||||
{{ form_widget(form.new_password.first) }}
|
||||
</div>
|
||||
|
||||
<div class="input-field s12">
|
||||
{{ form_label(form.new_password.second) }}
|
||||
{{ form_widget(form.new_password.second) }}
|
||||
</div>
|
||||
|
||||
</div>
|
||||
<div class="card-action">
|
||||
<button class="btn waves-effect waves-light" type="submit" name="send">
|
||||
{% trans %}Change password{% endtrans %}
|
||||
<i class="mdi-content-send right"></i>
|
||||
</button>
|
||||
</div>
|
||||
{{ form_rest(form) }}
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
|
@ -0,0 +1,26 @@
|
|||
{% extends "WallabagCoreBundle::layout.html.twig" %}
|
||||
|
||||
{% block title %}Welcome on wallabag!{% endblock %}
|
||||
|
||||
{% block menu %}{% endblock %}
|
||||
{% block messages %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<main class="valign-wrapper">
|
||||
<div class="valign row">
|
||||
<div class="card sw">
|
||||
<div class="center"><img src="{{ asset('themes/material/img/logo-other_themes.png') }}" alt="wallabag logo" /></div>
|
||||
{% block fos_user_content %}
|
||||
{% endblock fos_user_content %}
|
||||
</div>
|
||||
</div>
|
||||
</main>
|
||||
<style>
|
||||
main {
|
||||
padding: 0;
|
||||
}
|
||||
</style>
|
||||
{% endblock %}
|
||||
|
||||
{% block footer %}
|
||||
{% endblock %}
|
Loading…
Reference in a new issue