add templates for allauth
This commit is contained in:
parent
7d6e0386d8
commit
92b6e8a8cb
44 changed files with 476 additions and 0 deletions
|
@ -0,0 +1,9 @@
|
|||
{% extends "socialaccount/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% trans "Social Network Login Failure" %}{% endblock title %}
|
||||
{% block page_title %}{% trans "Social Network Login Failure" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<p>{% trans "An error occurred while attempting to login via your social network account." %}</p>
|
||||
{% endblock %}
|
1
gnuviechadmin/templates/socialaccount/base.html
Normal file
1
gnuviechadmin/templates/socialaccount/base.html
Normal file
|
@ -0,0 +1 @@
|
|||
{% extends "account/base.html" %}
|
50
gnuviechadmin/templates/socialaccount/connections.html
Normal file
50
gnuviechadmin/templates/socialaccount/connections.html
Normal file
|
@ -0,0 +1,50 @@
|
|||
{% extends "socialaccount/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% trans "Account Connections" %}{% endblock title %}
|
||||
{% block page_title %}{% trans "Account Connections" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
{% if form.accounts %}
|
||||
<p>{% blocktrans %}You can sign in to your account using any of the following third party accounts:{% endblocktrans %}</p>
|
||||
|
||||
<form method="post" action="{% url 'socialaccount_connections' %}">
|
||||
{% csrf_token %}
|
||||
{% if form.non_field_errors %}<div class="text-error">{{form.non_field_errors}}</div>{% endif %}
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th><span class="sr-only">{% trans "Select" %}</span></th>
|
||||
<th>{% trans "Provider" %}</th>
|
||||
<th>{% trans "Account name" %}</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for base_account in form.accounts %}
|
||||
{% with account=base_account.get_provider_account provider=base_account.provider %}
|
||||
<tr>
|
||||
<td><input id="id_account_{{base_account.id}}" type="radio" name="account" value="{{base_account.id}}"/></td>
|
||||
<td><label for="id_account_{{base_account.id}}"><i
|
||||
class="fa fa-{% if provider == 'twitter' %}twitter{% elif provider == 'google' %}google{% elif provider == 'xing' %}xing{% elif provider == 'linkedin_oauth2' %}linkedin{% endif %}"></i> <span class="socialaccount_provider {{provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span></label></td>
|
||||
<td>{{ account }}</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
<button class="btn btn-warning" type="submit">{% trans 'Remove' %}</button>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>{% trans 'You currently have no social network accounts connected to this account.' %}</p>
|
||||
{% endif %}
|
||||
|
||||
<h2>{% trans 'Add a 3rd Party Account' %}</h2>
|
||||
<ul class="list-inline">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
|
||||
</ul>
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_js %}
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
{% endblock extra_js %}
|
10
gnuviechadmin/templates/socialaccount/login_cancelled.html
Normal file
10
gnuviechadmin/templates/socialaccount/login_cancelled.html
Normal file
|
@ -0,0 +1,10 @@
|
|||
{% extends "socialaccount/base.html" %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% trans "Login Cancelled" %}{% endblock title %}
|
||||
{% block page_title %}{% trans "Login Cancelled" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
{% url 'account_login' as login_url %}
|
||||
<p>{% blocktrans %}You decided to cancel logging in to our site using one of your existing accounts. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
|
@ -0,0 +1,2 @@
|
|||
{% load i18n %}
|
||||
{% blocktrans %}The social account has been connected.{% endblocktrans %}
|
|
@ -0,0 +1,2 @@
|
|||
{% load i18n %}
|
||||
{% blocktrans %}The social account is already connected to a different account.{% endblocktrans %}
|
|
@ -0,0 +1,2 @@
|
|||
{% load i18n %}
|
||||
{% blocktrans %}The social account has been disconnected.{% endblocktrans %}
|
17
gnuviechadmin/templates/socialaccount/signup.html
Normal file
17
gnuviechadmin/templates/socialaccount/signup.html
Normal file
|
@ -0,0 +1,17 @@
|
|||
{% extends "socialaccount/base.html" %}
|
||||
{% load i18n crispy_forms_tags %}
|
||||
|
||||
{% block title %}{{ block.super }} - {% trans "Signup" %}{% endblock title %}
|
||||
{% block page_title %}{% trans "Sign Up" %}{% endblock page_title %}
|
||||
|
||||
{% block content %}
|
||||
<p>{% blocktrans with provider_name=account.get_provider.name site_name=site.name %}You are about to use your {{provider_name}} account to login to
|
||||
{{site_name}}. As a final step, please complete the following form:{% endblocktrans %}</p>
|
||||
|
||||
<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
|
||||
{% csrf_token %}
|
||||
{{ form | crispy }}
|
||||
{% if redirect_field_value %}<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />{% endif %}
|
||||
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %} »</button>
|
||||
</form>
|
||||
{% endblock %}
|
|
@ -0,0 +1,4 @@
|
|||
{% load socialaccount %}
|
||||
<!-- start provider js -->
|
||||
{% providers_media_js %}
|
||||
<!-- end provider js -->
|
|
@ -0,0 +1,21 @@
|
|||
{% load socialaccount %}
|
||||
|
||||
{% 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}}"
|
||||
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}}"
|
||||
href="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}"><i
|
||||
class="fa fa-{% if provider.id == 'twitter' %}twitter{% elif provider.id == 'google' %}google{% elif provider.id == 'xing' %}xing{% elif provider.id == 'linkedin_oauth2' %}linkedin{% endif %}"></i> {{provider.name}}</a>
|
||||
</li>
|
||||
{% endfor %}
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue