initial commit

This commit is contained in:
2022-06-01 15:30:52 -05:00
commit e1d47f345f
151 changed files with 4114 additions and 0 deletions

View File

@@ -0,0 +1,11 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% translate "Account Inactive" %}{% endblock %}
{% block inner %}
<h1>{% translate "Account Inactive" %}</h1>
<p>{% translate "This account is inactive." %}</p>
{% endblock %}

View File

@@ -0,0 +1,10 @@
{% extends "base.html" %}
{% block title %}{% block head_title %}{% endblock head_title %}{% endblock title %}
{% block content %}
<div class="row">
<div class="col-md-6 offset-md-3">
{% block inner %}{% endblock %}
</div>
</div>
{% endblock %}

View File

@@ -0,0 +1,78 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Account" %}{% endblock %}
{% block inner %}
<h1>{% translate "E-mail Addresses" %}</h1>
{% if user.emailaddress_set.all %}
<p>{% translate 'The following e-mail addresses are associated with your account:' %}</p>
<form action="{% url 'account_email' %}" class="email_list" method="post">
{% csrf_token %}
<fieldset class="blockLabels">
{% for emailaddress in user.emailaddress_set.all %}
<div class="radio">
<label 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 or user.emailaddress_set.count == 1 %}checked="checked"{%endif %} value="{{emailaddress.email}}"/>
{{ emailaddress.email }}
{% if emailaddress.verified %}
<span class="verified">{% translate "Verified" %}</span>
{% else %}
<span class="unverified">{% translate "Unverified" %}</span>
{% endif %}
{% if emailaddress.primary %}<span class="primary">{% translate "Primary" %}</span>{% endif %}
</label>
</div>
{% endfor %}
<div class="form-group">
<button class="secondaryAction btn btn-primary" type="submit" name="action_primary" >{% translate 'Make Primary' %}</button>
<button class="secondaryAction btn btn-primary" type="submit" name="action_send" >{% translate 'Re-send Verification' %}</button>
<button class="primaryAction btn btn-primary" type="submit" name="action_remove" >{% translate 'Remove' %}</button>
</div>
</fieldset>
</form>
{% else %}
<p><strong>{% translate 'Warning:'%}</strong> {% translate "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>{% translate "Add E-mail Address" %}</h2>
<form method="post" action="{% url 'account_email' %}" class="add_email">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-primary" name="action_add" type="submit">{% translate "Add E-mail" %}</button>
</form>
{% endblock %}
{% block inline_javascript %}
{{ block.super }}
<script type="text/javascript">
window.addEventListener('DOMContentLoaded',function() {
const message = "{% translate 'Do you really want to remove the selected e-mail address?' %}";
const actions = document.getElementsByName('action_remove');
if (actions.length) {
actions[0].addEventListener("click",function(e) {
if (!confirm(message)) {
e.preventDefault();
}
});
}
Array.from(document.getElementsByClassName('form-group')).forEach(x => x.classList.remove('row'));
});
</script>
{% endblock %}

View File

@@ -0,0 +1,31 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
{% block head_title %}{% translate "Confirm E-mail Address" %}{% endblock %}
{% block inner %}
<h1>{% translate "Confirm E-mail Address" %}</h1>
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
<p>{% blocktranslate 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 }}.{% endblocktranslate %}</p>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button class="btn btn-primary" type="submit">{% translate 'Confirm' %}</button>
</form>
{% else %}
{% url 'account_email' as email_url %}
<p>{% blocktranslate %}This e-mail confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new e-mail confirmation request</a>.{% endblocktranslate %}</p>
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,59 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load account socialaccount %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Sign In" %}{% endblock %}
{% block inner %}
<h1>{% translate "Sign In" %}</h1>
{% get_providers as socialaccount_providers %}
{% if socialaccount_providers %}
<p>
{% translate "Please sign in with one of your existing third party accounts:" %}
{% if ACCOUNT_ALLOW_REGISTRATION %}
{% blocktranslate trimmed %}
Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:
{% endblocktranslate %}
{% endif %}
</p>
<div class="socialaccount_ballot">
<ul class="socialaccount_providers">
{% include "socialaccount/snippets/provider_list.html" with process="login" %}
</ul>
<div class="login-or">{% translate "or" %}</div>
</div>
{% include "socialaccount/snippets/login_extra.html" %}
{% else %}
{% if ACCOUNT_ALLOW_REGISTRATION %}
<p>
{% blocktranslate trimmed %}
If you have not created an account yet, then please
<a href="{{ signup_url }}">sign up</a> first.
{% endblocktranslate %}
</p>
{% endif %}
{% endif %}
<form class="login" method="POST" action="{% url 'account_login' %}">
{% csrf_token %}
{{ form|crispy }}
{% if redirect_field_value %}
<input type="hidden" name="{{ redirect_field_name }}" value="{{ redirect_field_value }}" />
{% endif %}
<a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% translate "Forgot Password?" %}</a>
<button class="primaryAction btn btn-primary" type="submit">{% translate "Sign In" %}</button>
</form>
{% endblock %}

