-
-
Notifications
You must be signed in to change notification settings - Fork 156
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Override allauth /signup page (#281)
- Loading branch information
1 parent
7e7d368
commit 1e4619f
Showing
3 changed files
with
99 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,83 @@ | ||
{% extends "base.html" %} | ||
|
||
{% load i18n %} | ||
{% load account socialaccount %} | ||
|
||
{% block style %} | ||
.inner-addon { | ||
position: relative; | ||
} | ||
.inner-addon .glyphicon { | ||
position: absolute; | ||
padding: 10px; | ||
pointer-events: none; | ||
} | ||
.left-addon .glyphicon { left: 0px;} | ||
.right-addon .glyphicon { right: 0px;} | ||
.left-addon input { padding-left: 30px; } | ||
.right-addon input { padding-right: 30px; } | ||
{% endblock %} | ||
|
||
{% block content %} | ||
{% get_providers as socialaccount_providers %} | ||
|
||
<h3 class="text-center">Login</h3> | ||
{% if socialaccount_providers %} | ||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4"> | ||
<div class="socialaccount_ballot text-center"> | ||
<ul class="socialaccount_providers list-unstyled list-inline"> | ||
{% for provider in socialaccount_providers %} | ||
{% if provider.id == "openid" %} | ||
{% for brand in provider.get_brands %} | ||
<li> | ||
<a title="{{brand.name}}" | ||
class="socialaccount_provider {{provider.id}} {{brand.id}} btn btn-default" | ||
href="{% provider_login_url provider.id openid=brand.openid_url process=process %}" | ||
>{{brand.name}}</a> | ||
</li> | ||
{% endfor %} | ||
{% endif %} | ||
<li> | ||
<a title="{{provider.name}}" class="socialaccount_provider {{provider.id}} btn btn-default" | ||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}">{{provider.name}}</a> | ||
</li> | ||
{% endfor %} | ||
</ul> | ||
</div> | ||
</div> | ||
</div> | ||
{% include "socialaccount/snippets/login_extra.html" %} | ||
{% endif %} | ||
|
||
<div class="row"> | ||
<div class="col-md-4 col-md-offset-4 col-lg-4 col-lg-offset-4"> | ||
<form class="login" method="POST" action="{% url 'account_login' %}"> | ||
{% csrf_token %} | ||
{% if redirect_field_value %} | ||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" /> | ||
{% endif %} | ||
<div class="form-group inner-addon left-addon {% if form.login.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-user"></i> | ||
<input class="form-control" type="text" id="id_login" name="login" placeholder="Username"> | ||
<span class="help-block">{{ form.login.errors }}</span> | ||
</div> | ||
<div class="form-group inner-addon left-addon {% if form.password1.errors %}has-error{% endif %}"> | ||
<i class="glyphicon glyphicon-lock"></i> | ||
<input class="form-control login-field" type="password" id="id_password" name="password" placeholder="Password"> | ||
<span class="help-block">{{ form.password.errors }}</span> | ||
</div> | ||
<div class="checkbox"> | ||
<label> | ||
<input type="checkbox" id="id_remember" name="remember"> Remember Me | ||
</label> | ||
</div> | ||
<div class="form-actions"> | ||
<button class="btn btn-primary pull-right" type="submit">{% trans "Sign In" %}</button> | ||
<a class="btn" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a> | ||
</div> | ||
</form> | ||
<span class="text-center">Not yet a member? <a href="{% url 'account_signup' %}">Join</a></span> | ||
</div> | ||
</div> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{% extends "account/base.html" %} | ||
|
||
{% load i18n %} | ||
|
||
{% block content %} | ||
<h1>{% trans "Sign Out" %}</h1> | ||
<p>{% trans 'Are you sure?' %}</p> | ||
<form method="post" action="{% url 'account_logout' %}"> | ||
{% csrf_token %} | ||
{% if redirect_field_value %} | ||
<input type="hidden" name="{{redirect_field_name}}" value="{{redirect_field_value}}"/> | ||
{% endif %} | ||
<button class="btn btn-primary" type="submit">{% trans 'Yes' %}</button> | ||
<a href="/accounts/profile/" class="btn btn-default">{% trans 'Cancel' %}</a> | ||
</form> | ||
{% endblock %} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters