From 0f951dcf029d4af284467543a3afdf5bf6581a20 Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Tue, 23 Apr 2024 11:16:38 +0100 Subject: switched to Django --- core/templates/core/base.html | 58 ++++++++++++ core/templates/core/index.html | 100 +++++++++++++++++++++ core/templates/core/profile.html | 13 +++ core/templates/registration/logged_out.html | 9 ++ core/templates/registration/login.html | 43 +++++++++ .../registration/password_change_done.html | 15 ++++ .../registration/password_change_form.html | 59 ++++++++++++ .../registration/password_reset_complete.html | 20 +++++ .../registration/password_reset_confirm.html | 42 +++++++++ .../registration/password_reset_done.html | 19 ++++ .../registration/password_reset_email.html | 14 +++ .../registration/password_reset_form.html | 29 ++++++ core/templates/registration/register.html | 22 +++++ 13 files changed, 443 insertions(+) create mode 100644 core/templates/core/base.html create mode 100644 core/templates/core/index.html create mode 100644 core/templates/core/profile.html create mode 100644 core/templates/registration/logged_out.html create mode 100644 core/templates/registration/login.html create mode 100644 core/templates/registration/password_change_done.html create mode 100644 core/templates/registration/password_change_form.html create mode 100644 core/templates/registration/password_reset_complete.html create mode 100644 core/templates/registration/password_reset_confirm.html create mode 100644 core/templates/registration/password_reset_done.html create mode 100644 core/templates/registration/password_reset_email.html create mode 100644 core/templates/registration/password_reset_form.html create mode 100644 core/templates/registration/register.html (limited to 'core/templates') diff --git a/core/templates/core/base.html b/core/templates/core/base.html new file mode 100644 index 0000000..1c2bfe0 --- /dev/null +++ b/core/templates/core/base.html @@ -0,0 +1,58 @@ +{% load static i18n %} + + + + + + + + + + + + + {% block title %}{% endblock title %} + {% block extra_head_tags %}{% endblock extra_head_tags %} + + + +{% block navbar %} +
+ + Home + Engagement Plans + Regulated Entities + Reporting + Dashboards + + {% if request.user.is_authenticated %} + {{ user }} + Log Out + {% else %} + Log In + {% endif %} + Help +
+{% endblock navbar %} + +
+ {% block content %} + {% endblock content %} +
+ + diff --git a/core/templates/core/index.html b/core/templates/core/index.html new file mode 100644 index 0000000..d279479 --- /dev/null +++ b/core/templates/core/index.html @@ -0,0 +1,100 @@ +{% extends "core/base.html" %} +{% load table_extras %} + +{% block title %}ComplyIQ - Information Management for DefNucSyR{% endblock title %} + +{% block content %} + +
+

ComplyIQ - Information Management for DefNucSyR

+
+ × +

Quote of the day

+

This is a placeholder for some interesting test. Use of lose.

+
+ +

{% lorem %}

+ +
+
+

Submarines and Propulsion

+
+
+ +

Assessments & Inspections:

+ + + + + + + + + {% for s in subs_regulatory %} + + + + + + + + {% endfor %} +
Start DateEnd DateEventSiteInspectors
{{ s.proposed_start_date|date:'j M y' }}{{ s.proposed_end_date|date:'j M y' }}{{ s }}{{ s.external_party }} + {% if s.officers.all %} + {{ s.officers.all|commalist }} + {% endif %} +
+
+
+ Add New +
+
+ See Enagements for full list +
+
+
+

Non-regulatory events:

+ + + + + + + {% if not subs %} + + + + + + {% else %} + {% for s in subs %} + + + + + + {% endfor %} + {% endif %} +
Start DateEnd DateSummary
NoneNoneNone
{{ s.proposed_start_date|date:'j M y' }}{{ s.proposed_end_date|date:'j M y' }}{{ s }}
+
+ +
+ +

{% lorem %}

+ +
+
+ +
+
+

Transport

+
+
+

{% lorem %}

+
+
+ +
+ +{% endblock content %} diff --git a/core/templates/core/profile.html b/core/templates/core/profile.html new file mode 100644 index 0000000..8171379 --- /dev/null +++ b/core/templates/core/profile.html @@ -0,0 +1,13 @@ +{% extends "core/base.html" %} + +{% block title %}Profile - {{ user }}{% endblock title %} + +{% block content %} + +
+ {% block body %} +

