mirror of
https://github.com/Southampton-RSG/breccia-mapper.git
synced 2026-03-03 03:17:07 +00:00
[FEAT] Enable django-allauth for enhanced user management & federation
This commit is contained in:
0
breccia_mapper/templates/account/Profile.html
Executable file
0
breccia_mapper/templates/account/Profile.html
Executable file
11
breccia_mapper/templates/account/account_inactive.html
Executable file
11
breccia_mapper/templates/account/account_inactive.html
Executable file
@@ -0,0 +1,11 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Account Inactive" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Account Inactive" %}</h1>
|
||||
|
||||
<p>{% trans "This account is inactive." %}</p>
|
||||
{% endblock %}
|
||||
1
breccia_mapper/templates/account/base.html
Executable file
1
breccia_mapper/templates/account/base.html
Executable file
@@ -0,0 +1 @@
|
||||
{% extends "base.html" %}
|
||||
93
breccia_mapper/templates/account/email.html
Executable file
93
breccia_mapper/templates/account/email.html
Executable file
@@ -0,0 +1,93 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Account Details" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1 class="h1" id="head_banner">Account Details</h1>
|
||||
|
||||
<h2 class="h2" id="head_banner">{% trans "Email Addresses" %}</h2>
|
||||
|
||||
{% if user.emailaddress_set.all %}
|
||||
|
||||
<p class="email_settings_info">{% trans 'The following email addresses are associated with your account:' %}</p>
|
||||
|
||||
<form action="{% url 'account_email' %}" method="post">
|
||||
{% csrf_token %}
|
||||
|
||||
{% for emailaddress in user.emailaddress_set.all %}
|
||||
<div class="ctrlHolder">
|
||||
|
||||
<label for="email_radio_{{forloop.counter}}" class="{% if emailaddress.primary %}primary_email{%endif%}">
|
||||
|
||||
{{ emailaddress.email }}
|
||||
|
||||
{% if emailaddress.primary %}
|
||||
<span class="primary">(primary email)</span>
|
||||
{% endif %}
|
||||
|
||||
{% if not emailaddress.verified %}
|
||||
<span class="unverified">(not verified)</span>
|
||||
{% endif %}
|
||||
|
||||
<input id="email_radio_{{forloop.counter}}" type="radio" name="email" {% if emailaddress.primary or user.emailaddress_set.count == 1 %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
|
||||
|
||||
</label>
|
||||
|
||||
</div>
|
||||
{% endfor %}
|
||||
|
||||
<div>
|
||||
<button class="btn btn-primary" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
|
||||
<button class="btn btn-info" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
|
||||
<button class="btn btn-danger" type="submit" name="action_remove" >{% trans 'Remove' %}</button>
|
||||
</div>
|
||||
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
<p class="email_settings_info"><strong>{% trans 'Warning:'%}</strong> {% trans "You do not have any email addresses set up. Please add an email address to receive notifications, reset your password, and perform other account-related actions." %}</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Add Email Address" %}</h3>
|
||||
|
||||
<form method="post" id="email_form" action="{% url 'account_email' %}">
|
||||
{% csrf_token %}
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
<button class="btn btn-primary" name="action_add" type="submit">{% trans "Add Email" %}</button>
|
||||
</form>
|
||||
|
||||
<h2 class="h2" id="head_banner">{% trans "Change Password" %}</h2>
|
||||
|
||||
<a class="btn btn-primary mb-4" href="{% url 'account_change_password' %}">{% trans "Change password" %}</a>
|
||||
|
||||
<h2 class="h2" id="head_banner">{% trans "Federated Login" %}</h2>
|
||||
|
||||
<p>You can connect third-party accounts to log into this site with them.</p>
|
||||
|
||||
<a class="btn btn-primary" href="{% url 'socialaccount_connections' %}">{% trans "Manage" %}</a>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block extra_body %}
|
||||
<script type="text/javascript">
|
||||
(function() {
|
||||
var message = "{% trans 'Are you sure you want to remove the selected email address?' %}";
|
||||
var actions = document.getElementsByName('action_remove');
|
||||
if (actions.length) {
|
||||
actions[0].addEventListener("click", function(e) {
|
||||
if (! confirm(message)) {
|
||||
e.preventDefault();
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
||||
</script>
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,76 @@
|
||||
{% load account %}
|
||||
{% user_display user as user_display %}
|
||||
{% load i18n %}
|
||||
{% load inlinecss %}
|
||||
{% inlinecss "css/emails.css" %}
|
||||
|
||||
<!DOCTYPE html
|
||||
PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Your New {{ settings.PROJECT_LONG_NAME }} Account</title>
|
||||
</head>
|
||||
|
||||
<body itemscope itemtype="http://schema.org/EmailMessage">
|
||||
|
||||
<table class="body-wrap">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="container" width="600">
|
||||
<div class="content">
|
||||
<table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope
|
||||
itemtype="http://schema.org/ConfirmAction">
|
||||
<tr>
|
||||
<td class="content-wrap">
|
||||
<meta itemprop="name" content="Confirm Email" />
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
<h2>{{ settings.PROJECT_LONG_NAME }}</h2>
|
||||
</td>
|
||||
</tr><tr>
|
||||
<td class="content-block">
|
||||
You have a new account on {{ settings.PROJECT_LONG_NAME }}. You can log in with the button below.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
Your username is <i>{{ user.username }}</i>.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block" itemprop="handler" itemscope
|
||||
itemtype="http://schema.org/HttpActionHandler">
|
||||
<a href="{{ settings.SITE_PROTOCOL }}://{{ settings.SITE_URL }}/accounts/login/" class="btn-primary" itemprop="url">Log in</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
The {{ settings.PROJECT_SHORT_NAME }} team
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
|
||||
</html>
|
||||
|
||||
{% endinlinecss %}
|
||||
@@ -0,0 +1,10 @@
|
||||
Dear user,
|
||||
|
||||
You have a new account on {{ settings.PROJECT_LONG_NAME }}. You can log in at the link below.
|
||||
|
||||
Your username is {{ user.username }}.
|
||||
|
||||
Log in: {{ settings.SITE_PROTOCOL }}://{{ settings.SITE_URL }}/accounts/login/
|
||||
|
||||
Thanks,
|
||||
The {{ settings.PROJECT_SHORT_NAME }} team
|
||||
71
breccia_mapper/templates/account/email/email_confirmation_message.html
Executable file
71
breccia_mapper/templates/account/email/email_confirmation_message.html
Executable file
@@ -0,0 +1,71 @@
|
||||
{% load account %}
|
||||
{% user_display user as user_display %}
|
||||
{% load i18n %}
|
||||
{% load inlinecss %}
|
||||
{% inlinecss "css/emails.css" %}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Registration confirmation email</title>
|
||||
</head>
|
||||
|
||||
<body itemscope itemtype="http://schema.org/EmailMessage">
|
||||
|
||||
<table class="body-wrap">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="container" width="600">
|
||||
<div class="content">
|
||||
<table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction">
|
||||
<tr>
|
||||
<td class="content-wrap">
|
||||
<meta itemprop="name" content="Confirm Email"/>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
<h2>{{ settings.PROJECT_LONG_NAME }}</h2>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
Please confirm your email address by clicking the link below.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
We may need to send you critical information about our service, so it is important that we have your correct email address.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block" itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
|
||||
<a href="{{ activate_url }}" class="btn-primary" itemprop="url">Confirm email address</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
The {{ settings.PROJECT_SHORT_NAME }} team
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{% endinlinecss %}
|
||||
@@ -0,0 +1 @@
|
||||
{% include "account/email/email_confirmation_message.html" %}
|
||||
@@ -0,0 +1,4 @@
|
||||
{% load i18n %}
|
||||
{% autoescape off %}
|
||||
{% blocktrans %}Confirm Your Registration - {{ settings.PROJECT_SHORT_NAME }}{% endblocktrans %}
|
||||
{% endautoescape %}
|
||||
1
breccia_mapper/templates/account/email/email_confirmation_subject.html
Executable file
1
breccia_mapper/templates/account/email/email_confirmation_subject.html
Executable file
@@ -0,0 +1 @@
|
||||
Confirm Your Email
|
||||
69
breccia_mapper/templates/account/email/password_reset_key_message.html
Executable file
69
breccia_mapper/templates/account/email/password_reset_key_message.html
Executable file
@@ -0,0 +1,69 @@
|
||||
{% load i18n %}
|
||||
{% load inlinecss %}
|
||||
{% inlinecss "css/emails.css" %}
|
||||
|
||||
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
|
||||
<html xmlns="http://www.w3.org/1999/xhtml">
|
||||
<head>
|
||||
<meta name="viewport" content="width=device-width" />
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
|
||||
<title>Reset your Password</title>
|
||||
</head>
|
||||
|
||||
<body itemscope itemtype="http://schema.org/EmailMessage">
|
||||
|
||||
<table class="body-wrap">
|
||||
<tr>
|
||||
<td></td>
|
||||
<td class="container" width="600">
|
||||
<div class="content">
|
||||
<table class="main" width="100%" cellpadding="0" cellspacing="0" itemprop="action" itemscope itemtype="http://schema.org/ConfirmAction">
|
||||
<tr>
|
||||
<td class="content-wrap">
|
||||
<meta itemprop="name" content="Confirm Email"/>
|
||||
<table width="100%" cellpadding="0" cellspacing="0">
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
<h2>{{ settings.PROJECT_LONG_NAME }}</h2>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
Please reset your password by clicking the link below.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
We may need to send you critical information about our service, so it is important that we have your correct email address.
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block" itemprop="handler" itemscope itemtype="http://schema.org/HttpActionHandler">
|
||||
<a href="{{ password_reset_url }}" class="btn-primary" itemprop="url">Reset your password</a>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td class="content-block">
|
||||
The {{ settings.PROJECT_SHORT_NAME }} team
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div class="footer">
|
||||
<table width="100%">
|
||||
<tr>
|
||||
|
||||
</tr>
|
||||
</table>
|
||||
</div></div>
|
||||
</td>
|
||||
<td></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
|
||||
{% endinlinecss %}
|
||||
4
breccia_mapper/templates/account/email/password_reset_key_subject.html
Executable file
4
breccia_mapper/templates/account/email/password_reset_key_subject.html
Executable file
@@ -0,0 +1,4 @@
|
||||
{% load i18n %}
|
||||
{% autoescape off %}
|
||||
{% blocktrans %}Reset Password - {{ settings.PROJECT_SHORT_NAME }}{% endblocktrans %}
|
||||
{% endautoescape %}
|
||||
32
breccia_mapper/templates/account/email_confirm.html
Executable file
32
breccia_mapper/templates/account/email_confirm.html
Executable file
@@ -0,0 +1,32 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load account %}
|
||||
{% block head_title %}{% trans "Confirm Email Address" %}{% endblock %}
|
||||
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Confirm Email Address" %}</h3>
|
||||
|
||||
{% if confirmation %}
|
||||
|
||||
<p class="verification_sent_info" >{% blocktrans with confirmation.email_address.email as email %} Please confirm ownership of <a href="mailto:{{ email }}">{{ email }}</a>.{% endblocktrans %}</p>
|
||||
|
||||
<form method="post"action="{% url 'account_confirm_email' confirmation.key %}">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-success" type="submit">{% trans 'Confirm' %}</button>
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
|
||||
{% url 'account_email' as email_url %}
|
||||
|
||||
<p class="verification_sent_info" >{% blocktrans %}This email confirmation link expired or is invalid. Please <a href="{{ email_url }}">request a new email confirmation</a>. You will be redirected to the login page in 5 seconds.{% endblocktrans %}</p>
|
||||
<script>
|
||||
setTimeout("location.href = '{% url 'account_login' %}';",5000);
|
||||
</script>
|
||||
|
||||
{% endif %}
|
||||
|
||||
{% endblock %}
|
||||
59
breccia_mapper/templates/account/login.html
Executable file
59
breccia_mapper/templates/account/login.html
Executable file
@@ -0,0 +1,59 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_links %}
|
||||
|
||||
<title>Sign In</title>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block head_title %}{% trans "Sign In" %} {% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Sign In" %}</h3>
|
||||
|
||||
<form id="login_form" method="POST" action="{% url 'account_login' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
{% if redirect_field_value %}
|
||||
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
|
||||
{% endif %}
|
||||
|
||||
<button class="btn btn-primary " type="submit">{% trans "Log in" %}</button>
|
||||
<a class="btn btn-outline-dark" href="{% url 'account_reset_password' %}">{% trans "Forgot password?" %}</a>
|
||||
|
||||
</form>
|
||||
|
||||
{% if config.ENABLE_GOOGLE_LOGIN or config.ENABLE_MICROSOFT_LOGIN %}
|
||||
|
||||
{% load account socialaccount %}
|
||||
|
||||
{% get_providers as socialaccount_providers %}
|
||||
<h5>Federated Login</h5>
|
||||
<div class="social_providers_list">
|
||||
|
||||
{% for provider in socialaccount_providers %}
|
||||
{% if provider.name == "Google" and config.ENABLE_GOOGLE_LOGIN or provider.name == "Microsoft Graph" and config.ENABLE_MICROSOFT_LOGIN %}
|
||||
<form action="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-outline-dark" type="submit">
|
||||
{% if provider.name == "Microsoft Graph" %}
|
||||
Microsoft
|
||||
{% else %}
|
||||
{{provider.name}}
|
||||
{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% endif %}
|
||||
{% endfor %}
|
||||
</div>
|
||||
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
26
breccia_mapper/templates/account/logout.html
Executable file
26
breccia_mapper/templates/account/logout.html
Executable file
@@ -0,0 +1,26 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Sign Out" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Sign Out" %}</h3>
|
||||
|
||||
<p class="confirm_logout_info">{% trans 'Are you sure you want to sign out?' %}</p>
|
||||
|
||||
<form id="logout_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-success" type="submit">{% trans 'Sign Out' %}</button>
|
||||
<a class="btn btn-danger" id="custom_logout_no" href="/accounts/profile/">{% trans 'No' %}</a>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}You cannot remove your primary email address ({{email}}).{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/email_confirmation_sent.txt
Executable file
2
breccia_mapper/templates/account/messages/email_confirmation_sent.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Confirmation email sent to {{email}}.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/email_confirmed.txt
Executable file
2
breccia_mapper/templates/account/messages/email_confirmed.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}You have confirmed {{email}}.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/email_deleted.txt
Executable file
2
breccia_mapper/templates/account/messages/email_deleted.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Removed email address {{email}}.{% endblocktrans %}
|
||||
4
breccia_mapper/templates/account/messages/logged_in.txt
Executable file
4
breccia_mapper/templates/account/messages/logged_in.txt
Executable file
@@ -0,0 +1,4 @@
|
||||
{% load account %}
|
||||
{% load i18n %}
|
||||
{% user_display user as name %}
|
||||
{% blocktrans %}Successfully logged in as {{name}}.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/logged_out.txt
Executable file
2
breccia_mapper/templates/account/messages/logged_out.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}You have signed out.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/password_changed.txt
Executable file
2
breccia_mapper/templates/account/messages/password_changed.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Password successfully changed.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/password_set.txt
Executable file
2
breccia_mapper/templates/account/messages/password_set.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Password successfully set.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/primary_email_set.txt
Executable file
2
breccia_mapper/templates/account/messages/primary_email_set.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Primary email address set.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/account/messages/unverified_primary_email.txt
Executable file
2
breccia_mapper/templates/account/messages/unverified_primary_email.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Your primary email address must be verified.{% endblocktrans %}
|
||||
18
breccia_mapper/templates/account/password_change.html
Executable file
18
breccia_mapper/templates/account/password_change.html
Executable file
@@ -0,0 +1,18 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Change Password" %}</h3>
|
||||
|
||||
<form method="POST" action="{% url 'account_change_password' %}" id="change_password_form">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
<button class="btn btn-info" type="submit" name="action">{% trans "Change Password" %}</button>
|
||||
</form>
|
||||
{% endblock %}
|
||||
26
breccia_mapper/templates/account/password_reset.html
Executable file
26
breccia_mapper/templates/account/password_reset.html
Executable file
@@ -0,0 +1,26 @@
|
||||
{% extends "account/base.html" %}
|
||||
{% load i18n %}
|
||||
{% load account %}
|
||||
|
||||
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% endif %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Password Reset" %}</h3>
|
||||
<p class="forgot_password_info" >{% trans "Forgotten your password? Enter your email address below to reset it." %}</p>
|
||||
|
||||
<form method="POST" id="forgot_password_form" action="{% url 'account_reset_password' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
<input class="btn btn-outline-primary " type="submit" value="{% trans 'Reset Password' %}" />
|
||||
</form>
|
||||
|
||||
<p class="forgot_password_info">{% blocktrans %}Please contact us if you are unable to reset your password.{% endblocktrans %}</p>
|
||||
|
||||
{% endblock %}
|
||||
20
breccia_mapper/templates/account/password_reset_done.html
Executable file
20
breccia_mapper/templates/account/password_reset_done.html
Executable file
@@ -0,0 +1,20 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% load account %}
|
||||
|
||||
{% block head_title %}{% trans "Password Reset" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3 class="h3" id="head_banner">{% trans "Password Reset Email Sent." %}</h3>
|
||||
|
||||
{% if user.is_authenticated %}
|
||||
{% include "account/snippets/already_logged_in.html" %}
|
||||
{% block content_extra %} {% endblock %}
|
||||
{% else %}
|
||||
<p class="forgot_password_info">A password reset link has been sent to your email address. Please contact us if you do not receive it within a few minutes. <br> You will be redirected to <a href="{% url 'account_login' %}">sign in</a> in 5 seconds.</p>
|
||||
<script>
|
||||
setTimeout("location.href = '{% url 'account_login' %}';",5000);
|
||||
</script>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
24
breccia_mapper/templates/account/password_reset_from_key.html
Executable file
24
breccia_mapper/templates/account/password_reset_from_key.html
Executable file
@@ -0,0 +1,24 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block 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="{{ action_url }}">
|
||||
{% csrf_token %}
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
<input type="submit" name="action" value="{% trans 'change password' %}"/>
|
||||
</form>
|
||||
{% else %}
|
||||
<p>{% trans 'Your password has been changed.' %}</p>
|
||||
{% endif %}
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
9
breccia_mapper/templates/account/password_reset_from_key_done.html
Executable file
9
breccia_mapper/templates/account/password_reset_from_key_done.html
Executable file
@@ -0,0 +1,9 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
{% block head_title %}{% trans "Change Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Change Password" %}</h1>
|
||||
<p>{% trans 'Your password has been changed.' %}</p>
|
||||
{% endblock %}
|
||||
18
breccia_mapper/templates/account/password_set.html
Executable file
18
breccia_mapper/templates/account/password_set.html
Executable file
@@ -0,0 +1,18 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Set Password" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Set Password" %}</h3>
|
||||
|
||||
<form method="POST" action="{% url 'account_set_password' %}" class="password_set">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
<input class="btn btn-outline-primary btn-lg" type="submit" name="action" value="{% trans 'Set Password' %}"/>
|
||||
</form>
|
||||
{% endblock %}
|
||||
33
breccia_mapper/templates/account/signup.html
Executable file
33
breccia_mapper/templates/account/signup.html
Executable file
@@ -0,0 +1,33 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Sign Up" %}{% endblock %}
|
||||
{% block head_links %}
|
||||
|
||||
<title>Signup</title>
|
||||
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans "Sign Up" %}</h3>
|
||||
|
||||
<p class="exist_account_info">{% blocktrans %}Already have an account? Please <a href="{{ login_url }}">sign in</a>.{% endblocktrans %}</p>
|
||||
|
||||
<form id="signup_form" method="post" action="{% url 'account_signup' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
|
||||
{% 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 %}
|
||||
11
breccia_mapper/templates/account/signup_closed.html
Executable file
11
breccia_mapper/templates/account/signup_closed.html
Executable file
@@ -0,0 +1,11 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Sign Up Closed" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Sign Up Closed" %}</h1>
|
||||
|
||||
<p>{% blocktrans with project_long_name=settings.PROJECT_LONG_NAME %}Signing up to {{ project_long_name }} is currently not permitted.{% endblocktrans %}</p>
|
||||
{% endblock %}
|
||||
11
breccia_mapper/templates/account/snippets/already_logged_in.html
Executable file
11
breccia_mapper/templates/account/snippets/already_logged_in.html
Executable file
@@ -0,0 +1,11 @@
|
||||
{% load i18n %}
|
||||
{% load account %}
|
||||
|
||||
{% block content %}
|
||||
{% user_display user as user_display %}
|
||||
|
||||
<h3 class="h3" id="head_banner">Already Logged In</h3>
|
||||
<p class="forgot_password_info" >You are already logged in as {{ user_display }}.</p>
|
||||
<a class="btn btn-primary mb-4" id="custom_logout_no" href="{% url 'account_email' %}">Account Details</a>
|
||||
|
||||
{% endblock %}
|
||||
12
breccia_mapper/templates/account/verification_sent.html
Executable file
12
breccia_mapper/templates/account/verification_sent.html
Executable file
@@ -0,0 +1,12 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Verify Your Email Address" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h3 class="h3" id="head_banner">{% trans "Verify Your Email Address" %}</h3>
|
||||
|
||||
<p id="verification_sent_info">{% blocktrans %}A verification email has been sent to your email address. Follow the link provided to activate your account. Contact us if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
||||
|
||||
{% endblock %}
|
||||
22
breccia_mapper/templates/account/verified_email_required.html
Executable file
22
breccia_mapper/templates/account/verified_email_required.html
Executable file
@@ -0,0 +1,22 @@
|
||||
{% extends "account/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Verify Your Email Address" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Verify Your Email Address" %}</h1>
|
||||
|
||||
{% url 'account_email' as email_url %}
|
||||
|
||||
<p>{% blocktrans %}This part of the site requires us to verify that
|
||||
you are who you claim to be. We therefore require you to
|
||||
verify ownership of your email address. {% endblocktrans %}</p>
|
||||
|
||||
<p>{% blocktrans %}A verification email has been sent to your email address. Follow the link provided to activate your account. Contact us
|
||||
if you do not receive it within a few minutes.{% endblocktrans %}</p>
|
||||
|
||||
<p>{% blocktrans %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your email address</a>.{% endblocktrans %}</p>
|
||||
|
||||
|
||||
{% endblock %}
|
||||
@@ -7,6 +7,7 @@
|
||||
<html lang="{{ LANGUAGE_CODE|default:'en_us' }}">
|
||||
|
||||
{% load pwa %}
|
||||
{% load socialaccount %}
|
||||
|
||||
<link rel="manifest" href="/manifest.json">
|
||||
|
||||
@@ -76,6 +77,12 @@
|
||||
|
||||
<div class="navbar-collapse collapse" id="navbarCollapse">
|
||||
<ul class="navbar-nav mt-2 mt-lg-0">
|
||||
<li class="nav-item">
|
||||
<a href="{% if request.user.person %}{% url 'people:person.profile' %}{% else %}{% url 'people:person.create' %}?user{% endif %}" class="nav-link">
|
||||
Profile
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'people:person.list' %}" class="nav-link">People</a>
|
||||
</li>
|
||||
@@ -114,23 +121,18 @@
|
||||
<ul class="navbar-nav mt-2 mt-lg-0 ml-auto">
|
||||
{% if request.user.is_authenticated %}
|
||||
<li class="nav-item">
|
||||
{% if request.user.person %}
|
||||
<a href="{% url 'people:person.profile' %}" class="nav-link">
|
||||
<i class="fa-solid fa-circle-user"></i>
|
||||
{{ request.user }}
|
||||
</a>
|
||||
|
||||
{% else %}
|
||||
<a href="{% url 'people:person.create' %}?user" class="nav-link">
|
||||
<i class="fa-solid fa-circle-user"></i>
|
||||
{{ request.user }}
|
||||
</a>
|
||||
|
||||
{% endif %}
|
||||
<a href="{% url 'account_email' %}" class="nav-link">
|
||||
<i class="fa-solid fa-circle-user"></i>
|
||||
{% if request.user.first_name != "" %}
|
||||
{{ request.user.first_name }}
|
||||
{% else %}
|
||||
{{ request.user }}
|
||||
{% endif %}
|
||||
</a>
|
||||
</li>
|
||||
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'logout' %}" class="nav-link">
|
||||
<a href="{% url 'account_logout' %}" class="nav-link">
|
||||
<i class="fa-solid fa-right-from-bracket"></i>
|
||||
Log Out
|
||||
</a>
|
||||
@@ -138,7 +140,7 @@
|
||||
|
||||
{% else %}
|
||||
<li class="nav-item">
|
||||
<a href="{% url 'login' %}" class="nav-link">
|
||||
<a href="{% url 'account_login' %}" class="nav-link">
|
||||
<i class="fa-solid fa-right-to-bracket"></i>
|
||||
Log In
|
||||
</a>
|
||||
|
||||
@@ -4,5 +4,5 @@
|
||||
{% block content %}
|
||||
<h1>Password Reset Complete</h1>
|
||||
|
||||
<p>Your password has been successfully reset. You can now <a href="{% url 'login' %}">log in using it</a>.</p> If you haven't yet completed your profile, please do this now.
|
||||
<p>Your password has been successfully reset. You can now <a href="{% url 'account_login' %}">log in using it</a>.</p> If you haven't yet completed your profile, please do this now.
|
||||
{% endblock %}
|
||||
@@ -17,7 +17,7 @@
|
||||
|
||||
{% else %}
|
||||
|
||||
<p>That link isn't valid - has it already been used? You can request a new link <a href="{% url 'login' %}">here</a>.</p>
|
||||
<p>That link isn't valid - has it already been used? You can request a new link <a href="{% url 'account_reset_password' %}">here</a>.</p>
|
||||
|
||||
{% endif %}
|
||||
|
||||
|
||||
11
breccia_mapper/templates/socialaccount/authentication_error.html
Executable file
11
breccia_mapper/templates/socialaccount/authentication_error.html
Executable file
@@ -0,0 +1,11 @@
|
||||
{% extends "socialaccount/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Federated Login Failure" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<h1>{% trans "Federated Login Failure" %}</h1>
|
||||
|
||||
<p>{% trans "An error occurred while attempting to log in via your third party account." %}</p>
|
||||
{% endblock %}
|
||||
1
breccia_mapper/templates/socialaccount/base.html
Executable file
1
breccia_mapper/templates/socialaccount/base.html
Executable file
@@ -0,0 +1 @@
|
||||
{% extends "account/base.html" %}
|
||||
70
breccia_mapper/templates/socialaccount/connections.html
Executable file
70
breccia_mapper/templates/socialaccount/connections.html
Executable file
@@ -0,0 +1,70 @@
|
||||
{% extends "socialaccount/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Account Connections" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
<a class="btn btn-primary mb-4" href="{% url 'account_email' %}">{% trans "Account Details" %}</a>
|
||||
|
||||
<h2 class="h2" id="head_banner">{% trans "Account Connections" %}</h2>
|
||||
|
||||
{% 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 %}
|
||||
|
||||
<fieldset>
|
||||
{% if form.non_field_errors %}
|
||||
<div id="errorMsg">{{ form.non_field_errors }}</div>
|
||||
{% endif %}
|
||||
|
||||
{% for base_account in form.accounts %}
|
||||
{% with base_account.get_provider_account as account %}
|
||||
<div>
|
||||
<label 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 }}">
|
||||
{% if account.get_brand.name == "Microsoft Graph" %}
|
||||
Microsoft
|
||||
{% else %}
|
||||
{{ account.get_brand.name }}
|
||||
{% endif %}
|
||||
-
|
||||
</span>
|
||||
{{ account }}
|
||||
</label>
|
||||
</div>
|
||||
{% endwith %}
|
||||
{% endfor %}
|
||||
|
||||
<div>
|
||||
<button class="btn btn-danger" type="submit">{% trans 'Remove' %}</button>
|
||||
</div>
|
||||
|
||||
</fieldset>
|
||||
|
||||
</form>
|
||||
|
||||
{% else %}
|
||||
<p>{% trans 'You currently have no third party accounts connected to this account.' %}</p>
|
||||
{% endif %}
|
||||
|
||||
<h3 class="h3" id="head_banner">{% trans 'Add Federated Login Account' %}</h3>
|
||||
|
||||
<p>Adding a third party account allows you to log in to this site with it.</p>
|
||||
|
||||
<div class="social_providers_list">
|
||||
{% include "socialaccount/snippets/provider_list.html" with process="connect" %}
|
||||
</div>
|
||||
|
||||
{% include "socialaccount/snippets/login_extra.html" %}
|
||||
|
||||
{% endblock %}
|
||||
15
breccia_mapper/templates/socialaccount/login_cancelled.html
Executable file
15
breccia_mapper/templates/socialaccount/login_cancelled.html
Executable file
@@ -0,0 +1,15 @@
|
||||
{% extends "socialaccount/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Login Cancelled" %}{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
|
||||
<h1>{% trans "Login Cancelled" %}</h1>
|
||||
|
||||
{% url 'account_login' as login_url %}
|
||||
|
||||
<p>{% blocktrans %}Login was cancelled. If this was a mistake, please proceed to <a href="{{login_url}}">sign in</a>.{% endblocktrans %}</p>
|
||||
|
||||
{% endblock %}
|
||||
2
breccia_mapper/templates/socialaccount/messages/account_connected.txt
Executable file
2
breccia_mapper/templates/socialaccount/messages/account_connected.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Your third party account has been connected.{% endblocktrans %}
|
||||
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Your third party account is already connected to a different account on this site.{% endblocktrans %}
|
||||
2
breccia_mapper/templates/socialaccount/messages/account_disconnected.txt
Executable file
2
breccia_mapper/templates/socialaccount/messages/account_disconnected.txt
Executable file
@@ -0,0 +1,2 @@
|
||||
{% load i18n %}
|
||||
{% blocktrans %}Your third party account has been disconnected.{% endblocktrans %}
|
||||
24
breccia_mapper/templates/socialaccount/signup.html
Executable file
24
breccia_mapper/templates/socialaccount/signup.html
Executable file
@@ -0,0 +1,24 @@
|
||||
{% extends "socialaccount/base.html" %}
|
||||
|
||||
{% load i18n %}
|
||||
|
||||
{% block head_title %}{% trans "Signup" %}{% endblock %}
|
||||
|
||||
{% block 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 {% if provider_name == 'Microsoft Graph' %}Microsoft{% else %}{{provider_name}}{% endif %} account to sign up to
|
||||
{{site_name}}.{% endblocktrans %}</p>
|
||||
|
||||
<form class="signup" id="signup_form" method="post" action="{% url 'socialaccount_signup' %}">
|
||||
{% csrf_token %}
|
||||
|
||||
{% load bootstrap4 %}
|
||||
{% bootstrap_form form %}
|
||||
{% if redirect_field_value %}
|
||||
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
|
||||
{% endif %}
|
||||
<button type="submit">{% trans "Sign Up" %} »</button>
|
||||
</form>
|
||||
|
||||
{% endblock %}
|
||||
3
breccia_mapper/templates/socialaccount/snippets/login_extra.html
Executable file
3
breccia_mapper/templates/socialaccount/snippets/login_extra.html
Executable file
@@ -0,0 +1,3 @@
|
||||
{% load socialaccount %}
|
||||
|
||||
{% providers_media_js %}
|
||||
22
breccia_mapper/templates/socialaccount/snippets/provider_list.html
Executable file
22
breccia_mapper/templates/socialaccount/snippets/provider_list.html
Executable file
@@ -0,0 +1,22 @@
|
||||
{% load socialaccount %}
|
||||
|
||||
{% get_providers as socialaccount_providers %}
|
||||
|
||||
{% for provider in socialaccount_providers %}
|
||||
{% if provider.id == "openid" %}
|
||||
{% for brand in provider.get_brands %}
|
||||
<form action="{% provider_login_url provider.id openid=brand.openid_url process=process %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-outline-dark" type="submit">
|
||||
{{ brand.name }}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
{% endif %}
|
||||
<form action="{% provider_login_url provider.id process=process scope=scope auth_params=auth_params %}" method="post">
|
||||
{% csrf_token %}
|
||||
<button class="btn btn-outline-dark" type="submit">
|
||||
{% if provider.name == 'Microsoft Graph' %}Microsoft{% else %}{{provider.name}}{% endif %}
|
||||
</button>
|
||||
</form>
|
||||
{% endfor %}
|
||||
Reference in New Issue
Block a user