Base templates
This commit is contained in:
parent
76ed93ff33
commit
5610ade1fe
19 changed files with 426 additions and 2 deletions
17
photo21/templates/registration/logged_out.html
Normal file
17
photo21/templates/registration/logged_out.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<p>{% trans "Thanks for spending some quality time with the Web site today." %}</p>
|
||||
<p><a href="{% url 'index' %}">{% trans 'Log in again' %}</a></p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
43
photo21/templates/registration/login.html
Normal file
43
photo21/templates/registration/login.html
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-2.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n static %}
|
||||
{% block title %}{% trans "Log in" %}{% endblock %}
|
||||
|
||||
{% block extracss %}
|
||||
<link rel="stylesheet" href="{% static "registration/css/login.css" %}">
|
||||
{% endblock %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light mx-auto" style="max-width: 30rem;">
|
||||
<h3 class="card-header text-center">
|
||||
{% trans "Log in" %}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if user.is_authenticated %}
|
||||
<div class="alert alert-warning">
|
||||
{% blocktrans trimmed with username=request.user.username %}
|
||||
You are authenticated as {{ username }}, but are not authorized to
|
||||
access this page. Would you like to login to a different account?
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
{% if request.resolver_match.view_name == 'admin:login' %}
|
||||
<div class="alert alert-info">
|
||||
{% blocktrans trimmed %}
|
||||
You must be logged with a staff account with the higher mask to access Django Admin.
|
||||
{% endblocktrans %}
|
||||
</div>
|
||||
{% endif %}
|
||||
|
||||
<form action="{{ app_path }}" method="post" id="login-form">{% csrf_token %}
|
||||
{{ form }}
|
||||
<input type="submit" value="{% trans 'Log in' %}" class="btn btn-primary btn-block btn-lg">
|
||||
<a href="{% url 'password_reset' %}"
|
||||
class="badge badge-light">{% trans 'Forgotten your password or username?' %}</a>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
16
photo21/templates/registration/password_change_done.html
Normal file
16
photo21/templates/registration/password_change_done.html
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<p>{% trans 'Your password was changed.' %}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
20
photo21/templates/registration/password_change_form.html
Normal file
20
photo21/templates/registration/password_change_form.html
Normal file
|
|
@ -0,0 +1,20 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<form method="post">{% csrf_token %}
|
||||
<p>{% trans "Please enter your old password, for security's sake, and then enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
{{ form }}
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Change my password' %}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
19
photo21/templates/registration/password_reset_complete.html
Normal file
19
photo21/templates/registration/password_reset_complete.html
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<p>{% trans "Your password has been set. You may go ahead and log in now." %}</p>
|
||||
<p>
|
||||
<a href="{{ login_url }}" class="btn btn-success">{% trans 'Log in' %}</a>
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
26
photo21/templates/registration/password_reset_confirm.html
Normal file
26
photo21/templates/registration/password_reset_confirm.html
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
{% if validlink %}
|
||||
<p>{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}</p>
|
||||
<form method="post">{% csrf_token %}
|
||||
{{ form }}
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Change my password' %}">
|
||||
</form>
|
||||
{% else %}
|
||||
<p>
|
||||
{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}
|
||||
</p>
|
||||
{% endif %}
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
17
photo21/templates/registration/password_reset_done.html
Normal file
17
photo21/templates/registration/password_reset_done.html
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<p>{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}</p>
|
||||
<p>{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}</p>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
22
photo21/templates/registration/password_reset_form.html
Normal file
22
photo21/templates/registration/password_reset_form.html
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
{% extends "base.html" %}
|
||||
{% comment %}
|
||||
SPDX-License-Identifier: GPL-3.0-or-later
|
||||
{% endcomment %}
|
||||
{% load i18n %}
|
||||
|
||||
{% block content %}
|
||||
<div class="card bg-light">
|
||||
<h3 class="card-header text-center">
|
||||
{{ title }}
|
||||
</h3>
|
||||
<div class="card-body">
|
||||
<p>{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}</p>
|
||||
|
||||
<form method="post">
|
||||
{% csrf_token %}
|
||||
{{ form }}
|
||||
<input class="btn btn-primary" type="submit" value="{% trans 'Reset my password' %}">
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
{% endblock %}
|
||||
Loading…
Add table
Add a link
Reference in a new issue