Skip to content

Commit

Permalink
Merge pull request #8062 from readthedocs/humitos/signup-providers
Browse files Browse the repository at this point in the history
  • Loading branch information
humitos authored Jun 14, 2021
2 parents 0e89c2e + 1ad5220 commit 500a93a
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 25 additions & 1 deletion readthedocs/templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,30 @@ <h1>{% trans "Sign Up" %}</h1>
<small>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</small>
</p>

{% if allowed_providers %}
<p>
{% if organization %}
{% blocktrans trimmed with organization.name as organization_name %}
You have been invited to join
the organization "{{ organization_name }}"
at Read the Docs.
{% endblocktrans %}
{% else %}
{% blocktrans trimmed %}
You have been invited to join
an organization
at Read the Docs.
{% endblocktrans %}
{% endif %}
</p>
<p>
{% blocktrans trimmed %}
Sign up using the following provider.
If you don't have an account with this provider,
please contant your organization owner and ask about this.
{% endblocktrans %}
</p>
{% else %}
<form class="signup" id="signup_form" method="post" action="{% url 'account_signup' %}">
{% csrf_token %}
{{ form.as_p }}
Expand All @@ -26,11 +50,11 @@ <h1>{% trans "Sign Up" %}</h1>
</form>

<h3>{% trans 'Or' %}</h3>
{% endif %}

<div class="clearfix">
<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" next="" verbiage="Sign up with" %}
</ul>
</div>

{% endblock %}
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@
{% endfor %}
{% endif %}
{% if provider.id != 'bitbucket' %}
{% if allowed_providers and provider.id in allowed_providers or not allowed_providers %}
<li>
<a title="{{ provider.name }}"
class="socialaccount-provider {{ provider.id }} button"
Expand All @@ -30,4 +31,5 @@
</a>
</li>
{% endif %}
{% endif %}
{% endfor %}

0 comments on commit 500a93a

Please sign in to comment.