Profile for {{ user }} ({{ user.first_name }} {{ user.last_name }})

+

Email: {{ user.email }}

+ {% endblock body %} +{% endblock content %} +
diff --git a/core/templates/registration/logged_out.html b/core/templates/registration/logged_out.html new file mode 100644 index 0000000..61e6831 --- /dev/null +++ b/core/templates/registration/logged_out.html @@ -0,0 +1,9 @@ +{% extends "core/base.html" %} + +{% block title %}Logged out{% endblock title %} + +{% block content %} + +

You've logged out. Bye.

+ +{% endblock content %} diff --git a/core/templates/registration/login.html b/core/templates/registration/login.html new file mode 100644 index 0000000..9e00087 --- /dev/null +++ b/core/templates/registration/login.html @@ -0,0 +1,43 @@ +{% extends "core/base.html" %} + +{% block content %} + +
+ {% if form.errors %} +

Your username and password didn't match. Please try again.

+ {% endif %} + + {% if next %} + {% if user.is_authenticated %} +

Your account doesn't have access to this page. To proceed, + please login with an account that has access.

+ {% else %} +

Please login to see this page.

+ {% endif %} + {% endif %} + +
+ {% csrf_token %} +
+ {{ form.username.label_tag }} + {{ form.username }} +
+ +
+ {{ form.password.label_tag }} + {{ form.password }} +
+ +
+ +
+ +
+ +
+ {# Assumes you set up the password_reset view in your URLconf #} + Lost password? +
+ + {% endblock content %} +
diff --git a/core/templates/registration/password_change_done.html b/core/templates/registration/password_change_done.html new file mode 100644 index 0000000..20fac71 --- /dev/null +++ b/core/templates/registration/password_change_done.html @@ -0,0 +1,15 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} +{% block userlinks %}{% url 'django-admindocs-docroot' as docsroot %}{% if docsroot %}{% trans "Documentation" %} / {% endif %}{% trans "Change password" %} / {% trans "Log out" %}{% endblock userlinks %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block title %}{{ title }}{% endblock title %} +{% block content_title %}

{{ title }}

{% endblock content_title %} +{% block content %} +

{% trans "Your password was changed." %}

+{% endblock content %} diff --git a/core/templates/registration/password_change_form.html b/core/templates/registration/password_change_form.html new file mode 100644 index 0000000..4ed12d4 --- /dev/null +++ b/core/templates/registration/password_change_form.html @@ -0,0 +1,59 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} +{% block extrastyle %}{{ block.super }}{% endblock extrastyle %} +{% block userlinks %}{% url "django-admindocs-docroot" as docsroot %}{% if docsroot %}{% trans "Documentation" %} / {% endif %} {% trans "Change password" %} / {% trans "Log out" %}{% endblock userlinks %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block title %}{{ title }}{% endblock title %} +{% block content_title %}

{{ title }}

{% endblock content_title %} + +{% block content %}
+ +
{% csrf_token %} +
+{% if form.errors %} +

+ {% if form.errors.items|length == 1 %}{% trans "Please correct the error below." %}{% else %}{% trans "Please correct the errors below." %}{% endif %} +

+{% endif %} + +

{% 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." %}

+ +
+ +
+ {{ form.old_password.errors }} + {{ form.old_password.label_tag }} {{ form.old_password }} +
+ +
+ {{ form.new_password1.errors }} + {{ form.new_password1.label_tag }} {{ form.new_password1 }} + {% if form.new_password1.help_text %} +
{{ form.new_password1.help_text|safe }}
+ {% endif %} +
+ +
+{{ form.new_password2.errors }} + {{ form.new_password2.label_tag }} {{ form.new_password2 }} + {% if form.new_password2.help_text %} +
{{ form.new_password2.help_text|safe }}
+ {% endif %} +
+ +
+ +
+ +
+ +
+
+ +{% endblock content %} diff --git a/core/templates/registration/password_reset_complete.html b/core/templates/registration/password_reset_complete.html new file mode 100644 index 0000000..0e60645 --- /dev/null +++ b/core/templates/registration/password_reset_complete.html @@ -0,0 +1,20 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block title %}{{ title }}{% endblock title %} +{% block content_title %}

