Commit dd40bcfa authored by Floréal Cabanettes's avatar Floréal Cabanettes

Add login to sidebar

parent ef1b8414
......@@ -7,8 +7,8 @@ msgid ""
msgstr ""
"Project-Id-Version: \n"
"Report-Msgid-Bugs-To: \n"
"POT-Creation-Date: 2017-10-22 20:55+0200\n"
"PO-Revision-Date: 2017-10-22 20:57+0200\n"
"POT-Creation-Date: 2017-10-22 21:58+0200\n"
"PO-Revision-Date: 2017-10-22 21:59+0200\n"
"Last-Translator: \n"
"Language-Team: \n"
"Language: fr\n"
......@@ -36,7 +36,7 @@ msgstr "Erreur inattendue :"
#. Translators: recipe is the parent tag of a recipe
#: api/views/RecipeById.py:48 api/views/RecipeList.py:39
#: templates/website/index.html:18 website/urls.py:23
#: templates/website/index.html:18 website/urls.py:22
msgid "recipe"
msgstr "recette"
......@@ -415,6 +415,7 @@ msgid "Cook:"
msgstr "Cuisson :"
#: templates/website/login.html:7 templates/website/login.html:19
#: templates/website/login.html:49 templates/website/sidebar.html:16
msgid "Login"
msgstr "Connexion"
......@@ -426,11 +427,11 @@ msgstr "Votre nom d'utilisateur ou votre mot de passe est incorrect."
msgid "Please try again."
msgstr "Veuillez réessayer."
#: templates/website/login.html:39
#: templates/website/login.html:39 templates/website/sidebar.html:20
msgid "Username:"
msgstr "Nom d'utilisateur :"
#: templates/website/login.html:43
#: templates/website/login.html:43 templates/website/sidebar.html:24
msgid "Password:"
msgstr "Mot de passe :"
......@@ -483,12 +484,16 @@ msgid "header-categories.png"
msgstr "header-categories-fr.png"
#. Translators: category url
#: templates/website/sidebar.html:11 website/urls.py:16 website/urls.py:17
#: templates/website/sidebar.html:11 website/urls.py:15 website/urls.py:16
#: website/views/RecipeView.py:84
msgctxt "category url"
msgid "category"
msgstr "categorie"
#: templates/website/sidebar.html:30
msgid "Login me"
msgstr "Se connecter"
#: website/forms/CommentForm.py:16
msgid "Name"
msgstr "Pseudo"
......@@ -505,11 +510,11 @@ msgstr "Site web"
msgid "Comment"
msgstr "Commentaire"
#: website/urls.py:15 website/urls.py:17 website/urls.py:20
#: website/urls.py:14 website/urls.py:16 website/urls.py:19
msgid "page"
msgstr "page"
#: website/urls.py:19 website/urls.py:20
#: website/urls.py:18 website/urls.py:19
msgctxt "author url"
msgid "author"
msgstr "auteur"
......
......@@ -12,4 +12,25 @@
{% endfor %}
<img src="{{ base_url }}/images/footer-categories.png" alt="---" />
</nav>
{% if not view.data.user.is_authenticated %}
<div class="login">
<h4>{% trans "Login" %}</h4>
<form action="/login/" method="post" id="login-form">
<div class="form-row">
{% csrf_token %}
<label class="required" for="id_username">{% trans "Username:" %}</label><br/>
<input type="text" name="username" required id="id_username" maxlength="254" class="login-input"/>
</div>
<div class="form-row">
<label class="required" for="id_password">{% trans "Password:" %}</label><br/>
<input type="password" name="password" required id="id_password" class="login-input"/>
<input type="hidden" name="next" value="{{ next }}"/>
</div>
<div class="submit-row">
<input type="submit" value="{% trans 'Login me' %}"/>
</div>
</form>
</div>
{% endif %}
</div>
\ No newline at end of file
......@@ -298,4 +298,12 @@ div.pagination {
.coupDeCoeurLoop img {
border-bottom: 0px none;
}
#login-form input {
margin-bottom: 5px;
}
#login-form .login-input {
width: 100%;
}
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment