Skip to content

Commit

Permalink
Remove captcha and fmt all files.
Browse files Browse the repository at this point in the history
  • Loading branch information
JasonLovesDoggo committed Apr 3, 2024
1 parent d319ade commit 5ff74de
Show file tree
Hide file tree
Showing 54 changed files with 1,010 additions and 919 deletions.
20 changes: 10 additions & 10 deletions templates/404.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

{% block heading %}404: Page Not Found{% endblock %}
{% block content %}
<p class="card-text">
<a href="/">Return Home</a>
<!-- Honey? Where's my flag? -->
<!-- What? -->
<!-- Where. Is. My. Flag? -->
<!-- I, uh, put it away. -->
<!-- Where? -->
<!-- Why do you need to know? -->
<!-- I need it! -->
</p>
<p class="card-text">
<a href="/">Return Home</a>
<!-- Honey? Where's my flag? -->
<!-- What? -->
<!-- Where. Is. My. Flag? -->
<!-- I, uh, put it away. -->
<!-- Where? -->
<!-- Why do you need to know? -->
<!-- I need it! -->
</p>
{% endblock %}
12 changes: 6 additions & 6 deletions templates/account/base.html
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
{% extends 'card.html' %}

{% block heading %}
{% block head_title %}{% endblock %}
{% block head_title %}{% endblock %}
{% endblock %}

{% block after_card %}
<style>
hr + h1 {
display: none;
}
</style>
<style>
hr + h1 {
display: none;
}
</style>
{% endblock %}

{% block container_classes %}w-small{% endblock %}
126 changes: 67 additions & 59 deletions templates/account/email.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,68 +6,76 @@
{% block head_title %}{% trans "E-mail Addresses" %}{% endblock %}

