upstream V3 development https://www.gnusocial.rocks/v3
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 
 

69 lines
2.8 KiB

  1. {% extends 'stdgrid.html.twig' %}
  2. {% block stylesheets %}
  3. {{ parent() }}
  4. <link rel='stylesheet' type='text/css' href="{{ asset('assets/css/security/security.css') }}">
  5. {% endblock %}
  6. {% block title %}{{ "Log in!" | trans }}{% endblock %}
  7. {% block body %}
  8. <section class="section-widget">
  9. <form class="section-form" method="post">
  10. <fieldset>
  11. <legend class="section-form-legend">{{ "Login" | trans }}</legend>
  12. {% if error %}
  13. <label class="alert alert-danger">
  14. {{ error.getMessage() }}
  15. </label>
  16. {#<ul>
  17. {% for flashError in app.flashes('verify_email_error') %}
  18. <li class="alert alert-danger">{{ error.messageKey | trans(error.messageData, 'security') }}</li>
  19. {% endfor %}
  20. </ul>#}
  21. {% endif %}
  22. {% if app.user %}
  23. <h1 class="mb-3">
  24. {{ "You are logged in as" | trans }} {{ app.user.username }}.
  25. <button class="btn btn-lg btn-primary">
  26. <a href="{{ path('app_logout') }}">{{ "Logout" | trans }}</a>
  27. </button>
  28. </h1>
  29. {% else %}
  30. {# TODO: Login can be done with email, so the element id's should reflect that #}
  31. <div class="form-group">
  32. <label class="section-form-label" for="inputNickname">{{ "Nickname or Email" | trans }}</label>
  33. <input type="text" value="{{ last_login_id }}" name="nickname_or_email" id="inputNickname" class="form-control" required autofocus>
  34. <p class="help-text">{{ "Your nickname or email address." | trans }}</p>
  35. </div>
  36. <div class="form-group">
  37. <label class="section-form-label" for="inputPassword">{{ "Password" | trans }}</label>
  38. <input type="password" name="password" id="inputPassword" class="form-control" required>
  39. <p class="help-text">{{ "Your account's password." | trans }}</p>
  40. </div>
  41. <span class="checkbox mb-3">
  42. <input type="checkbox" name="_remember_me">
  43. <label>{{ "Remember me" | trans }}</label>
  44. </span>
  45. <div>
  46. <button class="btn btn-lg btn-primary" type="submit">Sign in</button>
  47. </div>
  48. <input type="hidden" name="_csrf_token" value="{{ csrf_token('authenticate') }}">
  49. {% endif %}
  50. </fieldset>
  51. </form>
  52. </section>
  53. {% endblock body %}
  54. {% block javascripts %}{% endblock %}