From d9899f2d56bdd19b964c387f71a9846720bd0be7 Mon Sep 17 00:00:00 2001
From: Joshua Rubingh
Date: Thu, 14 May 2020 15:20:19 +0200
Subject: [PATCH] Update schedule module
---
.../static/RUG_template/css/base.css | 44 +
.../apps/RUG_template/templates/index.html | 4 +-
.../apps/RUG_template/templates/menu.html | 15 +-
.../templates/registration/login.html | 9 +-
.../registration/password_reset_complete.html | 8 +-
.../registration/password_reset_confirm.html | 31 +-
.../registration/password_reset_done.html | 2 +-
.../registration/password_reset_email.html | 27 +
.../registration/password_reset_form.html | 23 +-
.../apps/RUG_template/templates/singup.html | 4 +-
.../management/commands/send_reports.py | 24 +
.../migrations/0002_auto_20200514_1318.py | 25 +
polyclinic_scheduling/apps/schedule/models.py | 5 +
.../templates/schedule/schedule_new.html | 1305 +++++++++--------
.../polyclinic_scheduling/settings.py | 4 +-
polyclinic_scheduling/templates/menu.html | 33 +-
polyclinic_scheduling/templates/singup.html | 9 +-
17 files changed, 871 insertions(+), 701 deletions(-)
create mode 100644 polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_email.html
create mode 100644 polyclinic_scheduling/apps/schedule/management/commands/send_reports.py
create mode 100644 polyclinic_scheduling/apps/schedule/migrations/0002_auto_20200514_1318.py
diff --git a/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css b/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css
index 142a595..90c44aa 100644
--- a/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css
+++ b/polyclinic_scheduling/apps/RUG_template/static/RUG_template/css/base.css
@@ -21,4 +21,48 @@
.rug-breadcrumbs {
display: none;
+}
+
+p {
+ max-width: none;
+}
+
+table {
+ width: 100%;
+}
+
+input {
+ width: 100%
+}
+
+.alert-warning {
+ color: #856404;
+ background-color: #fff3cd;
+ border-color: #ffeeba;
+}
+
+.alert-success {
+ color: #155724;
+ background-color: #d4edda;
+ border-color: #c3e6cb;
+}
+.alert-danger {
+ color: #721c24;
+ background-color: #f8d7da;
+ border-color: #f5c6cb;
+}
+.form-control {
+ display: block;
+ width: 100%;
+ height: calc(1.5em + .75rem + 2px);
+ padding: .375rem .75rem;
+ font-size: 1rem;
+ font-weight: 400;
+ line-height: 1.5;
+ color: #495057;
+ background-color: #fff;
+ background-clip: padding-box;
+ border: 1px solid #ced4da;
+ border-radius: .25rem;
+ transition: border-color .15s ease-in-out,box-shadow .15s ease-in-out;
}
\ No newline at end of file
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/index.html b/polyclinic_scheduling/apps/RUG_template/templates/index.html
index a9987e0..b5e543e 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/index.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/index.html
@@ -4,8 +4,6 @@
{% block title %}{% trans "Welcome to the RUG Template page" %}{% endblock %}
{% block pagetitle %}{% trans "Welcome to the RUG Template page" %}{% endblock %}
{% block content %}
-
-{% trans "Simple RUG Template" %}
-
+{% trans "Simple RUG Template" %}
{% trans "Some more text" %}
{% endblock %}
\ No newline at end of file
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/menu.html b/polyclinic_scheduling/apps/RUG_template/templates/menu.html
index 3e9334a..e3d592a 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/menu.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/menu.html
@@ -1,13 +1,10 @@
{% load i18n %}
-{% trans "Section" %}
-
-
+ {% trans "Section" %}
+
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/registration/login.html b/polyclinic_scheduling/apps/RUG_template/templates/registration/login.html
index 50d2086..dbb09bf 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/registration/login.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/registration/login.html
@@ -5,9 +5,12 @@
{% block pagetitle %}{% trans "Login" %}{% endblock %}
{% block content %}
-{% trans "Login" %}
+ {% trans "Login" %}
+
+ {% blocktrans %}
+ You can login here to create your schedules. If you do not have a login, please contact: some_one@rug.nl
+ {% endblocktrans %}
-
-
+
{# Assumes you setup the password_reset view in your URLconf #}
{% trans "Lost password?" %}
{% endblock %}
\ No newline at end of file
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_complete.html b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_complete.html
index 89becc9..71f51c6 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_complete.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_complete.html
@@ -4,9 +4,7 @@
{% block title %}{% trans "Password reset complete" %}{% endblock %}
{% block pagetitle %}{% trans "Password reset complete" %}{% endblock %}
{% block content %}
-
-{% trans "Password reset complete" %}
-
-
Your new password has been set. You can log in now on the log in page.
-
+{% trans "Password reset complete" %}
+{% url 'login' as login_url %}
+{% blocktrans %}Your new password has been set. You can log in now on the log in page.{% endblocktrans %}
{% endblock %}
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_confirm.html b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_confirm.html
index a89576a..e472c5e 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_confirm.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_confirm.html
@@ -4,22 +4,23 @@
{% block title %}{% trans "Set a new password!" %}{% endblock %}
{% block pagetitle %}{% trans "Set a new password!" %}{% endblock %}
{% block content %}
-
-{% trans "Set a new password!" %}
+
{% trans "Set a new password!" %}
{% if validlink %}
-
+ {% blocktrans %}Here you can set a new password.{% endblocktrans %}
+
+
{% else %}
-{% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}
+ {% trans "The password reset link was invalid, possibly because it has already been used. Please request a new password reset." %}
{% endif %}
-
+
{% endblock %}
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_done.html b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_done.html
index 59135be..ffa7012 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_done.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_done.html
@@ -8,6 +8,6 @@
{% trans "Reset password, email sent" %}
-We've emailed you instructions for setting your password. You should receive the email shortly!
+{% blocktrans %}We've emailed you instructions for setting your password. You should receive the email shortly!{% endblocktrans %}
{% endblock %}
\ No newline at end of file
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_email.html b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_email.html
new file mode 100644
index 0000000..7558911
--- /dev/null
+++ b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_email.html
@@ -0,0 +1,27 @@
+{% load i18n %}
+
+
+
+{% trans "Password reset" %}
+
+
+
+{% trans "Password reset" %}
+
+{% url 'password_reset_confirm' uidb64=uid token=token as reset_url%}
+{% blocktrans %}
+You're receiving this email because you requested a password reset for your user account at {{ site_name }}.
+
+Please go to the following page and choose a new password:
+
+{{ protocol}}://{{ domain }}{{ reset_url }}
+
+Your username, in case you’ve forgotten: {{ user }}
+
+Thanks for using our site!
+
+The {{ site_name }} team
+{% endblocktrans %}
+
+
+
\ No newline at end of file
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_form.html b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_form.html
index a199ca4..362f89b 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_form.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/registration/password_reset_form.html
@@ -6,19 +6,16 @@
{% block content %}
{% trans "Reset password" %}
+
+{% blocktrans %}Here you can request a password reset. Please enter your email address that is used for registration.{% endblocktrans %}
-
-
-
-{% endblock %}
+{% endblock %}
\ No newline at end of file
diff --git a/polyclinic_scheduling/apps/RUG_template/templates/singup.html b/polyclinic_scheduling/apps/RUG_template/templates/singup.html
index d0be6fb..2e6ff1a 100644
--- a/polyclinic_scheduling/apps/RUG_template/templates/singup.html
+++ b/polyclinic_scheduling/apps/RUG_template/templates/singup.html
@@ -4,9 +4,7 @@
{% block title %}{% trans "Singup" %}{% endblock %}
{% block pagetitle %}{% trans "Singup" %}{% endblock %}
{% block content %}
-
-{% trans "Singup" %}
-
+{% trans "Singup" %}