signin.html 2.4 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. {% extends "cranefly/layout.html" %}
  2. {% load i18n %}
  3. {% load url from future %}
  4. {% import "_forms.html" as form_theme with context %}
  5. {% import "cranefly/macros.html" as macros with context %}
  6. {% block title %}{{ macros.page_title(title=_('Sign In')) }}{% endblock %}
  7. {% block content %}
  8. <div class="page-header">
  9. <h1>{% trans %}Sign In to Your Account{% endtrans %}</h1>
  10. </div>
  11. <div class="row">
  12. <div class="span6">
  13. <div class="well">
  14. {% if message %}<div class="alert alert-form alert-{{ message.type }}">
  15. {{ macros.draw_message_icon(message) }}
  16. <p><strong>{{ message.message }}</strong></p>{% if bad_password %}
  17. <p class="protip"><a href="{% url 'forgot_password' %}">{% trans %}Click here if you forgot your sign in credentials.{% endtrans %}</a></p>{% endif %}{% if not_active %}
  18. <p class="protip"><a href="{% url 'send_activation' %}">{% trans %}Click here if you didn't receive activation e-mail.{% endtrans %}</a></p>{% endif %}{% if banned_account.reason_user %}
  19. {{ banned_account.reason_user|markdown|safe }}{% endif %}{% if banned_account.expires %}
  20. <p class="protip">{% trans ban_expires=banned_account.expires|date %}Your ban will expire on {{ ban_expires }}{% endtrans %}</p>{% endif %}
  21. </div>{% endif %}
  22. <form class="form-horizontal" action="{% url 'sign_in' %}" method="post">
  23. <div class="form-container">
  24. {{ form_theme.form_widget(form, horizontal=true, width=6) }}
  25. </div>
  26. <div class="form-actions">
  27. <button type="submit" class="btn btn-primary">{% trans %}Sign In{% endtrans %}</button>
  28. </div>
  29. </form>
  30. </div>
  31. </div>
  32. <div class="span6">
  33. <h3>{% trans %}I don't remember my password{% endtrans %}</h3>
  34. <p><i class="icon-refresh"></i> <a href="{% url 'forgot_password' %}"><strong>{% trans %}I want to reset my account's password{% endtrans %}</strong></a></p>
  35. <h3>{% trans %}I haven't received activation e-mail{% endtrans %}</h3>
  36. <p><i class="icon-envelope"></i> <a href="{% url 'send_activation' %}"><strong>{% trans %}Resend me e-mail with activation link{% endtrans %}</strong></a></p>
  37. {% if settings.account_activation != 'block' %}
  38. <h3>{% trans %}I don't have account yet{% endtrans %}</h3>
  39. <p><i class="icon-edit"></i> <a href="{% url 'register' %}"><strong>{% trans %}I want to register new account{% endtrans %}</strong></a></p>{% endif %}
  40. </div>
  41. </div>
  42. {% endblock %}