{{ title }}

{% endblock content_title %} + +{% block content %} + +

{% trans "Your password has been set. You may go ahead and log in now." %}

+ +

{% trans "Log in" %}

+ +{% endblock content %} diff --git a/core/templates/registration/password_reset_confirm.html b/core/templates/registration/password_reset_confirm.html new file mode 100644 index 0000000..e493f5a --- /dev/null +++ b/core/templates/registration/password_reset_confirm.html @@ -0,0 +1,42 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} + +{% block extrastyle %}{{ block.super }}{% endblock extrastyle %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block title %}{{ title }}{% endblock title %} +{% block content_title %}

{{ title }}

{% endblock content_title %} +{% block content %} + +{% if validlink %} + +

{% trans "Please enter your new password twice so we can verify you typed it in correctly." %}

+ +
{% csrf_token %} +
+
+ {{ form.new_password1.errors }} + + {{ form.new_password1 }} +
+
+ {{ form.new_password2.errors }} + + {{ form.new_password2 }} +
+ +
+
+ +{% else %} + +

{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}

+ +{% endif %} + +{% endblock content %} diff --git a/core/templates/registration/password_reset_done.html b/core/templates/registration/password_reset_done.html new file mode 100644 index 0000000..a29461d --- /dev/null +++ b/core/templates/registration/password_reset_done.html @@ -0,0 +1,19 @@ +{% extends "admin/base_site.html" %} +{% load i18n %} + +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block title %}{{ title }}{% endblock title %} +{% block content_title %}

{{ title }}

{% endblock content_title %} +{% block content %} + +

{% trans "We've emailed you instructions for setting your password, if an account exists with the email you entered. You should receive them shortly." %}

+ +

{% trans "If you don't receive an email, please make sure you've entered the address you registered with, and check your spam folder." %}

+ +{% endblock content %} diff --git a/core/templates/registration/password_reset_email.html b/core/templates/registration/password_reset_email.html new file mode 100644 index 0000000..0cd2e51 --- /dev/null +++ b/core/templates/registration/password_reset_email.html @@ -0,0 +1,14 @@ +{% load i18n %}{% autoescape off %} +{% blocktrans %}You're receiving this email because you requested a password reset for your user account at {{ site_name }}.{% endblocktrans %} + +{% trans "Please go to the following page and choose a new password:" %} +{% block reset_link %} +{{ protocol }}://{{ domain }}{% url 'password_reset_confirm' uidb64=uid token=token %} +{% endblock reset_link %} +{% trans "Your username, in case you've forgotten:" %} {{ user.get_username }} + +{% trans "Thanks for using our site!" %} + +{% blocktrans %}The {{ site_name }} team{% endblocktrans %} + +{% endautoescape %} diff --git a/core/templates/registration/password_reset_form.html b/core/templates/registration/password_reset_form.html new file mode 100644 index 0000000..921fb8e --- /dev/null +++ b/core/templates/registration/password_reset_form.html @@ -0,0 +1,29 @@ +{% extends "admin/base_site.html" %} +{% load i18n static %} + +{% block extrastyle %}{{ block.super }}{% endblock extrastyle %} +{% block breadcrumbs %} + +{% endblock breadcrumbs %} + +{% block title %}{{ title }}{% endblock title %} +{% block content_title %}

{{ title }}

{% endblock content_title %} +{% block content %} + +

{% trans "Forgotten your password? Enter your email address below, and we'll email instructions for setting a new one." %}

+ +
{% csrf_token %} +
+
+ {{ form.email.errors }} + + {{ form.email }} +
+ +
+
+ +{% endblock content %} diff --git a/core/templates/registration/register.html b/core/templates/registration/register.html new file mode 100644 index 0000000..98615fd --- /dev/null +++ b/core/templates/registration/register.html @@ -0,0 +1,22 @@ +{% extends "core/base.html" %} + +{% block title %}Register new user{% endblock title %} + +{% block content %} +

Register a new user

+
+ {% csrf_token %} + {% if messages %} + + {% endif %} + {{ form }} + + + +
+ +{% endblock content %} -- cgit v1.2.3