mirror of
https://github.com/moparisthebest/wallabag
synced 2025-01-08 04:08:10 -05:00
[change] login form
This commit is contained in:
parent
76298ffbf8
commit
c4794be936
8
app/views/_login.twig
Normal file
8
app/views/_login.twig
Normal file
@ -0,0 +1,8 @@
|
||||
{% if error %}
|
||||
<div class="alert alert-error" >{{ error }}</div>
|
||||
{% endif %}
|
||||
<form action="{{ path('login') }}" method="post">
|
||||
<p><label for="username">{{ 'username'|trans }}: </label><input id="username" type="text" name="_username" value="poche"></p>
|
||||
<p><label for="password">{{ 'password'|trans }}: </label><input id="password" type="password" name="_password" value="password"></p>
|
||||
<p><input type="submit" value="{{ 'login'|trans }}"></p>
|
||||
</form>
|
@ -9,6 +9,7 @@
|
||||
<li {% if app.request.requesturi == '/bookmarks' %}class="active"{% endif %}><a href="/bookmarks">{{ 'bookmarks'|trans }}</a></li>
|
||||
<li {% if app.request.requesturi == '/archive' %}class="active"{% endif %}><a href="/archive">{{ 'archive'|trans }}</a></li>
|
||||
<li {% if app.request.requesturi == '/add' %}class="active"{% endif %}><a href="{{ path('add') }}">{{ 'entry.add'|trans }}</a></li>
|
||||
<li><a href="{{ path('logout') }}">{{ 'logout'|trans }}</a></li>
|
||||
</ul>
|
||||
</nav>
|
||||
</header>
|
||||
|
@ -22,14 +22,23 @@
|
||||
</head>
|
||||
<body>
|
||||
<div id="main" class="page">
|
||||
{% include '_top.twig' %}
|
||||
<main role="main">
|
||||
<div id="content">
|
||||
{% include '_alerts.twig' %}
|
||||
{% block content %}{% endblock %}
|
||||
</div>
|
||||
</main>
|
||||
{% include '_footer.twig' %}
|
||||
<main role="main">
|
||||
<div id="content">
|
||||
{% if is_granted('ROLE_USER') %}
|
||||
|
||||
{% include '_top.twig' %}
|
||||
{% include '_alerts.twig' %}
|
||||
{% block content %}{% endblock %}
|
||||
|
||||
{% else %}
|
||||
{% include '_login.twig' %}
|
||||
|
||||
{% endif %}
|
||||
|
||||
</div>
|
||||
</main>
|
||||
|
||||
{% include '_footer.twig' %}
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
Loading…
Reference in New Issue
Block a user