Merge pull request #1436 from wallabag/v2-register

Public registration & oAuth2 \o/
This commit is contained in:
Jeremy Benoist
2015-10-06 09:19:06 +02:00
82 changed files with 1148 additions and 1350 deletions

View File

@ -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>

View File

@ -135,6 +135,7 @@
{{ form_rest(form.pwd) }}
</form>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<h2>{% trans %}Add a user{% endtrans %}</h2>
<form action="{{ path('config') }}" method="post" {{ form_enctype(form.new_user) }}>
@ -150,9 +151,17 @@
<fieldset class="w500p inline">
<div class="row">
{{ form_label(form.new_user.password) }}
{{ form_errors(form.new_user.password) }}
{{ form_widget(form.new_user.password) }}
{{ form_label(form.new_user.plainPassword.first) }}
{{ form_errors(form.new_user.plainPassword.first) }}
{{ form_widget(form.new_user.plainPassword.first) }}
</div>
</fieldset>
<fieldset class="w500p inline">
<div class="row">
{{ form_label(form.new_user.plainPassword.second) }}
{{ form_errors(form.new_user.plainPassword.second) }}
{{ form_widget(form.new_user.plainPassword.second) }}
</div>
</fieldset>
@ -165,5 +174,6 @@
</fieldset>
{{ form_rest(form.new_user) }}
{% endif %}
</form>
{% endblock %}

View File

@ -1,17 +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>
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans %}Forgot password{% endtrans %}</h2>
<p>{{ 'An email has been sent to %email%. It contains a link you must click to reset your password.'|trans({'%email%': email}) }}</p>
</fieldset>
</form>
{% endblock %}

View File

@ -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 %}

View File

@ -1,39 +0,0 @@
{% extends "WallabagCoreBundle::layout.html.twig" %}
{% block title %}{% trans %}login to your wallabag{% endtrans %}{% endblock %}
{% block body_class %}login{% endblock %}
{% block menu %}{% endblock %}
{% block messages %}{% endblock %}
{% block content %}
<form action="{{ path('login_check') }}" method="post" name="loginform">
<fieldset class="w500p center">
<h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2>
{% if error %}
<div>{{ error.message }}</div>
{% endif %}
{% for flashMessage in app.session.flashbag.get('notice') %}
<p>{{ flashMessage }}</p>
{% endfor %}
<div class="row">
<label class="col w150p" for="username">{% trans %}Username{% endtrans %}</label>
<input type="text" id="username" name="_username" value="{{ last_username }}" />
</div>
<div class="row">
<label class="col w150p" for="password">{% trans %}Password{% endtrans %}</label>
<input type="password" id="password" name="_password" />
</div>
<div class="row mts txtcenter">
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}" />
<button type="submit">Login</button>
<a href="{{ path('forgot_password') }}" class="small">Forgot your password?</a>
</div>
</fieldset>
</form>
{% endblock %}

View File

@ -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 %}

View File

@ -52,7 +52,7 @@
</li>
<li><a href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
<li><a href="{{ path('about') }}">{% trans %}about{% endtrans %}</a></li>
<li><a class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
<li><a class="icon icon-power" href="{{ path('fos_user_security_logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
</ul>
{% endblock %}

View File

@ -15,7 +15,9 @@
<li class="tab col s3"><a href="#set2">{% trans %}RSS{% endtrans %}</a></li>
<li class="tab col s3"><a href="#set3">{% trans %}User information{% endtrans %}</a></li>
<li class="tab col s3"><a href="#set4">{% trans %}Password{% endtrans %}</a></li>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<li class="tab col s3"><a href="#set5">{% trans %}Add a user{% endtrans %}</a></li>
{% endif %}
</ul>
</div>
@ -175,7 +177,7 @@
</form>
</div>
{% if is_granted('ROLE_SUPER_ADMIN') %}
<div id="set5" class="col s12">
<form action="{{ path('config') }}#set5" method="post" {{ form_enctype(form.new_user) }}>
{{ form_errors(form.new_user) }}
@ -190,9 +192,17 @@
<div class="row">
<div class="input-field col s12">
{{ form_label(form.new_user.password) }}
{{ form_errors(form.new_user.password) }}
{{ form_widget(form.new_user.password) }}
{{ form_label(form.new_user.plainPassword.first) }}
{{ form_errors(form.new_user.plainPassword.first) }}
{{ form_widget(form.new_user.plainPassword.first) }}
</div>
</div>
<div class="row">
<div class="input-field col s12">
{{ form_label(form.new_user.plainPassword.second) }}
{{ form_errors(form.new_user.plainPassword.second) }}
{{ form_widget(form.new_user.plainPassword.second) }}
</div>
</div>
@ -211,6 +221,7 @@
</form>
</div>
{% endif %}
</div>
</div>

View File

@ -49,11 +49,12 @@
{% 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>
<div class="center">
<a href="{{ path('forgot_password') }}">{% trans %}Forgot your password?{% endtrans %}</a>
<a href="{{ path('fos_user_resetting_request') }}">{% trans %}Forgot your password?{% endtrans %}</a>
</div>
</div>
</main>

View File

@ -46,8 +46,7 @@
<li class="bold border-bottom {% if currentRoute == 'tags' %}active{% endif %}"><a class="waves-effect" href="{{ path('tag') }}">{% trans %}tags{% endtrans %}</a></li>
<li class="bold {% if currentRoute == 'config' %}active{% endif %}"><a class="waves-effect" href="{{ path('config') }}">{% trans %}config{% endtrans %}</a></li>
<li class="bold {% if currentRoute == 'howto' %}active{% endif %}"><a class="waves-effect" href="{{ path('howto') }}">{% trans %}howto{% endtrans %}</a></li>
<li class="bold border-bottom {% if currentRoute == 'about' %}active{% endif %}"><a class="waves-effect" href="{{ path('about') }}">{% trans %}About{% endtrans %}</a></li>
<li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
<li class="bold"><a class="waves-effect" class="icon icon-power" href="{{ path('fos_user_security_logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li>
</ul>
<div class="nav-wrapper nav-panels">
<a href="#" data-activates="slide-out" class="nav-panel-menu button-collapse"><i class="mdi-navigation-menu"></i></a>

View File

@ -24,6 +24,10 @@ body {
background: #f0f0f0;
}
body.login main {
padding: 0;
}
#warning_message {
position: fixed;
background-color: #ff6347;
@ -250,9 +254,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.0 KiB