[UI] Add TODO annotation to login template, since it's possible to login using email, so the fonrm field names should be updated

This commit is contained in:
Hugo Sales 2021-07-28 21:26:25 +00:00
parent f904b76ce7
commit 1521d0d823
Signed by untrusted user: someonewithpc
GPG Key ID: 7D0C7EAFC9D835A0
3 changed files with 9 additions and 8 deletions

View File

0
templates/foo.html.twig Normal file
View File

View File

@ -11,10 +11,10 @@
<div class='content'> <div class='content'>
<form method="post"> <form method="post">
<fieldset> <fieldset>
<legend>Login</legend> <legend>{{ "Login" | trans }}</legend>
{% if error %} {% if error %}
<div class="alert alert-danger">{{ error.messageKey|trans(error.messageData, 'security') }}</div> <div class="alert alert-danger">{{ error.messageKey | trans(error.messageData, 'security') }}</div>
{% endif %} {% endif %}
<p> <p>
@ -23,19 +23,20 @@
You are logged in as {{ app.user.username }}. You are logged in as {{ app.user.username }}.
<br> <br>
<button class="btn btn-lg btn-primary"> <button class="btn btn-lg btn-primary">
<a href="{{ path('app_logout') }}">Logout</a> <a href="{{ path('app_logout') }}">{{ "Logout" | trans }}</a>
</button> </button>
</h1> </h1>
{% else %} {% else %}
<label for="inputNickname">Nickname</label> {# TODO: Login can be done with email, so the id's and stuff should reflect that, along with using the translation facilities #}
<label for="inputNickname">{{ "Nickname or Email" | trans }}</label>
<br> <br>
<input type="text" value="{{ last_username }}" name="nickname" id="inputNickname" <input type="text" value="{{ last_login_id }}" name="nickname" id="inputNickname"
class="form-control" required autofocus> class="form-control" required autofocus>
{% endif %} {% endif %}
</p> </p>
<p> <p>
<label for="inputPassword">Password</label> <label for="inputPassword">{{ "Password" | trans }}</label>
<br> <br>
<input type="password" name="password" id="inputPassword" class="form-control" required> <input type="password" name="password" id="inputPassword" class="form-control" required>
</p> </p>
@ -43,7 +44,7 @@
<input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}"> <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
<p class="checkbox mb-3"> <p class="checkbox mb-3">
<label>Remember me</label> <label>{{ "Remember me" | trans}}</label>
<input type="checkbox" name="_remember_me"> <input type="checkbox" name="_remember_me">
</p> </p>