Initial commit of DEMOS2 with the upgraded 'Create Event' UI. However, there is no input validation currently
This commit is contained in:
commit
7084bd1b16
155 changed files with 8102 additions and 0 deletions
3
allauthdemo/templates/allauth/README.txt
Executable file
3
allauthdemo/templates/allauth/README.txt
Executable file
|
@ -0,0 +1,3 @@
|
|||
This are the files from the django-allauth example
|
||||
pretty much as-is, except for some visual tweaks
|
||||
and use of a different bootstrap form renderer.
|
45
allauthdemo/templates/allauth/account/base.html
Executable file
45
allauthdemo/templates/allauth/account/base.html
Executable file
|
@ -0,0 +1,45 @@
|
|||
{% extends "bases/bootstrap-member.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class=container>
|
||||
{% bootstrap_messages %}
|
||||
|
||||
<h1>{% trans 'My Account' %}</h1>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="{% block account_nav_events %}{% endblock %}">
|
||||
<a href="{% url 'account_events' %}">{% trans 'My Events' %}</a>
|
||||
</li>
|
||||
<li class="{% block account_nav_email %}{% endblock %}">
|
||||
<a href="{% url 'account_email' %}">{% trans 'E-mail Addresses' %}</a>
|
||||
</li>
|
||||
<li class="{% block account_nav_change_password %}{% endblock %}">
|
||||
<a href="{% url 'account_change_password' %}">{% trans 'Change Password' %}</a>
|
||||
</li>
|
||||
{% url 'socialaccount_connections' as connections_url %}
|
||||
{% if connections_url %}
|
||||
<li class="{% block account_nav_socialaccount_connections %}{% endblock %}">
|
||||
<a href="{{ connections_url}}">{% trans 'Connected Accounts' %}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>No connections url</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% block account_content %}
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{#
|
||||
{% block appjs %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
||||
{% block appjs_jquery %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
#}
|
38
allauthdemo/templates/allauth/account/base2.html
Executable file
38
allauthdemo/templates/allauth/account/base2.html
Executable file
|
@ -0,0 +1,38 @@
|
|||
{% extends "bases/bootstrap-member.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<div class=container>
|
||||
<h1>{% trans 'My Account' %}</h1>
|
||||
|
||||
<ul class="nav nav-tabs">
|
||||
<li class="{% block account_tab_events %}{% endblock %}">
|
||||
<a href="#">{% trans 'My Events' %}</a>
|
||||
</li>
|
||||
<li class="{% block account_nav_change_password %}{% endblock %}">
|
||||
<a href="{% url 'account_change_password' %}">{% trans 'Change Password' %}</a>
|
||||
</li>
|
||||
{% url 'socialaccount_connections' as connections_url %}
|
||||
{% if connections_url %}
|
||||
<li class="{% block account_nav_socialaccount_connections %}{% endblock %}">
|
||||
<a href="{{ connections_url}}">{% trans 'Connected Accounts' %}</a>
|
||||
</li>
|
||||
{% else %}
|
||||
<li>No connections url</li>
|
||||
{% endif %}
|
||||
</ul>
|
||||
{% block account_content %}
|
||||
{% endblock %}
|
||||
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
{#
|
||||
{% block appjs %}
|
||||
<script src="//ajax.googleapis.com/ajax/libs/jquery/1.11.0/jquery.min.js"></script>
|
||||
{% block appjs_jquery %}
|
||||
{% endblock %}
|
||||
{% endblock %}
|
||||
#}
|
90
allauthdemo/templates/allauth/account/email.html
Executable file
90
allauthdemo/templates/allauth/account/email.html
Executable file
|
@ -0,0 +1,90 @@
|
|||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block head_title %}{% trans "Account" %}{% endblock %}
|
||||
|
||||
{% block account_nav_email %}active{% endblock %}
|
||||
|
||||
{% block account_content %}
|
||||
|
||||
{% if user.emailaddress_set.all %}
|
||||
<p>{% trans 'The following e-mail addresses are associated to your account:' %}</p>
|
||||
|
||||
<form action="{% url 'account_email' %}" class="email_list uniForm" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{% trans 'E-mail' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Status' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for emailaddress in user.emailaddress_set.all %}
|
||||
<tr>
|
||||
<td>
|
||||
<label class="radio" for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
|
||||
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
|
||||
{{ emailaddress.email }}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{% if emailaddress.verified %}
|
||||
<span class="label label-info">{% trans "Verified" %}</span>
|
||||
{% else %}
|
||||
<span class="label label-warning">{% trans "Unverified" %}</span>
|
||||
{% endif %}
|
||||
{% if emailaddress.primary %}<span class="label label-success">{% trans "Primary" %}</span>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-success" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
|
||||
<button class="btn" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
|
||||
<button class="btn btn-danger" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h2>{% trans "Add E-mail Address" %}</h2>
|
||||
|
||||
<form method="post" action="">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form add_email_form %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" name="action_add" type="submit">{% trans "Add E-mail" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block appjs_jquery %}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("button[name='action_remove']").click(function(){
|
||||
if (confirm("{% trans 'Do you really want to remove the selected e-mail address?' %}")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
31
allauthdemo/templates/allauth/account/email_confirm.html
Executable file
31
allauthdemo/templates/allauth/account/email_confirm.html
Executable file
|
@ -0,0 +1,31 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% block head_title %}{% trans "Confirm E-mail Address" %}{% endblock %}
|
||||
|
||||
|
||||
{% block inner-content %}
|
||||
<h1>{% trans "Confirm E-mail Address" %}</h1>
|
||||
|
||||
{% if confirmation %}
|
||||
|
||||
{% user_display confirmation.email_address.user as user_display %}
|
||||
|
||||
<p>{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{email}}">{{ email }}</a> is an e-mail address for user {{ user_display }}.{% endblocktrans %}</p>
|
||||
|
||||
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-primary" type="submit">{% trans 'Confirm' %}</button>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% url 'account_email' as email_url %}
|
||||
|
||||
<p>{% blocktrans %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url}}">issue a new e-mail confirmation request</a>.{% endblocktrans %}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
41
allauthdemo/templates/allauth/account/login.html
Executable file
41
allauthdemo/templates/allauth/account/login.html
Executable file
|
@ -0,0 +1,41 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% block head_title %}{% trans "Sign In" %}{% endblock %}
|
||||
|
||||
|
||||
{% block inner-content %}
|
||||
{% get_providers as socialaccount_providers %}
|
||||
|
||||
<h1 class="text-center">Log In</h1>
|
||||
<hr>
|
||||
|
||||
<div class="row">
|
||||
|
||||
{% if socialaccount_providers %}
|
||||
<div class="col-md-5 col-lg-5">
|
||||
{% include "allauth/account/provider_panel.html" with process="login" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="{% if socialaccount_providers %}col-md-7 col-lg-7 {% else %} col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 {% endif %}">
|
||||
<form class="login" method="POST" action="{% url 'account_login' %}">
|
||||
<span class="pull-right">Not yet a member? <a href="{% url 'account_signup' %}">Join</a></span>
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<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>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{% endblock %}
|
||||
|
21
allauthdemo/templates/allauth/account/logout.html
Executable file
21
allauthdemo/templates/allauth/account/logout.html
Executable file
|
@ -0,0 +1,21 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Sign Out" %}{% endblock %}
|
||||
|
||||
{% block inner-content %}
|
||||
<h1>{% trans "Sign Out" %}</h1>
|
||||
|
||||
<p>{% trans 'Are you sure you want to sign out?' %}</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 'Sign Out' %}</button>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
90
allauthdemo/templates/allauth/account/my_events_tab.html
Executable file
90
allauthdemo/templates/allauth/account/my_events_tab.html
Executable file
|
@ -0,0 +1,90 @@
|
|||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block head_title %}{% trans "Account" %}{% endblock %}
|
||||
|
||||
{% block account_tab_events %}active{% endblock %}
|
||||
|
||||
{% block account_content %}
|
||||
|
||||
{% if user.emailaddress_set.all %}
|
||||
<p>{% trans 'The following e-mail addresses are associated to your account:' %}</p>
|
||||
|
||||
<form action="{% url 'account_email' %}" class="email_list uniForm" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{% trans 'E-mail' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Status' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for emailaddress in user.emailaddress_set.all %}
|
||||
<tr>
|
||||
<td>
|
||||
<label class="radio" for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
|
||||
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
|
||||
{{ emailaddress.email }}
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{% if emailaddress.verified %}
|
||||
<span class="label label-info">{% trans "Verified" %}</span>
|
||||
{% else %}
|
||||
<span class="label label-warning">{% trans "Unverified" %}</span>
|
||||
{% endif %}
|
||||
{% if emailaddress.primary %}<span class="label label-success">{% trans "Primary" %}</span>{% endif %}
|
||||
</td>
|
||||
</tr>
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-success" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
|
||||
<button class="btn" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
|
||||
<button class="btn btn-danger" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<p><strong>{% trans 'Warning:'%}</strong> {% trans "You currently do not have any e-mail address set up. You should really add an e-mail address so you can receive notifications, reset your password, etc." %}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h2>{% trans "Add E-mail Address" %}</h2>
|
||||
|
||||
<form method="post" action="">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form add_email_form %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" name="action_add" type="submit">{% trans "Add E-mail" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
||||
{% block appjs_jquery %}
|
||||
<script type="text/javascript">
|
||||
$(function(){
|
||||
$("button[name='action_remove']").click(function(){
|
||||
if (confirm("{% trans 'Do you really want to remove the selected e-mail address?' %}")) {
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
});
|
||||
});
|
||||
</script>
|
||||
{% endblock %}
|
17
allauthdemo/templates/allauth/account/password_change.html
Executable file
17
allauthdemo/templates/allauth/account/password_change.html
Executable file
|
@ -0,0 +1,17 @@
|
|||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
{% block account_nav_change_password %}active{% endblock %}
|
||||
|
||||
{% block account_content %}
|
||||
<form method="POST" action="" class="password_change">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form password_change_form %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit" name="action">{% trans "Change Password" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
33
allauthdemo/templates/allauth/account/password_reset.html
Executable file
33
allauthdemo/templates/allauth/account/password_reset.html
Executable file
|
@ -0,0 +1,33 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
|
||||
|
||||
{% block inner-content %}
|
||||
|
||||
<h1>{% trans "Password Reset" %}</h1>
|
||||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% endif %}
|
||||
|
||||
<p>{% trans "Forgotten your password? Enter your e-mail address below, and we'll send you an e-mail allowing you to reset it." %}</p>
|
||||
|
||||
<form method="POST" action="" >
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form password_reset_form %}
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="submit" value="{% trans "Reset My Password" %}" />
|
||||
</div>
|
||||
</form>
|
||||
|
||||
<p>{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
|
||||
{% block appjs_jquery %}
|
||||
<script>
|
||||
$("#id_email").focus();
|
||||
</script>
|
||||
{% endblock %}
|
29
allauthdemo/templates/allauth/account/password_reset_from_key.html
Executable file
29
allauthdemo/templates/allauth/account/password_reset_from_key.html
Executable file
|
@ -0,0 +1,29 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block inner-content %}
|
||||
<h1>{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}</h1>
|
||||
|
||||
{% if token_fail %}
|
||||
{% url 'account_reset_password' as passwd_reset_url %}
|
||||
<p>{% blocktrans %}The password reset link was invalid, possibly because it has already been used. Please request a <a href="{{ passwd_reset_url }}">new password reset</a>.{% endblocktrans %}</p>
|
||||
|
||||
{% else %}
|
||||
{% if form %}
|
||||
<form method="POST" action="" class="uniForm">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit">{% trans "Change Password" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>{% trans 'Your password is now changed.' %}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
17
allauthdemo/templates/allauth/account/password_set.html
Executable file
17
allauthdemo/templates/allauth/account/password_set.html
Executable file
|
@ -0,0 +1,17 @@
|
|||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block head_title %}{% trans "Set Password" %}{% endblock %}
|
||||
{% block account_nav_change_password %}active{% endblock %}
|
||||
|
||||
{% block account_content %}
|
||||
<form method="POST" action="" class="password_set">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form password_set_form %}
|
||||
<div class="form-actions">
|
||||
<input class="btn btn-primary" type="submit" name="action" value="{% trans "Set Password" %}"/>
|
||||
</div>
|
||||
</form>
|
||||
{% endblock %}
|
22
allauthdemo/templates/allauth/account/provider_panel.html
Executable file
22
allauthdemo/templates/allauth/account/provider_panel.html
Executable file
|
@ -0,0 +1,22 @@
|
|||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% get_providers as socialaccount_providers %}
|
||||
{% if socialaccount_providers %}
|
||||
<!--
|
||||
This is the raw "real" HTML that facebook recommends.
|
||||
Leaving here for reference.
|
||||
|
||||
<div class="fb-login-button" data-max-rows="1" data-size="large" data-show-faces="false" data-auto-logout-link="false"></div>
|
||||
-->
|
||||
|
||||
<div class="socialaccount_ballot">
|
||||
<ul class="socialaccount_providers list-unstyled">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
|
||||
</ul>
|
||||
|
||||
</div>
|
||||
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
{% endif %}
|
38
allauthdemo/templates/allauth/account/signup.html
Executable file
38
allauthdemo/templates/allauth/account/signup.html
Executable file
|
@ -0,0 +1,38 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% block head_title %}{% trans "Signup" %}BS{% endblock %}
|
||||
|
||||
{% block inner-content %}
|
||||
{% get_providers as socialaccount_providers %}
|
||||
|
||||
<h1>{% trans "Sign Up" %}</h1>
|
||||
|
||||
<div class="row">
|
||||
{% if socialaccount_providers %}
|
||||
<div class="col-md-5 col-lg-5">
|
||||
{% include "allauth/account/provider_panel.html" with process="login" %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<div class="{% if socialaccount_providers %}col-md-7 col-lg-7 {% else %} col-md-8 col-md-offset-2 col-lg-6 col-lg-offset-3 {% endif %}">
|
||||
|
||||
<p>{% blocktrans %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
|
||||
|
||||
<form id="signup_form" method="post" action="{% url 'account_signup' %}">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
|
81
allauthdemo/templates/allauth/socialaccount/connections.html
Executable file
81
allauthdemo/templates/allauth/socialaccount/connections.html
Executable file
|
@ -0,0 +1,81 @@
|
|||
{% extends "socialaccount/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Connected Accounts" %}{% endblock %}
|
||||
{% block account_nav_socialaccount_connections %}active{% endblock %}
|
||||
|
||||
{% block account_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">
|
||||
{% csrf_token %}
|
||||
|
||||
{% if form.non_field_errors %}
|
||||
<div class="alert alert-error">
|
||||
<a class="close" data-dismiss="alert">×</a>
|
||||
{% for non_field_error in form.non_field_errors %}
|
||||
{{ non_field_error }}
|
||||
{% endfor %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
|
||||
<table class="table">
|
||||
<thead>
|
||||
<tr>
|
||||
<th>
|
||||
{% trans 'Provider' %}
|
||||
</th>
|
||||
<th>
|
||||
{% trans 'Account' %}
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{% for base_account in form.accounts %}
|
||||
{% with base_account.get_provider_account as account %}
|
||||
<tr>
|
||||
<td>
|
||||
<label class="radio" for="id_account_{{base_account.id}}">
|
||||
<input id="id_account_{{base_account.id}}" type="radio" name="account" value="{{base_account.id}}"/>
|
||||
<span class="socialaccount_provider {{base_account.provider}} {{account.get_brand.id}}">{{account.get_brand.name}}</span>
|
||||
</label>
|
||||
</td>
|
||||
<td>
|
||||
{{account}}
|
||||
</td>
|
||||
</tr>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-danger" type="submit">{% trans 'Remove' %}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<div class="alert">
|
||||
<strong>{% trans 'None!' %}</strong> {% trans 'You currently have no social network accounts connected to this account.' %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<h2>{% trans 'Add a 3rd Party Account' %}</h2>
|
||||
|
||||
<ul class="socialaccount_providers">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
|
||||
</ul>
|
||||
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
29
allauthdemo/templates/allauth/socialaccount/signup.html
Executable file
29
allauthdemo/templates/allauth/socialaccount/signup.html
Executable file
|
@ -0,0 +1,29 @@
|
|||
{% extends "bases/bootstrap-auth.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load bootstrap3 %}
|
||||
|
||||
{% block head_title %}{% trans "Signup" %}{% endblock %}
|
||||
|
||||
{% block inner-content %}
|
||||
|
||||
<h1>{% trans "Sign Up" %}</h1>
|
||||
|
||||
<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="">
|
||||
{% csrf_token %}
|
||||
{% bootstrap_form form %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<div class="form-actions">
|
||||
<button class="btn btn-primary" type="submit">{% trans "Sign Up" %}</button>
|
||||
</div>
|
||||
</form>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
|
Reference in a new issue