Skip to content

Commit

Permalink
Make social login buttons fully clickable
Browse files Browse the repository at this point in the history
  • Loading branch information
WojTecH94 authored May 31, 2024
1 parent 6a1173b commit 45e4c90
Showing 1 changed file with 8 additions and 24 deletions.
32 changes: 8 additions & 24 deletions dojo/templates/dojo/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -47,65 +47,49 @@ <h3>{% trans "Login" %}</h3>
<div class="form-group">
{% if GOOGLE_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'google-oauth2' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{% trans "Login with Google" %}</a>
</button>
<a href="{% url 'social:begin' 'google-oauth2' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{% trans "Login with Google" %}</a>
</div>
{% endif %}

{% if OKTA_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'okta-oauth2' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{% trans "Login with OKTA" %}</a>
</button>
<a href="{% url 'social:begin' 'okta-oauth2' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{% trans "Login with OKTA" %}</a>
</div>
{% endif %}

{% if AZUREAD_TENANT_OAUTH2_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'azuread-tenant-oauth2' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{% trans "Login with Azure AD" %}</a>
</button>
<a href="{% url 'social:begin' 'azuread-tenant-oauth2' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{% trans "Login with Azure AD" %}</a>
</div>
{% endif %}

{% if GITLAB_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'gitlab' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{% trans "Login with Gitlab" %}</a>
</button>
<a href="{% url 'social:begin' 'gitlab' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{% trans "Login with Gitlab" %}</a>
</div>
{% endif %}

{% if AUTH0_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'auth0' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{% trans "Login with Auth0" %}</a>
</button>
<a href="{% url 'social:begin' 'auth0' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{% trans "Login with Auth0" %}</a>
</div>
{% endif %}

{% if KEYCLOAK_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'keycloak' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{{ SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT }}</a>
</button>
<a href="{% url 'social:begin' 'keycloak' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{{ SOCIAL_AUTH_KEYCLOAK_LOGIN_BUTTON_TEXT }}</a>
</div>
{% endif %}

{% if GITHUB_ENTERPRISE_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a href="{% url 'social:begin' 'github-enterprise' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)">{% trans "Login with Github Enterprise" %}</a>
</button>
<a href="{% url 'social:begin' 'github-enterprise' %}?next={{ request.GET.next }}" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{% trans "Login with Github Enterprise" %}</a>
</div>
{% endif %}

{% if SAML2_ENABLED is True %}
<div class="col-sm-offset-1 col-sm-2">
<button class="btn btn-success" type="button">
<a id="oauth-login-saml" rel="nofollow" data-method="post" href="/saml2/login" style="color: rgb(255,255,255)">{{ SAML2_LOGIN_BUTTON_TEXT }}</a>
</button>
<a id="oauth-login-saml" rel="nofollow" data-method="post" href="/saml2/login" style="color: rgb(255,255,255)" class="btn btn-success" type="button">{{ SAML2_LOGIN_BUTTON_TEXT }}</a>
</div>
{% endif %}
</div>
Expand Down

0 comments on commit 45e4c90

Please sign in to comment.