{% block content %}
{% if user.emailaddress_set.all %}
<p>{% trans '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="ctrlHolder">
<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">{% trans "Verified" %}</span>
{% else %}
<span class="unverified">{% trans "Unverified" %}</span>
{% endif %}
{% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
</label>
</div>
{% endfor %}

<div class="buttonHolder">
<button class="secondaryAction btn btn-primary mb-3" type="submit" name="action_primary" >{% trans 'Make Primary' %}</button>
<button class="secondaryAction btn btn-primary mb-3" type="submit" name="action_send" >{% trans 'Re-send Verification' %}</button>
<button class="primaryAction btn btn-primary mb-3" 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="{% url 'account_email' %}" class="add_email">
{% csrf_token %}
{% bootstrap_form form %}
<button type="submit" name="action_add" class="btn btn-primary mb-3">{% trans "Add E-mail" %}</button>
</form>
{% if user.emailaddress_set.all %}
<p>{% trans '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="ctrlHolder">
<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">{% trans "Verified" %}</span>
{% else %}
<span class="unverified">{% trans "Unverified" %}</span>
{% endif %}
{% if emailaddress.primary %}<span class="primary">{% trans "Primary" %}</span>{% endif %}
</label>
</div>
{% endfor %}

<div class="buttonHolder">
<button class="secondaryAction btn btn-primary mb-3" type="submit"
name="action_primary">{% trans 'Make Primary' %}</button>
<button class="secondaryAction btn btn-primary mb-3" type="submit"
name="action_send">{% trans 'Re-send Verification' %}</button>
<button class="primaryAction btn btn-primary mb-3" 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="{% url 'account_email' %}" class="add_email">
{% csrf_token %}
{% bootstrap_form form %}
<button type="submit" name="action_add" class="btn btn-primary mb-3">{% trans "Add E-mail" %}</button>
</form>

{% endblock %}


{% block scripts %}
<script type="text/javascript">
(function() {
var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}";
var actions = document.getElementsByName('action_remove');
if (actions.length) {
actions[0].addEventListener("click", function(e) {
if (! confirm(message)) {
e.preventDefault();
}
});
}
})();
</script>
<script type="text/javascript">
(function () {
var message = "{% trans 'Do you really want to remove the selected e-mail address?' %}";
var actions = document.getElementsByName('action_remove');
if (actions.length) {
actions[0].addEventListener("click", function (e) {
if (!confirm(message)) {
e.preventDefault();
}
});
}
})();
</script>
{% endblock %}
25 changes: 14 additions & 11 deletions templates/account/email_confirm.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,23 +8,26 @@

{% block content %}

{% if confirmation %}
{% if confirmation %}

{% user_display confirmation.email_address.user as user_display %}
{% 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>
<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 type="submit" class="btn btn-primary mb-3">{% trans "Confirm" %}</button>
</form>
<form method="post" action="{% url 'account_confirm_email' confirmation.key %}">
{% csrf_token %}
<button type="submit" class="btn btn-primary mb-3">{% trans "Confirm" %}</button>
</form>

{% else %}
{% else %}

{% url 'account_email' as email_url %}
{% 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>
<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 %}
{% endif %}

{% endblock %}
53 changes: 29 additions & 24 deletions templates/account/login.html
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@
{% get_providers as socialaccount_providers %}
{% if socialaccount_providers %}
<p>{% blocktrans with site.name as site_name %}Please sign in with one
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>
of your existing third party accounts. Or, <a href="{{ signup_url }}">sign up</a>
for a {{ site_name }} account and sign in below:{% endblocktrans %}</p>

<div class="socialaccount_ballot">
<ul class="socialaccount_providers">
Expand All @@ -21,12 +21,14 @@
</div>
{% include "socialaccount/snippets/login_extra.html" %}
{% else %}
<p>{% blocktrans %}If you have not created an account yet, then please <a href="{{ signup_url }}">sign up</a> first.{% endblocktrans %}</p>
<p>{% blocktrans %}If you have not created an account yet, then please <a href="{{ signup_url }}">sign up</a>
first.{% endblocktrans %}</p>
{% endif %}
<form method="post">
{% csrf_token %}
{% bootstrap_form form success_css_class="" %}
<p><a class="button secondaryAction" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a></p>
<p><a class="button secondaryAction"
href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a></p>
{% bootstrap_button content='Sign In' button_type='submit' %}
</form>
{% endblock %}
Expand All @@ -35,24 +37,27 @@

{# ? #}
{% block deps %}
<script src="{% static 'js/login.js' %}"></script>
<style>
.form-control.is-valid, .was-validated .form-control:valid,
.form-check-input.is-valid, .was-validated .form-check-input:valid {
border-color: #ced4da;
background-image: revert;
}
.form-check-input.is-valid:checked, .was-validated .form-check-input:valid:checked {
color: white;
background-color: #0d6efd;
}
.form-check-input.is-valid ~ .form-check-label, .was-validated .form-check-input:valid ~ .form-check-label {
color: revert;
}
.form-check-input.is-valid:focus, .was-validated .form-check-input:valid:focus,
.form-control.is-valid:focus, .was-validated .form-control:valid:focus {
border-color: #86b7fe;
box-shadow: 0 0 0 .25rem rgba(13,110,253,.25);
}
</style>
<script src="{% static 'js/login.js' %}"></script>
<style>
.form-control.is-valid, .was-validated .form-control:valid,
.form-check-input.is-valid, .was-validated .form-check-input:valid {
border-color: #ced4da;
background-image: revert;
}

.form-check-input.is-valid:checked, .was-validated .form-check-input:valid:checked {
color: white;
background-color: #0d6efd;
}

.form-check-input.is-valid ~ .form-check-label, .was-validated .form-check-input:valid ~ .form-check-label {
color: revert;
}

.form-check-input.is-valid:focus, .was-validated .form-check-input:valid:focus,
.form-control.is-valid:focus, .was-validated .form-control:valid:focus {
border-color: #86b7fe;
box-shadow: 0 0 0 .25rem rgba(13, 110, 253, .25);
}
</style>
{% endblock %}
16 changes: 8 additions & 8 deletions templates/account/logout.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@
{% block head_title %}{% trans "Sign Out" %}{% endblock %}

{% block content %}
<p>{% trans 'Are you sure you want to sign out?' %}</p>
<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 type="submit" class="btn btn-primary mb-3">{% trans "Sign Out" %}</button>
</form>
<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 type="submit" class="btn btn-primary mb-3">{% trans "Sign Out" %}</button>
</form>


{% endblock %}
2 changes: 1 addition & 1 deletion templates/account/password_reset.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
{% block content %}

{% if request.user.is_authenticated %}
{% include "./snippets/already_logged_in.html" %}
{% include "./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>
Expand Down
5 changes: 3 additions & 2 deletions templates/account/password_reset_from_key.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,14 @@
{% load i18n %}

{% block head_title %}
{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}
{% if token_fail %}{% trans "Bad Token" %}{% else %}{% trans "Change Password" %}{% endif %}
{% endblock %}

{% block content %}
{% 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>
<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 }}">
Expand Down
2 changes: 1 addition & 1 deletion templates/account/signup.html
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
{% block heading %}{% trans "Sign Up" %}{% endblock %}

{% block before_form %}
<p>{% blocktrans %}Already have an account? <a href="{{ login_url }}">Sign in</a>.{% endblocktrans %}</p>
<p>{% blocktrans %}Already have an account? <a href="{{ login_url }}">Sign in</a>.{% endblocktrans %}</p>
{% endblock %}

{% block after_form %}
Expand Down
Loading

0 comments on commit 5ff74de

Please sign in to comment.