|
11 | 11 |
|
12 | 12 | <h1>{% trans "Sign In" %}</h1>
|
13 | 13 |
|
14 |
| -<p><small>{% blocktrans trimmed %}If you have not created an account yet, then please |
15 |
| -<a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</small></p> |
16 |
| - |
17 |
| -<form class="login" method="POST" action="{% url "account_login" %}"> |
18 |
| - {% csrf_token %} |
19 |
| - {{ form.as_p }} |
20 |
| - {% if redirect_field_value %} |
21 |
| - <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /> |
| 14 | +{% if is_from_cas_login %} |
| 15 | +<p> |
| 16 | + {% blocktrans %} |
| 17 | + In order to view this documentation, you must log in first. |
| 18 | + {% endblocktrans %} |
| 19 | +</p> |
| 20 | +{% endif %} |
| 21 | + |
| 22 | +{% if allowed_providers %} |
| 23 | + {# If allowed providers is given, don't show the username/password form #} |
| 24 | + <div class="clearfix"> |
| 25 | + <ul class="socialaccount_providers"> |
| 26 | + {% include "socialaccount/snippets/provider_list.html" with process="login" next=request.GET.next verbiage="Sign in with" %} |
| 27 | + </ul> |
| 28 | + </div> |
| 29 | + |
| 30 | + {% if project_password_url %} |
| 31 | + <h3>{% trans 'Or' %}</h3> |
| 32 | + <p> |
| 33 | + {% blocktrans trimmed with project_password_url=project_password_url %} |
| 34 | + Do you have a password to access this documentation? |
| 35 | + <a href="{{ project_password_url }}">Access here</a>. |
| 36 | + {% endblocktrans %} |
| 37 | + </p> |
22 | 38 | {% endif %}
|
23 |
| - <button class="primaryAction" type="submit">{% trans "Sign In" %}</button> |
24 | 39 |
|
25 |
| - {% url 'account_reset_password' as password_reset_url %} |
| 40 | +{% else %} |
| 41 | + |
| 42 | + <p><small>{% blocktrans trimmed %}If you have not created an account yet, then please |
| 43 | + <a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</small></p> |
| 44 | + |
| 45 | + <form class="login" method="POST" action="{% url "account_login" %}"> |
| 46 | + {% csrf_token %} |
| 47 | + {{ form.as_p }} |
| 48 | + {% if redirect_field_value %} |
| 49 | + <input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /> |
| 50 | + {% endif %} |
| 51 | + <button class="primaryAction" type="submit">{% trans "Sign In" %}</button> |
| 52 | + |
| 53 | + {% url 'account_reset_password' as password_reset_url %} |
| 54 | + <p> |
| 55 | + <small>{% blocktrans trimmed %}If you forgot your password, <a href="{{ password_reset_url }}">reset it.</a>{% endblocktrans %}</small> |
| 56 | + </p> |
| 57 | + </form> |
| 58 | + |
| 59 | + {% if project_password_url %} |
| 60 | + <h3>{% trans 'Or' %}</h3> |
26 | 61 | <p>
|
27 |
| - <small>{% blocktrans trimmed %}If you forgot your password, <a href="{{ password_reset_url }}">reset it.</a>{% endblocktrans %}</small> |
| 62 | + {% blocktrans trimmed with project_password_url=project_password_url %} |
| 63 | + Do you have a password to access this documentation? |
| 64 | + <a href="{{ project_password_url }}">Access here</a>. |
| 65 | + {% endblocktrans %} |
28 | 66 | </p>
|
29 |
| -</form> |
| 67 | + {% endif %} |
30 | 68 |
|
31 |
| -<h3>{% trans 'Or' %}</h3> |
| 69 | + <h3>{% trans 'Or' %}</h3> |
32 | 70 |
|
33 |
| -<div class="clearfix"> |
34 |
| - <ul class="socialaccount_providers"> |
35 |
| - {% include "socialaccount/snippets/provider_list.html" with process="login" next=request.GET.next verbiage="Sign in with" %} |
36 |
| - </ul> |
37 |
| -</div> |
| 71 | + <div class="clearfix"> |
| 72 | + <ul class="socialaccount_providers"> |
| 73 | + {% include "socialaccount/snippets/provider_list.html" with process="login" next=request.GET.next verbiage="Sign in with" %} |
| 74 | + </ul> |
| 75 | + </div> |
| 76 | +{% endif %} |
38 | 77 |
|
39 | 78 | {% endblock content %}
|
0 commit comments