2025.10.06-03:08:05

This commit is contained in:
2025-10-06 03:08:05 +02:00
parent 38a85cb9d5
commit e08b03bb42
57 changed files with 3222 additions and 157 deletions

View File

@@ -0,0 +1,91 @@
{% extends "account/base_manage_email.html" %}
{% load static allauth i18n widget_tweaks %}
{% block head_title %}
{% trans "Email Addresses" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Email Addresses" %}
{% endelement %}
{% if emailaddresses %}
{% element p %}
{% trans 'The following email addresses are associated with your account:' %}
{% endelement %}
{% url 'account_email' as email_url %}
{% element form form=form action=email_url method="post" tags="email,list" %}
{% slot body %}
{% csrf_token %}
{% for radio in emailaddress_radios %}
{% with emailaddress=radio.emailaddress %}
{% element field type="radio" checked=radio.checked name="email" value=emailaddress.email id=radio.id %}
{% slot label %}
{{ emailaddress.email }}
{% if emailaddress.verified %}
{% element badge tags="success,email,verified" %}
{% translate "Verified" %}
{% endelement %}
{% else %}
{% element badge tags="warning,email,unverified" %}
{% translate "Unverified" %}
{% endelement %}
{% endif %}
{% if emailaddress.primary %}
{% element badge tags="email,primary" %}
{% translate "Primary" %}
{% endelement %}
{% endif %}
{% endslot %}
{% endelement %}
{% endwith %}
{% endfor %}
{% endslot %}
{% slot actions %}
<div class="text-end">
{% element button type="submit" class="btn btn-primary mb-3" name="action_primary" %}
{% trans 'Make Primary' %}
{% endelement %}
{% element button tags="secondary" class="btn btn-secondary mb-3" type="submit" name="action_send" %}
{% trans 'Re-send Verification' %}
{% endelement %}
{% element button class="btn btn-danger mb-3" tags="danger,delete" type="submit" name="action_remove" %}
{% trans 'Remove' %}
{% endelement %}
</div>
{% endslot %}
{% endelement %}
{% else %}
{% include "account/snippets/warn_no_email.html" %}
{% endif %}
{% if can_add_email %}
{% element h2 %}
{% trans "Add Email Address" %}
{% endelement %}
{% url 'account_email' as action_url %}
{% element form form=form method="post" action=action_url tags="email,add" %}
{% slot body %}
{% csrf_token %}
<div class="form-floating form-floating-sm mb-3">
{% render_field form.email class="form-control" placeholder="Neue Email-Adresse" %}
<label for="id_email">Neue Email-Adresse</label>
</div>
{% endslot %}
{% slot actions %}
<div class="text-end">
{% element button name="action_add" class="btn btn-success" type="submit" %}
{% trans "Add Email" %}
{% endelement %}
</div>
{% endslot %}
{% endelement %}
{% endif %}
{% endblock content %}
{% block extra_body %}
<script src="{% static 'account/js/account.js' %}"></script>
<script src="{% static 'account/js/onload.js' %}"></script>
<script data-allauth-onload="allauth.account.forms.manageEmailForm" type="application/json">{
"i18n": {"confirmDelete": "{% trans 'Do you really want to remove the selected email address?' %}"}
}
</script>
{% endblock extra_body %}

View File

@@ -0,0 +1,68 @@
{% extends "account/base_manage_email.html" %}
{% load i18n %}
{% load allauth %}
{% block head_title %}
{% trans "Email Address" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Email Address" %}
{% endelement %}
{% if not emailaddresses %}
{% include "account/snippets/warn_no_email.html" %}
{% endif %}
{% url 'account_email' as action_url %}
{% element form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{% if current_emailaddress %}
{% element field id="current_email" disabled=True type="email" value=current_emailaddress.email %}
{% slot label %}
{% translate "Current email" %}:
{% endslot %}
{% endelement %}
{% endif %}
{% if new_emailaddress %}
{% element field id="new_email" value=new_emailaddress.email disabled=True type="email" %}
{% slot label %}
{% if not current_emailaddress %}
{% translate "Current email" %}:
{% else %}
{% translate "Changing to" %}:
{% endif %}
{% endslot %}
{% slot help_text %}
{% blocktranslate %}Your email address is still pending verification.{% endblocktranslate %}
{% element button class="btn btn-secondary" form="pending-email" type="submit" name="action_send" tags="minor,secondary" %}
{% trans 'Re-send Verification' %}
{% endelement %}
{% if current_emailaddress %}
{% element button class="btn btn-danger" form="pending-email" type="submit" name="action_remove" tags="danger,minor" %}
{% trans 'Cancel Change' %}
{% endelement %}
{% endif %}
{% endslot %}
{% endelement %}
{% endif %}
{% element field id=form.email.auto_id name="email" value=form.email.value errors=form.email.errors type="email" %}
{% slot label %}
{% translate "Change to" %}:
{% endslot %}
{% endelement %}
{% endslot %}
{% slot actions %}
{% element button class="btn btn-primary" name="action_add" type="submit" %}
{% trans "Change Email" %}
{% endelement %}
{% endslot %}
{% endelement %}
{% if new_emailaddress %}
<form style="display: none"
id="pending-email"
method="post"
action="{% url 'account_email' %}">
{% csrf_token %}
<input type="hidden" name="email" value="{{ new_emailaddress.email }}">
</form>
{% endif %}
{% endblock content %}

View File

@@ -0,0 +1,41 @@
{% extends "account/base_entrance.html" %}
{% load i18n %}
{% load account %}
{% load allauth %}
{% block head_title %}
{% trans "Confirm Email Address" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Confirm Email Address" %}
{% endelement %}
{% if confirmation %}
{% user_display confirmation.email_address.user as user_display %}
{% if can_confirm %}
{% element p %}
{% blocktrans with confirmation.email_address.email as email %}Please confirm that <a href="mailto:{{ email }}">{{ email }}</a> is an email address for user {{ user_display }}.{% endblocktrans %}
{% endelement %}
{% url 'account_confirm_email' confirmation.key as action_url %}
{% element form method="post" action=action_url %}
{% slot actions %}
{% csrf_token %}
{{ redirect_field }}
<div class="text-end">
{% element button class="btn btn-success" type="submit" %}
{% trans 'Confirm' %}
{% endelement %}
</div>
{% endslot %}
{% endelement %}
{% else %}
{% element p %}
{% blocktrans %}Unable to confirm {{ email }} because it is already confirmed by a different account.{% endblocktrans %}
{% endelement %}
{% endif %}
{% else %}
{% url 'account_email' as email_url %}
{% element p %}
{% blocktrans %}This email confirmation link expired or is invalid. Please <a href="{{ email_url }}">issue a new email confirmation request</a>.{% endblocktrans %}
{% endelement %}
{% endif %}
{% endblock content %}

View File

@@ -0,0 +1,49 @@
{% extends 'base.html' %}
{% load i18n widget_tweaks allauth account socialaccount %}
{% block head_title %}cmoser.eu - {% translate 'Log in' %}{% endblock head_title %}
{% block content %}
<main class="card rounded mx-auto p-4" style="width:30rem;">
<div class="card-body">
<div class="d-flex flex-column">
<div class="flex flex-col text-center mb-4">
<h1 class="h3">Melde dich bei deinem Account an</h1>
<form method="POST" class="mb-4">
{% csrf_token %}
{% if form.errors %}
{% for field, errors in form.errors.items %}
{% for error in errors %}
<div class="p-2 my-2 text-sm text-red-700 bg-red-50 rounded-md border-red-300 border">
{{ error }}
</div>
{% endfor %}
{% endfor %}
{% endif %}
<div class="form-floating mb-3">
{% render_field form.login class="form-control" placeholder="Emailadresse" %}
<label for="{{ form.login.id_for_label }}">Emailaddresse</label>
</div>
<div class="form-floating mb-3">
{% render_field form.password class="form-control" %}
<label for="{{ form.password.id_for_label }}">Passwort</label>
</div>
<div>
{% render_field form.remember class="input-checked" %}
<label class="input-checked-label" for="{{ form.remember.id_for_label }}">{{ form.remember.label }}</label>
</div>
<div class="text-end">
<button type="submit" class="btn btn-success">Sign in</button>
</div>
</form>
</div>
<hr>
<h2 class="h4 text-center">Oder nutze deinen Socialaccount</h3>
{% if SOCIALACCOUNT_ENABLED %}
{% include 'socialaccount/snippets/login.html' with page_layout="entrance" %}
{% endif %}
</div>
</main>
{% endblock content %}

View File

@@ -0,0 +1,39 @@
{% extends "account/base_manage_password.html" %}
{% load allauth i18n widget_tweaks %}
{% block head_title %}
{% trans "Change Password" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Change Password" %}
{% endelement %}
{% url 'account_change_password' as action_url %}
{% element form form=form method="post" action=action_url %}
{% slot body %}
{% csrf_token %}
{#{{ redirect_field }}#}
{# {% element fields form=form %}{% endelement %} #}
<div class="form-floating form-floating-sm mb-3">
{% render_field form.oldpassword placeholder="Aktuelles Passwort" class="form-control" %}
<label for="{{ id_oldpassword }}">Aktuelles Passwort</label>
</div>
<div class="form-floating form-floating-sm mb-3">
{% render_field form.password1 class="form-control" placehoder="Neues Passwort" autocomplete="new-password" required="" %}
<label for="{{ id_password1 }}">Neues Passwort</label>
</div>
<div class="form-floating form-flaoting-sm mb-3">
{% render_field form.password2 class="form-control" placehoder="Neues Passwort" autocomplete="new-password" required="" %}
<label for="{{ id_password2 }}">Neues Passwort</label>
</div>
{% endslot %}
{% slot actions %}
<div class="text-end">
<a class="me-2" href="{% url 'account_reset_password' %}">{% trans "Forgot Password?" %}</a>
{% element button class="btn btn-primary" type="submit" %}
{% trans "Change Password" %}
{% endelement %}
</div>
{% endslot %}
{% endelement %}
{% endblock content %}

View File

@@ -0,0 +1,38 @@
{% extends "account/base_entrance.html" %}
{% load i18n allauth account widget_tweaks %}
{% block head_title %}
{% trans "Password Reset" %}
{% endblock head_title %}
{% block content %}
{% element h1 %}
{% trans "Password Reset" %}
{% endelement %}
{% if user.is_authenticated %}
{% include "account/snippets/already_logged_in.html" %}
{% endif %}
{% element p %}
{% trans "Forgotten your password? Enter your email address below, and we'll send you an email allowing you to reset it." %}
{% endelement %}
{% url 'account_reset_password' as reset_url %}
{% element form form=form method="post" action=reset_url %}
{% slot body %}
{% csrf_token %}
{{ redirect_field }}
<div class="form-floating form-floating-sm">
{% render_field form.email name="email" autocomplete="email" placeholder="E-Mail-Adresse" max-length="320" required="" class="form-control mb-3" %}
<label for="id_email">E-Mail-Adresse</label>
</div>
{% endslot %}
{% slot actions %}
<div class="text-end mb-3">
{% element button type="submit" class="btn btn-primary" %}
{% trans 'Reset My Password' %}
{% endelement %}
</div>
{% endslot %}
{% endelement %}
{% element p %}
{% blocktrans %}Please contact us if you have any trouble resetting your password.{% endblocktrans %}
{% endelement %}
{% endblock content %}