View File

@@ -0,0 +1,19 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% translate "Sign Out" %}{% endblock %}
{% block inner %}
<h1>{% translate "Sign Out" %}</h1>
<p>{% translate '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-danger" type="submit">{% translate 'Sign Out' %}</button>
</form>
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Change Password" %}{% endblock %}
{% block inner %}
<h1>{% translate "Change Password" %}</h1>
<form method="POST" action="{% url 'account_change_password' %}" class="password_change">
{% csrf_token %}
{{ form|crispy }}
<button class="btn btn-primary" type="submit" name="action">{% translate "Change Password" %}</button>
</form>
{% endblock %}

View File

@@ -0,0 +1,25 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Password Reset" %}{% endblock %}
{% block inner %}
<h1>{% translate "Password Reset" %}</h1>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% translate "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="{% url 'account_reset_password' %}" class="password_reset">
{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" value="{% translate 'Reset My Password' %}" />
</form>
<p>{% blocktranslate %}Please contact us if you have any trouble resetting your password.{% endblocktranslate %}</p>
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load account %}
{% block head_title %}{% translate "Password Reset" %}{% endblock %}
{% block inner %}
<h1>{% translate "Password Reset" %}</h1>
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
<p>{% blocktranslate %}We have sent you an e-mail. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %}</p>
{% endblock %}

View File

@@ -0,0 +1,24 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Change Password" %}{% endblock %}
{% block inner %}
<h1>{% if token_fail %}{% translate "Bad Token" %}{% else %}{% translate "Change Password" %}{% endif %}</h1>
{% if token_fail %}
{% url 'account_reset_password' as passwd_reset_url %}
<p>{% blocktranslate %}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>.{% endblocktranslate %}</p>
{% else %}
{% if form %}
<form method="POST" action=".">
{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" name="action" value="{% translate 'change password' %}"/>
</form>
{% else %}
<p>{% translate 'Your password is now changed.' %}</p>
{% endif %}
{% endif %}
{% endblock %}

View File

@@ -0,0 +1,9 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% translate "Change Password" %}{% endblock %}
{% block inner %}
<h1>{% translate "Change Password" %}</h1>
<p>{% translate 'Your password is now changed.' %}</p>
{% endblock %}

View File

@@ -0,0 +1,16 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Set Password" %}{% endblock %}
{% block inner %}
<h1>{% translate "Set Password" %}</h1>
<form method="POST" action="{% url 'account_set_password' %}" class="password_set">
{% csrf_token %}
{{ form|crispy }}
<input class="btn btn-primary" type="submit" name="action" value="{% translate 'Set Password' %}"/>
</form>
{% endblock %}

View File

@@ -0,0 +1,22 @@
{% extends "account/base.html" %}
{% load i18n %}
{% load crispy_forms_tags %}
{% block head_title %}{% translate "Signup" %}{% endblock %}
{% block inner %}
<h1>{% translate "Sign Up" %}</h1>
<p>{% blocktranslate %}Already have an account? Then please <a href="{{ login_url }}">sign in</a>.{% endblocktranslate %}</p>
<form class="signup" id="signup_form" method="post" action="{% url 'account_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">{% translate "Sign Up" %} &raquo;</button>
</form>
{% endblock %}

View File

@@ -0,0 +1,11 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% translate "Sign Up Closed" %}{% endblock %}
{% block inner %}
<h1>{% translate "Sign Up Closed" %}</h1>
<p>{% translate "We are sorry, but the sign up is currently closed." %}</p>
{% endblock %}

View File

@@ -0,0 +1,12 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %}
{% block inner %}
<h1>{% translate "Verify Your E-mail Address" %}</h1>
<p>{% blocktranslate %}We have sent an e-mail to you for verification. Follow the link provided to finalize the signup process. Please contact us if you do not receive it within a few minutes.{% endblocktranslate %}</p>
{% endblock %}

View File

@@ -0,0 +1,21 @@
{% extends "account/base.html" %}
{% load i18n %}
{% block head_title %}{% translate "Verify Your E-mail Address" %}{% endblock %}
{% block inner %}
<h1>{% translate "Verify Your E-mail Address" %}</h1>
{% url 'account_email' as email_url %}
<p>{% blocktranslate %}This part of the site requires us to verify that
you are who you claim to be. For this purpose, we require that you
verify ownership of your e-mail address. {% endblocktranslate %}</p>
<p>{% blocktranslate %}We have sent an e-mail to you for
verification. Please click on the link inside this e-mail. Please
contact us if you do not receive it within a few minutes.{% endblocktranslate %}</p>
<p>{% blocktranslate %}<strong>Note:</strong> you can still <a href="{{ email_url }}">change your e-mail address</a>.{% endblocktranslate %}</p>
{% endblock %}