diff options
author | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-01-31 15:14:10 +0100 |
---|---|---|
committer | Nicolas Lœuillet <nicolas@loeuillet.org> | 2015-01-31 15:14:10 +0100 |
commit | c3235553ddc2bb5965f6fe00e750cfe4aac9ccdf (patch) | |
tree | 271305a039d31059c7af8be220da08b9331baeec /src/Wallabag/CoreBundle/Resources/views | |
parent | 71691fe44a7b2a80f3b9d96d54720cce7994ad08 (diff) | |
download | wallabag-c3235553ddc2bb5965f6fe00e750cfe4aac9ccdf.tar.gz wallabag-c3235553ddc2bb5965f6fe00e750cfe4aac9ccdf.tar.zst wallabag-c3235553ddc2bb5965f6fe00e750cfe4aac9ccdf.zip |
first implementation of security
Diffstat (limited to 'src/Wallabag/CoreBundle/Resources/views')
4 files changed, 83 insertions, 25 deletions
diff --git a/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig b/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig new file mode 100644 index 00000000..2437e3b0 --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/Security/login.html.twig | |||
@@ -0,0 +1,32 @@ | |||
1 | {% extends "WallabagCoreBundle::layout-login.html.twig" %} | ||
2 | |||
3 | {% block title %}{% trans %}login to your wallabag{% endtrans %}{% endblock %} | ||
4 | {% block content %} | ||
5 | {% if error %} | ||
6 | <div>{{ error.message }}</div> | ||
7 | {% endif %} | ||
8 | |||
9 | <form action="{{ path('login_check') }}" method="post" name="loginform"> | ||
10 | <fieldset class="w500p center"> | ||
11 | <h2 class="mbs txtcenter">{% trans %}Login to wallabag{% endtrans %}</h2> | ||
12 | |||
13 | <div class="row"> | ||
14 | <label class="col w150p" for="username">{% trans %}Username{% endtrans %}</label> | ||
15 | <input type="text" id="username" name="_username" value="{{ last_username }}" /> | ||
16 | </div> | ||
17 | |||
18 | <div class="row"> | ||
19 | <label class="col w150p" for="password">{% trans %}Password{% endtrans %}</label> | ||
20 | <input type="password" id="password" name="_password" /> | ||
21 | </div> | ||
22 | {# | ||
23 | Si vous voulez contrôler l'URL vers laquelle l'utilisateur est redirigé en cas de succès | ||
24 | (plus de détails ci-dessous) | ||
25 | <input type="hidden" name="_target_path" value="/account" /> | ||
26 | #} | ||
27 | <div class="row mts txtcenter"> | ||
28 | <button type="submit">login</button> | ||
29 | </div> | ||
30 | </fieldset> | ||
31 | </form> | ||
32 | {% endblock %} | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/_menu.html.twig b/src/Wallabag/CoreBundle/Resources/views/_menu.html.twig index d4560e84..3065ce44 100644 --- a/src/Wallabag/CoreBundle/Resources/views/_menu.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/_menu.html.twig | |||
@@ -10,6 +10,6 @@ | |||
10 | </li> | 10 | </li> |
11 | <li><a href="?view=config">{% trans %}config{% endtrans %}</a></li> | 11 | <li><a href="?view=config">{% trans %}config{% endtrans %}</a></li> |
12 | <li><a href={{ path('about') }}>{% trans %}about{% endtrans %}</a></li> | 12 | <li><a href={{ path('about') }}>{% trans %}about{% endtrans %}</a></li> |
13 | <li><a class="icon icon-power" href="?logout" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li> | 13 | <li><a class="icon icon-power" href="{{ path('logout') }}" title="{% trans %}logout{% endtrans %}">{% trans %}logout{% endtrans %}</a></li> |
14 | </ul> | 14 | </ul> |
15 | 15 | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/layout-login.html.twig b/src/Wallabag/CoreBundle/Resources/views/layout-login.html.twig new file mode 100644 index 00000000..9c39ea9f --- /dev/null +++ b/src/Wallabag/CoreBundle/Resources/views/layout-login.html.twig | |||
@@ -0,0 +1,26 @@ | |||
1 | <!DOCTYPE html> | ||
2 | <!--[if lte IE 6]><html class="no-js ie6 ie67 ie678" lang="en"><![endif]--> | ||
3 | <!--[if lte IE 7]><html class="no-js ie7 ie67 ie678" lang="en"><![endif]--> | ||
4 | <!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]--> | ||
5 | <!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> | ||
6 | <html lang="en"> | ||
7 | <head> | ||
8 | <meta name="viewport" content="initial-scale=1.0"> | ||
9 | <meta charset="utf-8"> | ||
10 | <!--[if IE]> | ||
11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> | ||
12 | <![endif]--> | ||
13 | <title>{% block title %}{% endblock %} - wallabag</title> | ||
14 | {% include "WallabagCoreBundle::_head.html.twig" %} | ||
15 | </head> | ||
16 | <body class="login"> | ||
17 | {% include "WallabagCoreBundle::_top.html.twig" %} | ||
18 | <div id="main"> | ||
19 | {% block menu %}{% endblock %} | ||
20 | <div id="content" class="w600p center"> | ||
21 | {% block content %}{% endblock %} | ||
22 | </div> | ||
23 | </div> | ||
24 | {% include "WallabagCoreBundle::_footer.html.twig" %} | ||
25 | </body> | ||
26 | </html> \ No newline at end of file | ||
diff --git a/src/Wallabag/CoreBundle/Resources/views/layout.html.twig b/src/Wallabag/CoreBundle/Resources/views/layout.html.twig index 83830a4a..1f1753a4 100644 --- a/src/Wallabag/CoreBundle/Resources/views/layout.html.twig +++ b/src/Wallabag/CoreBundle/Resources/views/layout.html.twig | |||
@@ -4,30 +4,30 @@ | |||
4 | <!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]--> | 4 | <!--[if IE 8]><html class="no-js ie8 ie678" lang="en"><![endif]--> |
5 | <!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> | 5 | <!--[if gt IE 8]><html class="no-js" lang="en"><![endif]--> |
6 | <html lang="en"> | 6 | <html lang="en"> |
7 | <head> | 7 | <head> |
8 | <meta name="viewport" content="initial-scale=1.0"> | 8 | <meta name="viewport" content="initial-scale=1.0"> |
9 | <meta charset="utf-8"> | 9 | <meta charset="utf-8"> |
10 | <!--[if IE]> | 10 | <!--[if IE]> |
11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> | 11 | <meta http-equiv="X-UA-Compatible" content="IE=10"> |
12 | <![endif]--> | 12 | <![endif]--> |
13 | <title>{% block title %}{% endblock %} - wallabag</title> | 13 | <title>{% block title %}{% endblock %} - wallabag</title> |
14 | {% include "WallabagCoreBundle::_head.html.twig" %} | 14 | {% include "WallabagCoreBundle::_head.html.twig" %} |
15 | {% include "WallabagCoreBundle::_bookmarklet.html.twig" %} | 15 | {% include "WallabagCoreBundle::_bookmarklet.html.twig" %} |
16 | </head> | 16 | </head> |
17 | <body> | 17 | <body> |
18 | {% include "WallabagCoreBundle::_top.html.twig" %} | 18 | {% include "WallabagCoreBundle::_top.html.twig" %} |
19 | <div id="main"> | 19 | <div id="main"> |
20 | {% block menu %}{% endblock %} | 20 | {% block menu %}{% endblock %} |
21 | {% block precontent %}{% endblock %} | 21 | {% block precontent %}{% endblock %} |
22 | {% for flashMessage in app.session.flashbag.get('notice') %} | 22 | {% for flashMessage in app.session.flashbag.get('notice') %} |
23 | <div class="flash-notice"> | 23 | <div class="flash-notice"> |
24 | {{ flashMessage }} | 24 | {{ flashMessage }} |
25 | </div> | ||
26 | {% endfor %} | ||
27 | <div id="content" class="w600p center"> | ||
28 | {% block content %}{% endblock %} | ||
25 | </div> | 29 | </div> |
26 | {% endfor %} | ||
27 | <div id="content" class="w600p center"> | ||
28 | {% block content %}{% endblock %} | ||
29 | </div> | 30 | </div> |
30 | </div> | 31 | {% include "WallabagCoreBundle::_footer.html.twig" %} |
31 | {% include "WallabagCoreBundle::_footer.html.twig" %} | 32 | </body> |
32 | </body> | ||
33 | </html> \ No newline at end of file | 33 | </html> \ No newline at end of file |