Skip to content

Commit 500a93a

Browse files
authored
Merge pull request #8062 from readthedocs/humitos/signup-providers
2 parents 0e89c2e + 1ad5220 commit 500a93a

File tree

2 files changed

+27
-1
lines changed

2 files changed

+27
-1
lines changed

readthedocs/templates/account/signup.html

+25-1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,30 @@ <h1>{% trans "Sign Up" %}</h1>
1313
<small>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</small>
1414
</p>
1515

16+
{% if allowed_providers %}
17+
<p>
18+
{% if organization %}
19+
{% blocktrans trimmed with organization.name as organization_name %}
20+
You have been invited to join
21+
the organization "{{ organization_name }}"
22+
at Read the Docs.
23+
{% endblocktrans %}
24+
{% else %}
25+
{% blocktrans trimmed %}
26+
You have been invited to join
27+
an organization
28+
at Read the Docs.
29+
{% endblocktrans %}
30+
{% endif %}
31+
</p>
32+
<p>
33+
{% blocktrans trimmed %}
34+
Sign up using the following provider.
35+
If you don't have an account with this provider,
36+
please contant your organization owner and ask about this.
37+
{% endblocktrans %}
38+
</p>
39+
{% else %}
1640
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
1741
{% csrf_token %}
1842
{{ form.as_p }}
@@ -26,11 +50,11 @@ <h1>{% trans "Sign Up" %}</h1>
2650
</form>
2751

2852
<h3>{% trans 'Or' %}</h3>
53+
{% endif %}
2954

3055
<div class="clearfix">
3156
<ul class="socialaccount_providers">
3257
{% include "socialaccount/snippets/provider_list.html" with process="login" next="" verbiage="Sign up with" %}
3358
</ul>
3459
</div>
35-
3660
{% endblock %}

readthedocs/templates/socialaccount/snippets/provider_list.html

+2
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@
1919
{% endfor %}
2020
{% endif %}
2121
{% if provider.id != 'bitbucket' %}
22+
{% if allowed_providers and provider.id in allowed_providers or not allowed_providers %}
2223
<li>
2324
<a title="{{ provider.name }}"
2425
class="socialaccount-provider {{ provider.id }} button"
@@ -30,4 +31,5 @@
3031
</a>
3132
</li>
3233
{% endif %}
34+
{% endif %}
3335
{% endfor %}

0 commit comments

Comments
 (0)