diff --git a/docs/_build/html/_modules/core/forms/conditional_form.html b/docs/_build/html/_modules/core/forms/conditional_form.html index 3ea99ecbf..835be8446 100644 --- a/docs/_build/html/_modules/core/forms/conditional_form.html +++ b/docs/_build/html/_modules/core/forms/conditional_form.html @@ -152,7 +152,7 @@

Source code for core.forms.conditional_form

 from django import forms
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from ..utils import is_empty
 
diff --git a/docs/_build/html/_modules/core/forms/mixins.html b/docs/_build/html/_modules/core/forms/mixins.html
index 3965e061c..4c7f6b9e4 100644
--- a/docs/_build/html/_modules/core/forms/mixins.html
+++ b/docs/_build/html/_modules/core/forms/mixins.html
@@ -155,7 +155,7 @@ 

Source code for core.forms.mixins

 from django.forms.fields import Field, FileField
 from django.forms.models import InlineForeignKeyField, construct_instance
 from django.forms.utils import ErrorDict
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 
 
 
[docs]class SoftValidationMixin: diff --git a/docs/_build/html/_modules/core/models.html b/docs/_build/html/_modules/core/models.html index 812faa697..7a3c554b3 100644 --- a/docs/_build/html/_modules/core/models.html +++ b/docs/_build/html/_modules/core/models.html @@ -152,7 +152,7 @@

Source code for core.models

 from django.db import models
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.utils.encoding import python_2_unicode_compatible
 
 YES = 'Y'
diff --git a/docs/_build/html/_modules/core/utils.html b/docs/_build/html/_modules/core/utils.html
index c854307ba..9ebfb9bea 100644
--- a/docs/_build/html/_modules/core/utils.html
+++ b/docs/_build/html/_modules/core/utils.html
@@ -154,7 +154,7 @@ 

Source code for core.utils

 from django.conf import settings
 from django.contrib.auth import get_user_model
 from django.db.models import Q
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 import django.utils.six as six
 
 YES_NO = [(True, _('ja')), (False, _('nee'))]
diff --git a/docs/_build/html/_modules/core/validators.html b/docs/_build/html/_modules/core/validators.html
index 6bc54e095..0276b06f9 100644
--- a/docs/_build/html/_modules/core/validators.html
+++ b/docs/_build/html/_modules/core/validators.html
@@ -154,7 +154,7 @@ 

Source code for core.validators

 from django.core.exceptions import ValidationError
 from django.core.files.uploadedfile import UploadedFile
 from django.core.validators import BaseValidator
-from django.utils.translation import ugettext_lazy, ungettext_lazy
+from django.utils.translation import gettext_lazy, ungettext_lazy
 
 ALLOWED_CONTENT_TYPES = ['application/pdf', 'application/msword',
                          'application/vnd.openxmlformats-officedocument.wordprocessingml.document']
@@ -173,7 +173,7 @@ 

Source code for core.validators

 
[docs]def validate_pdf_or_doc(value): f = value.file if isinstance(f, UploadedFile) and f.content_type not in ALLOWED_CONTENT_TYPES: - raise ValidationError(ugettext_lazy('Alleen .pdf- of .doc(x)-bestanden zijn toegestaan.'))
+ raise ValidationError(gettext_lazy('Alleen .pdf- of .doc(x)-bestanden zijn toegestaan.'))
diff --git a/docs/_build/html/_modules/django/contrib/auth/models.html b/docs/_build/html/_modules/django/contrib/auth/models.html index 5a7916243..2126d0101 100644 --- a/docs/_build/html/_modules/django/contrib/auth/models.html +++ b/docs/_build/html/_modules/django/contrib/auth/models.html @@ -164,7 +164,7 @@

Source code for django.contrib.auth.models

 from django.utils import six, timezone
 from django.utils.deprecation import CallableFalse, CallableTrue
 from django.utils.encoding import python_2_unicode_compatible
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from .validators import ASCIIUsernameValidator, UnicodeUsernameValidator
 
diff --git a/docs/_build/html/_modules/django/db/models/fields/files.html b/docs/_build/html/_modules/django/db/models/fields/files.html
index 404c3a26a..8366cc4b1 100644
--- a/docs/_build/html/_modules/django/db/models/fields/files.html
+++ b/docs/_build/html/_modules/django/db/models/fields/files.html
@@ -166,7 +166,7 @@ 

Source code for django.db.models.fields.files

from django.utils import six from django.utils.deprecation import RemovedInDjango20Warning from django.utils.encoding import force_str, force_text -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class FieldFile(File): diff --git a/docs/_build/html/_modules/faqs/models.html b/docs/_build/html/_modules/faqs/models.html index a20d69838..faf1757e3 100644 --- a/docs/_build/html/_modules/faqs/models.html +++ b/docs/_build/html/_modules/faqs/models.html @@ -152,7 +152,7 @@

Source code for faqs.models

 from django.db import models
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.utils.encoding import python_2_unicode_compatible
 
 
[docs]@python_2_unicode_compatible diff --git a/docs/_build/html/_modules/feedback/models.html b/docs/_build/html/_modules/feedback/models.html index abba4eeee..964247471 100644 --- a/docs/_build/html/_modules/feedback/models.html +++ b/docs/_build/html/_modules/feedback/models.html @@ -153,7 +153,7 @@

Source code for feedback.models

 from django.db import models
 from django.conf import settings
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 STATUS_CODES = (
     (1, _('Open')),
diff --git a/docs/_build/html/_modules/feedback/views.html b/docs/_build/html/_modules/feedback/views.html
index c2ba3fb39..89f960e85 100644
--- a/docs/_build/html/_modules/feedback/views.html
+++ b/docs/_build/html/_modules/feedback/views.html
@@ -153,7 +153,7 @@
   

Source code for feedback.views

 from django.contrib.messages.views import SuccessMessageMixin
 from django.urls import reverse
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.views import generic
 
 from braces.views import LoginRequiredMixin
diff --git a/docs/_build/html/_modules/interventions/models.html b/docs/_build/html/_modules/interventions/models.html
index cdf557f27..1bd8a1d0b 100644
--- a/docs/_build/html/_modules/interventions/models.html
+++ b/docs/_build/html/_modules/interventions/models.html
@@ -153,7 +153,7 @@
   

Source code for interventions.models

 from __future__ import unicode_literals
 from django.db import models
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.models import SettingModel
 from studies.models import Study
diff --git a/docs/_build/html/_modules/interventions/utils.html b/docs/_build/html/_modules/interventions/utils.html
index 571c0fd6a..ef1c8b479 100644
--- a/docs/_build/html/_modules/interventions/utils.html
+++ b/docs/_build/html/_modules/interventions/utils.html
@@ -152,7 +152,7 @@
             
   

Source code for interventions.utils

 from django.urls import reverse
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 
 from core.utils import AvailableURL
 
diff --git a/docs/_build/html/_modules/interventions/views.html b/docs/_build/html/_modules/interventions/views.html
index d9e3a2f01..eb066498e 100644
--- a/docs/_build/html/_modules/interventions/views.html
+++ b/docs/_build/html/_modules/interventions/views.html
@@ -152,7 +152,7 @@
             
   

Source code for interventions.views

 from django.urls import reverse
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import CreateView, UpdateView, AllowErrorsOnBackbuttonMixin
 from studies.models import Study
diff --git a/docs/_build/html/_modules/observations/models.html b/docs/_build/html/_modules/observations/models.html
index 8a21fbe92..fc01333fa 100644
--- a/docs/_build/html/_modules/observations/models.html
+++ b/docs/_build/html/_modules/observations/models.html
@@ -156,7 +156,7 @@ 

Source code for observations.models

 from django.core.validators import MaxValueValidator
 from django.db import models
 from django.utils.encoding import python_2_unicode_compatible
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.models import SettingModel
 from core.validators import validate_pdf_or_doc
diff --git a/docs/_build/html/_modules/observations/utils.html b/docs/_build/html/_modules/observations/utils.html
index 299c1537d..0a4da2c4e 100644
--- a/docs/_build/html/_modules/observations/utils.html
+++ b/docs/_build/html/_modules/observations/utils.html
@@ -152,7 +152,7 @@
             
   

Source code for observations.utils

 from django.urls import reverse
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 
 from core.utils import AvailableURL
 
diff --git a/docs/_build/html/_modules/observations/views.html b/docs/_build/html/_modules/observations/views.html
index 6d3ab2a78..6df9b6d94 100644
--- a/docs/_build/html/_modules/observations/views.html
+++ b/docs/_build/html/_modules/observations/views.html
@@ -152,7 +152,7 @@
             
   

Source code for observations.views

 from django.urls import reverse
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import CreateView, UpdateView, AllowErrorsOnBackbuttonMixin
 from fetc import settings
diff --git a/docs/_build/html/_modules/proposals/forms.html b/docs/_build/html/_modules/proposals/forms.html
index 6581e514d..98df63d7c 100644
--- a/docs/_build/html/_modules/proposals/forms.html
+++ b/docs/_build/html/_modules/proposals/forms.html
@@ -158,7 +158,7 @@ 

Source code for proposals.forms

 from django.contrib.auth import get_user_model
 from django.db.models import Q
 from django.utils.safestring import mark_safe
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.forms import ConditionalModelForm, SoftValidationMixin
 from core.models import DOUBT, NO, YES, YES_NO_DOUBT
diff --git a/docs/_build/html/_modules/proposals/models.html b/docs/_build/html/_modules/proposals/models.html
index b39325fdd..4305c1f4b 100644
--- a/docs/_build/html/_modules/proposals/models.html
+++ b/docs/_build/html/_modules/proposals/models.html
@@ -159,7 +159,7 @@ 

Source code for proposals.models

 from django.core.validators import MaxValueValidator, MinValueValidator
 from django.db import models
 from django.utils.encoding import python_2_unicode_compatible
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.models import YES, YES_NO_DOUBT
 from core.validators import MaxWordsValidator, validate_pdf_or_doc
diff --git a/docs/_build/html/_modules/proposals/utils/proposal_utils.html b/docs/_build/html/_modules/proposals/utils/proposal_utils.html
index ba86b111e..4884affb1 100644
--- a/docs/_build/html/_modules/proposals/utils/proposal_utils.html
+++ b/docs/_build/html/_modules/proposals/utils/proposal_utils.html
@@ -161,7 +161,7 @@ 

Source code for proposals.utils.proposal_utils

from django.core.mail import send_mail from django.urls import reverse from django.template.loader import render_to_string -from django.utils.translation import activate, get_language, ugettext as _ +from django.utils.translation import activate, get_language, gettext as _ from easy_pdf.rendering import render_to_pdf diff --git a/docs/_build/html/_modules/proposals/utils/validate_proposal.html b/docs/_build/html/_modules/proposals/utils/validate_proposal.html index f945429c9..063aa49ae 100644 --- a/docs/_build/html/_modules/proposals/utils/validate_proposal.html +++ b/docs/_build/html/_modules/proposals/utils/validate_proposal.html @@ -168,7 +168,7 @@

Source code for proposals.utils.validate_proposal

from ..forms import ProposalForm, WmoForm, StudyStartForm from ..models import Proposal -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.urls import reverse_lazy as reverse diff --git a/docs/_build/html/_modules/proposals/views/proposal_views.html b/docs/_build/html/_modules/proposals/views/proposal_views.html index 5185e8cfc..7eeefffdb 100644 --- a/docs/_build/html/_modules/proposals/views/proposal_views.html +++ b/docs/_build/html/_modules/proposals/views/proposal_views.html @@ -158,7 +158,7 @@

Source code for proposals.views.proposal_views

from django.conf import settings from django.db.models import Q from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from easy_pdf.views import PDFTemplateResponseMixin, PDFTemplateView diff --git a/docs/_build/html/_modules/proposals/views/study_views.html b/docs/_build/html/_modules/proposals/views/study_views.html index 4d39e2371..b3cd93fa9 100644 --- a/docs/_build/html/_modules/proposals/views/study_views.html +++ b/docs/_build/html/_modules/proposals/views/study_views.html @@ -154,7 +154,7 @@

Source code for proposals.views.study_views

 # -*- encoding: utf-8 -*-
 
 from django.urls import reverse
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import AllowErrorsOnBackbuttonMixin, UpdateView, FormSetUpdateView
 from studies.models import Documents, Study
diff --git a/docs/_build/html/_modules/proposals/views/wmo_views.html b/docs/_build/html/_modules/proposals/views/wmo_views.html
index fb12b9a8b..7bd3e5a78 100644
--- a/docs/_build/html/_modules/proposals/views/wmo_views.html
+++ b/docs/_build/html/_modules/proposals/views/wmo_views.html
@@ -157,7 +157,7 @@ 

Source code for proposals.views.wmo_views

 from django.http import JsonResponse
 from django.views import generic
 from django.views.decorators.csrf import csrf_exempt
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.models import YES, DOUBT
 from core.views import CreateView, UpdateView, AllowErrorsOnBackbuttonMixin
diff --git a/docs/_build/html/_modules/reviews/forms.html b/docs/_build/html/_modules/reviews/forms.html
index 774920cfe..4592a6968 100644
--- a/docs/_build/html/_modules/reviews/forms.html
+++ b/docs/_build/html/_modules/reviews/forms.html
@@ -153,7 +153,7 @@
   

Source code for reviews.forms

 from django import forms
 from django.contrib.auth.models import Group
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.conf import settings
 from core.forms import ConditionalModelForm
 from core.utils import YES_NO, get_reviewers_from_group
diff --git a/docs/_build/html/_modules/reviews/mixins.html b/docs/_build/html/_modules/reviews/mixins.html
index 3ed451a0c..e803778fb 100644
--- a/docs/_build/html/_modules/reviews/mixins.html
+++ b/docs/_build/html/_modules/reviews/mixins.html
@@ -156,7 +156,7 @@ 

Source code for reviews.mixins

 from django.utils.functional import cached_property
 from django.views.generic.base import ContextMixin
 from django.views.generic.detail import SingleObjectMixin
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 
 from .models import Decision, Review
 from .utils import auto_review
diff --git a/docs/_build/html/_modules/reviews/models.html b/docs/_build/html/_modules/reviews/models.html
index 6fbbf1406..80b00da0e 100644
--- a/docs/_build/html/_modules/reviews/models.html
+++ b/docs/_build/html/_modules/reviews/models.html
@@ -156,7 +156,7 @@ 

Source code for reviews.models

 from django.conf import settings
 from django.contrib.auth import get_user_model
 from django.db import models
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.utils import timezone
 from django.utils.encoding import python_2_unicode_compatible
 
diff --git a/docs/_build/html/_modules/reviews/utils.html b/docs/_build/html/_modules/reviews/utils.html
index e4af93b2e..fe0c5fb0e 100644
--- a/docs/_build/html/_modules/reviews/utils.html
+++ b/docs/_build/html/_modules/reviews/utils.html
@@ -156,7 +156,7 @@ 

Source code for reviews.utils

 from django.core.mail import send_mail
 from django.urls import reverse
 from django.template.loader import render_to_string
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 from django.utils import timezone
 
 from core.models import YES, DOUBT
diff --git a/docs/_build/html/_modules/studies/forms.html b/docs/_build/html/_modules/studies/forms.html
index 80d8d54c7..524a2f1cb 100644
--- a/docs/_build/html/_modules/studies/forms.html
+++ b/docs/_build/html/_modules/studies/forms.html
@@ -155,7 +155,7 @@ 

Source code for studies.forms

 
 from django import forms
 from django.utils.safestring import mark_safe
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.forms import ConditionalModelForm, SoftValidationMixin
 from core.models import DOUBT, YES, YES_NO_DOUBT
diff --git a/docs/_build/html/_modules/studies/models.html b/docs/_build/html/_modules/studies/models.html
index 48a066f0e..e0caf057d 100644
--- a/docs/_build/html/_modules/studies/models.html
+++ b/docs/_build/html/_modules/studies/models.html
@@ -157,7 +157,7 @@ 

Source code for studies.models

 from django.db import models
 from django.db.models import Q
 from django.utils.safestring import mark_safe
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.utils.encoding import python_2_unicode_compatible
 
 from core.models import YES_NO_DOUBT
diff --git a/docs/_build/html/_modules/studies/utils.html b/docs/_build/html/_modules/studies/utils.html
index 78727a70e..a67412f68 100644
--- a/docs/_build/html/_modules/studies/utils.html
+++ b/docs/_build/html/_modules/studies/utils.html
@@ -154,7 +154,7 @@ 

Source code for studies.utils

 from __future__ import division
 
 from django.urls import reverse
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 
 from core.utils import AvailableURL
 from interventions.utils import intervention_url, copy_intervention_to_study
diff --git a/docs/_build/html/_modules/studies/views/session_views.html b/docs/_build/html/_modules/studies/views/session_views.html
index 36b0b8706..a4bc1b8dc 100644
--- a/docs/_build/html/_modules/studies/views/session_views.html
+++ b/docs/_build/html/_modules/studies/views/session_views.html
@@ -154,7 +154,7 @@ 

Source code for studies.views.session_views

 # -*- encoding: utf-8 -*-
 
 from django.urls import reverse
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import AllowErrorsOnBackbuttonMixin, UpdateView
 from tasks.models import Session
diff --git a/docs/_build/html/_modules/studies/views/study_views.html b/docs/_build/html/_modules/studies/views/study_views.html
index 27c79bd94..2c88a6676 100644
--- a/docs/_build/html/_modules/studies/views/study_views.html
+++ b/docs/_build/html/_modules/studies/views/study_views.html
@@ -158,7 +158,7 @@ 

Source code for studies.views.study_views

 from django.http import JsonResponse
 from django.views import generic
 from django.views.decorators.csrf import csrf_exempt
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import AllowErrorsOnBackbuttonMixin, UpdateView
 from core.utils import string_to_bool
diff --git a/docs/_build/html/_modules/tasks/forms.html b/docs/_build/html/_modules/tasks/forms.html
index c0ed1cb39..4bb245f84 100644
--- a/docs/_build/html/_modules/tasks/forms.html
+++ b/docs/_build/html/_modules/tasks/forms.html
@@ -155,7 +155,7 @@ 

Source code for tasks.forms

 
 from django import forms
 from django.utils.safestring import mark_safe
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.forms import ConditionalModelForm, SoftValidationMixin
 from core.utils import YES_NO
diff --git a/docs/_build/html/_modules/tasks/models.html b/docs/_build/html/_modules/tasks/models.html
index cb97b0051..3b63fb414 100644
--- a/docs/_build/html/_modules/tasks/models.html
+++ b/docs/_build/html/_modules/tasks/models.html
@@ -154,7 +154,7 @@ 

Source code for tasks.models

 from __future__ import unicode_literals
 from django.db import models
 from django.core.validators import MinValueValidator
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 from django.utils.encoding import python_2_unicode_compatible
 
 from core.models import SettingModel
diff --git a/docs/_build/html/_modules/tasks/utils.html b/docs/_build/html/_modules/tasks/utils.html
index dd69453b0..ead4f21ee 100644
--- a/docs/_build/html/_modules/tasks/utils.html
+++ b/docs/_build/html/_modules/tasks/utils.html
@@ -154,7 +154,7 @@ 

Source code for tasks.utils

 from __future__ import division
 
 from django.urls import reverse
-from django.utils.translation import ugettext as _
+from django.utils.translation import gettext as _
 
 from core.utils import AvailableURL
 
diff --git a/docs/_build/html/_modules/tasks/views/session_views.html b/docs/_build/html/_modules/tasks/views/session_views.html
index d7d2bfad6..207d93ba6 100644
--- a/docs/_build/html/_modules/tasks/views/session_views.html
+++ b/docs/_build/html/_modules/tasks/views/session_views.html
@@ -155,7 +155,7 @@ 

Source code for tasks.views.session_views

 
 from django.urls import reverse
 from django.http import HttpResponseRedirect
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import AllowErrorsOnBackbuttonMixin, UpdateView, DeleteView
 from ..forms import TaskStartForm, TaskEndForm
diff --git a/docs/_build/html/_modules/tasks/views/task_views.html b/docs/_build/html/_modules/tasks/views/task_views.html
index a23186ab6..4566f088f 100644
--- a/docs/_build/html/_modules/tasks/views/task_views.html
+++ b/docs/_build/html/_modules/tasks/views/task_views.html
@@ -155,7 +155,7 @@ 

Source code for tasks.views.task_views

 
 from django.urls import reverse
 from django.http import HttpResponseRedirect
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 from core.views import AllowErrorsOnBackbuttonMixin, UpdateView, DeleteView
 from ..forms import TaskForm
diff --git a/faqs/models.py b/faqs/models.py
index 2e68ddb0e..0b207994c 100644
--- a/faqs/models.py
+++ b/faqs/models.py
@@ -1,5 +1,5 @@
 from django.db import models
-from django.utils.translation import ugettext_lazy as _
+from django.utils.translation import gettext_lazy as _
 
 
 class Faq(models.Model):
diff --git a/faqs/templates/faqs/faq_list.html b/faqs/templates/faqs/faq_list.html
index c86f6d1f8..4fb42f0a8 100644
--- a/faqs/templates/faqs/faq_list.html
+++ b/faqs/templates/faqs/faq_list.html
@@ -1,4 +1,4 @@
-{% extends "base/base.html" %}
+{% extends "base/fetc_base.html" %}
 
 {% load i18n %}
 
@@ -7,7 +7,7 @@
 {% endblock %}
 
 {% block content %}
-    
+

{% trans "Frequently Asked Questions" %}

{% for faq in faqs %} diff --git a/fetc/settings.py b/fetc/settings.py index b76c91907..6a7104ba8 100644 --- a/fetc/settings.py +++ b/fetc/settings.py @@ -14,7 +14,7 @@ from django.core.exceptions import ImproperlyConfigured from django.urls import reverse_lazy -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ # Build paths inside the project like this: os.path.join(BASE_DIR, ...) BASE_DIR = os.path.dirname(os.path.dirname(__file__)) @@ -32,18 +32,28 @@ # Application definition INSTALLED_APPS = [ + # Main app + "main", + # CDH Core libraries + "cdh.core", + "cdh.vue", + "cdh.rest", + # Django supplied apps "django.contrib.auth", "django.contrib.contenttypes", "django.contrib.sessions", "django.contrib.messages", "django.contrib.staticfiles", + # External apps "menu", "debug_toolbar", "django_extensions", "rest_framework", - "main", - "uil.core", - "uil.vue", + "django.contrib.admin", + "django_user_agents", + "modeltranslation", + "impersonate", + # Other local apps "proposals", "studies", "tasks", @@ -51,10 +61,6 @@ "observations", "reviews", "faqs", - "modeltranslation", - "impersonate", - "django.contrib.admin", - "django_user_agents", ] MIDDLEWARE = [ diff --git a/fetc/urls.py b/fetc/urls.py index 3e2ef8418..f00ebbb6a 100644 --- a/fetc/urls.py +++ b/fetc/urls.py @@ -36,8 +36,8 @@ path("admin/", admin.site.urls), path("impersonate/", include("impersonate.urls")), path("i18n/", include("django.conf.urls.i18n")), - path("uilcore/", include("uil.core.urls")), - path("vue/", include("uil.vue.urls")), + path("cdhcore/", include("cdh.core.urls")), + path("vue/", include("cdh.vue.urls")), ] if "debug_toolbar" in settings.INSTALLED_APPS and settings.DEBUG: diff --git a/interventions/models.py b/interventions/models.py index ecb027ce7..c4e55482f 100644 --- a/interventions/models.py +++ b/interventions/models.py @@ -1,5 +1,5 @@ from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.models import SettingModel from studies.models import Study diff --git a/interventions/templates/interventions/intervention_form.html b/interventions/templates/interventions/intervention_form.html index a28285223..1fcc3cf22 100644 --- a/interventions/templates/interventions/intervention_form.html +++ b/interventions/templates/interventions/intervention_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -40,7 +40,7 @@ {% endblock %} {% block content %} -
+
{% with nav_items=study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/interventions/utils.py b/interventions/utils.py index de7cf4921..1ddebd2e3 100644 --- a/interventions/utils.py +++ b/interventions/utils.py @@ -1,5 +1,5 @@ from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from main.utils import AvailableURL diff --git a/interventions/views.py b/interventions/views.py index d1b3e79af..0b23ba874 100644 --- a/interventions/views.py +++ b/interventions/views.py @@ -1,5 +1,5 @@ from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import CreateView, UpdateView, AllowErrorsOnBackbuttonMixin from studies.models import Study diff --git a/locale/en/LC_MESSAGES/django.po b/locale/en/LC_MESSAGES/django.po index 4af320ac4..ac9361697 100644 --- a/locale/en/LC_MESSAGES/django.po +++ b/locale/en/LC_MESSAGES/django.po @@ -6,7 +6,7 @@ msgid "" msgstr "" "Project-Id-Version: \n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2024-04-03 12:31+0200\n" +"POT-Creation-Date: 2024-04-23 12:50+0200\n" "PO-Revision-Date: 2024-04-03 12:32+0200\n" "Last-Translator: Anna Asbury \n" "Language-Team: \n" @@ -17,7 +17,7 @@ msgstr "" "Plural-Forms: nplurals=2; plural=(n != 1);\n" "X-Generator: Poedit 2.4.1\n" -#: faqs/menus.py:7 main/templates/main/index.html:187 +#: faqs/menus.py:7 main/templates/main/index.html:137 msgid "FETC-GW website" msgstr "FEtC-H website" @@ -29,12 +29,12 @@ msgstr "https://fetc-gw.wp.hum.uu.nl/en/" msgid "Reglement FETC-GW" msgstr "Regulations FEtC-H" -#: faqs/menus.py:13 main/templates/main/index.html:190 +#: faqs/menus.py:13 #: proposals/templates/proposals/proposal_start_pre_approved.html:11 msgid "https://fetc-gw.wp.hum.uu.nl/reglement-fetc-gw/" msgstr "https://fetc-gw.wp.hum.uu.nl/en/regulations-fetc-h/" -#: faqs/menus.py:17 main/templates/main/index.html:194 +#: faqs/menus.py:17 main/templates/main/index.html:145 #: proposals/templates/proposals/study_consent.html:8 #: proposals/templates/proposals/translated_consent_forms.html:7 #: proposals/utils/pdf_diff_logic.py:878 @@ -63,11 +63,11 @@ msgstr "FAQ" msgid "Frequently Asked Questions" msgstr "Frequently Asked Questions" -#: fetc/settings.py:129 +#: fetc/settings.py:135 msgid "Nederlands" msgstr "Dutch" -#: fetc/settings.py:130 +#: fetc/settings.py:136 msgid "Engels" msgstr "English" @@ -183,27 +183,14 @@ msgstr "Interventional research" msgid "Interventie opgeslagen" msgstr "Intervention saved" -#: main/forms/conditional_form.py:11 main/forms/conditional_form.py:20 -#: main/forms/conditional_form.py:31 main/forms/conditional_form.py:42 -#: main/forms/conditional_form.py:58 main/forms/mixins.py:81 -#: proposals/forms.py:614 proposals/forms.py:699 proposals/forms.py:720 +#: main/forms/conditional_form.py:12 main/forms/conditional_form.py:21 +#: main/forms/conditional_form.py:32 main/forms/conditional_form.py:43 +#: main/forms/conditional_form.py:59 main/forms/mixins.py:84 +#: proposals/forms.py:629 proposals/forms.py:714 proposals/forms.py:735 #: studies/forms.py:137 tasks/forms.py:104 msgid "Dit veld is verplicht." msgstr "This field is required." -#: main/menus.py:6 main/templates/main/index.html:7 -#: main/templates/main/index.html:53 main/templates/main/landing.html:33 -msgid "Startpagina" -msgstr "Start page" - -#: main/menus.py:11 -msgid "Log in" -msgstr "Log in" - -#: main/menus.py:17 main/templates/base/login_header.html:7 -msgid "Log uit" -msgstr "Log out" - #: main/models.py:8 main/utils.py:16 proposals/utils/pdf_diff_logic.py:244 msgid "ja" msgstr "yes" @@ -290,9 +277,9 @@ msgstr "Proposed title" msgid "Fase" msgstr "Phase" -#: main/templates/auth/user_detail.html:40 proposals/api/views.py:22 -#: proposals/api/views.py:89 proposals/api/views.py:112 -#: proposals/api/views.py:146 +#: main/templates/auth/user_detail.html:40 proposals/api/views.py:20 +#: proposals/api/views.py:87 proposals/api/views.py:110 +#: proposals/api/views.py:144 #: proposals/templates/proposals/vue_templates/proposal_archive_list.html:102 #: proposals/templates/proposals/vue_templates/proposal_list.html:161 #: reviews/api/views.py:51 reviews/api/views.py:285 reviews/api/views.py:346 @@ -381,53 +368,26 @@ msgstr "Send confirmation letter" msgid "Bevestigingsbrief verstuurd" msgstr "Confirmation sent" -#: main/templates/base/form_buttons.html:9 -msgid "<< Opslaan en vorige stap" -msgstr "<< Save and go back to previous step" +#: main/templates/base/fetc_base.html:8 +msgid "FETC-GW" +msgstr "FEtC-H" -#: main/templates/base/form_buttons.html:13 -#: main/templates/base/form_buttons.html:16 -#: main/templates/base/form_buttons.html:20 -#: main/templates/base/form_buttons.html:24 -msgid "Terug naar begin aanvraag" -msgstr "Return to start of application" +#: main/templates/base/fetc_base.html:26 +msgid "FETC-GW Portal" +msgstr "FEtC-H Portal" -#: main/templates/base/form_buttons.html:29 -msgid "Terug naar begin traject" -msgstr "Back to the beginning of the trajectory" +#: main/templates/base/fetc_base.html:34 +msgid "Log uit" +msgstr "Log out" -#: main/templates/base/form_buttons.html:33 -msgid "Terug naar begin sessie" -msgstr "Back to the beginning of the session" +#: main/templates/base/form_buttons.html:8 +msgid "<< Opslaan en vorige stap" +msgstr "<< Save and go back to previous step" -#: main/templates/base/form_buttons.html:37 +#: main/templates/base/form_buttons.html:11 msgid "Opslaan en volgende stap >>" msgstr "Save and go to next step >>" -#: main/templates/base/login_header.html:6 -msgid "Welkom {}" -msgstr "Welcome {}" - -#: main/templates/base/sidebar.html:29 -msgid "Toon voortgang" -msgstr "Show progress" - -#: main/templates/base/sidebar.html:32 -msgid "Sluiten" -msgstr "Close" - -#: main/templates/base/sidebar.html:33 -msgid "Voortgang" -msgstr "Progress" - -#: main/templates/base/site_header.html:3 -msgid "Portal FETC - Geesteswetenschappen" -msgstr "Portal FEtC – Humanities" - -#: main/templates/base/site_title.html:3 -msgid "FETC-GW" -msgstr "FEtC-H" - #: main/templates/error/400.html:10 main/templates/error/500.html:8 msgid "Server error" msgstr "Server error" @@ -557,40 +517,12 @@ msgstr "" "Try to explain what you were doing and note the page that you were on, if " "you can." -#: main/templates/main/index.html:18 -msgid "" -"Deze portal is bedoeld voor medewerkers (en studenten) van de Faculteit " -"Geesteswetenschappen." -msgstr "" -"This portal is intended for employees (and students) of the Faculty of " -"Humanities." - -#: main/templates/main/index.html:23 -msgid "Volgens onze gegevens werk/studeer je bij de" -msgstr "According to our information, you work/study at the" - -#: main/templates/main/index.html:28 -msgid "" -"Volgens onze gegevens werk/studeer je bij een andere faculteit of dienst." -msgstr "According to our data, you work/study at another faculty or service." - -#: main/templates/main/index.html:32 -msgid "" -"Controleer of je inderdaad een aanvraag wilt indienen bij de Facultaire " -"Ethische Toetsingscommissie van Geesteswetenschappen." -msgstr "" -"Please check whether you indeed want to submit an application to the Faculty " -"Ethics Assessment Committee – Humanities." - -#: main/templates/main/index.html:37 -msgid "" -"Als je vermoedt dat dit incorrect is, neem dan contact op met portalsupport.gw@uu.nl." -msgstr "" -"If you suspect this is incorrect, please contact support at portalsupport.gw@uu.nl. " +#: main/templates/main/index.html:7 main/templates/main/index.html:13 +#: main/templates/main/landing.html:29 +msgid "Startpagina" +msgstr "Start page" -#: main/templates/main/index.html:59 +#: main/templates/main/index.html:22 msgid "" "Formele goedkeuring door één van beide kamers van de FETC-GW (middels een " "formele goedkeuringsbrief) is vereist voor mensgebonden onderzoek binnen de " @@ -605,7 +537,7 @@ msgstr "" "even to recruiting participants. Therefore, always wait for the letter of " "approval before starting research activities." -#: main/templates/main/index.html:64 +#: main/templates/main/index.html:31 msgid "" "NB: Goedgekeurde aanvragen komen in het archief van deze portal te staan, " "zie het menu hierboven. Dit archief is toegankelijk voor iedereen met een " @@ -615,24 +547,21 @@ msgstr "" "studying or working at the Faculty of Humanities with a Solis-ID can access " "this archive through the menu bar above." -#: main/templates/main/index.html:69 -msgid "" -"Heb je een vraag over de werking van de portal, ontdek je een foutje, " -"missende functionaliteit, of verkeerde vertaling? Neem dan contact op met " -"portalsupport.gw@uu.nl." -msgstr "" -"If you find some text to be confusing, come across a poor translation, or " -"have any other feedback on the Portal, please don't hesitate to send an " -"email to portalsupport.gw@uu.nl." +#: main/templates/main/index.html:45 +msgid "Bekijk al mijn aanvragen" +msgstr "All my applications" -#: main/templates/main/index.html:75 +#: main/templates/main/index.html:52 +msgid "Voordat je begint" +msgstr "Before you begin" + +#: main/templates/main/index.html:55 #: proposals/templates/proposals/proposal_start.html:16 #: proposals/templates/proposals/proposal_start_practice.html:16 msgid "Check voor het indienen:" msgstr "Before submitting an application, please consult:" -#: main/templates/main/index.html:78 +#: main/templates/main/index.html:58 #: proposals/templates/proposals/proposal_start.html:19 #: proposals/templates/proposals/proposal_start_practice.html:19 msgid "" @@ -642,15 +571,15 @@ msgstr "" "The UU-" "webpage of the FEtC-H for news and upcoming dates." -#: main/templates/main/index.html:84 +#: main/templates/main/index.html:64 msgid "" -"Het reglement van de FETC-GW." +"Het reglement van de Algemene Kamer (AK) of dat van de Linguïstiek Kamer (LK)." msgstr "" -"The regulations of the FEtC-H ." -#: main/templates/main/index.html:90 +#: main/templates/main/index.html:77 msgid "" "Gebruik de juiste (meest recente) model documents for informed consent. (Latest " "version: December 2021)" -#: main/templates/main/index.html:96 -msgid "" -"
  • Voor advies over data management (plannen): datamanagement.gw@uu.nl.
  • Voor " -"advies over privacy zaken: privacy.gw@uu." -"nl.
  • Voor vragen over de procedure: Desiree Capel.
  • Voor vragen over de portal zelf: portalsupport.gw@uu.nl.
  • " -msgstr "" -"
  • For advice on data management: datamanagement.gw@uu.nl.
  • For issues concerning privacy: privacy.gw@uu.nl.
  • For " -"questions on FEtC-H procedure: Desiree " -"Capel.
  • For questions about the functioning of the portal " -"itself: portalsupport.gw@uu.nl." -"
  • " +#: main/templates/main/index.html:90 +msgid "Bekijk mijn aanvragen" +msgstr "View my applications" -#: main/templates/main/index.html:112 -msgid "In deze portal kan je het volgende doen:" -msgstr "In this portal you can do the following:" +#: main/templates/main/index.html:91 proposals/menus.py:9 +msgid "Nieuwe aanvraag starten" +msgstr "Start a new application" -#: main/templates/main/index.html:120 -msgid "Dien een nieuwe aanvraag in" -msgstr "Submit a new proposal" +#: main/templates/main/index.html:93 +msgid "Nieuwe revisie starten" +msgstr "Create new revision" -#: main/templates/main/index.html:124 -msgid "die volledig nieuw is in deze portal;" -msgstr "that is completely new in this portal;" +#: main/templates/main/index.html:95 +msgid "Nieuw amendement starten" +msgstr "Create new amendment" -#: main/templates/main/index.html:127 -msgid "op basis van een kopie van een oude aanvraag;" -msgstr "from a copy of an old proposal;" +#: main/templates/main/index.html:97 proposals/menus.py:112 +#: proposals/views/proposal_views.py:185 +msgid "Archief" +msgstr "Archive" -#: main/templates/main/index.html:130 -msgid "voor (al dan niet goedgekeurde) subsidieaanvragen;" -msgstr "to supplement a grant application" +#: main/templates/main/index.html:102 +msgid "Ondersteuning" +msgstr "Support" -#: main/templates/main/index.html:133 -msgid "die al goedgekeurd is door een andere ethische toetsingscomissie." -msgstr "that has been approved by another ethics committee." +#: main/templates/main/index.html:104 +msgid "" +"FETC-GW secretaris
    Desiree Capel (fetc.gw@uu.nl)" +msgstr "" +"FEtC-H secretary
    Desiree Capel (fetc.gw@uu.nl)" -#: main/templates/main/index.html:138 -msgid "Een aanvraag reviseren" -msgstr "Revise a proposal" +#: main/templates/main/index.html:111 +msgid "Data Management advies
    datamanagement.gw@uu.nl" +msgstr "Data Management advice
    datamanagement.gw@uu.nl" -#: main/templates/main/index.html:142 -msgid "als een revisie, gebaseerd op opmerkingen van de FETC-GW;" -msgstr "as a revision, based on comments of the FEtC-H;" +#: main/templates/main/index.html:118 +msgid "Privacy kwesties/vragen
    privacy.gw@uu.nl" +msgstr "Privacy issues/questions
    privacy.gw@uu.nl" -#: main/templates/main/index.html:145 -msgid "als amendement, wanneer de aanvraag al goedgekeurd is door de FETC-GW." -msgstr "" -"as an amendment, after your proposal has already been approved by the FEtC-H." +#: main/templates/main/index.html:125 +msgid "Technical support
    portalsupport.gw@uu.nl" +msgstr "Technical support
    portalsupport.gw@uu.nl" -#: main/templates/main/index.html:152 -msgid "Bekijk" -msgstr "View" +#: main/templates/main/index.html:133 +msgid "Resources" +msgstr "Resources" -#: main/templates/main/index.html:155 -msgid "mijn conceptaanvragen;" -msgstr "my draft applications;" +#: main/templates/main/index.html:141 +msgid "Reglement van de FETC-GW" +msgstr "Regulations of the FEtC-H" -#: main/templates/main/index.html:158 -msgid "mijn oefenaanvragen;" -msgstr "my practice applications;" +#: main/templates/main/index.html:148 +msgid "Veelgestelde vragen m.b.t. dit portal" +msgstr "Frequently asked questions relating to this portal" -#: main/templates/main/index.html:161 -msgid "mijn ingediende aanvragen;" -msgstr "my submitted applications;" +#: main/templates/main/index.html:153 +msgid "Feedback" +msgstr "Feedback" -#: main/templates/main/index.html:164 -msgid "mijn afgehandelde aanvragen;" -msgstr "my processed applications;" +#: main/templates/main/index.html:155 +msgid "" +"Heb je een vraag over de werking van de portal, ontdek je een foutje, " +"missende functionaliteit, of verkeerde vertaling? Neem dan contact op met portaldev.gw@uu.nl." +msgstr "" +"If you find some text to be confusing, come across a poor translation, or " +"have any other feedback on the Portal, please don't hesitate to send an " +"email to portalsupport.gw@uu.nl." -#: main/templates/main/index.html:167 -msgid "mijn aanvragen als eindverantwoordelijke;" -msgstr "my supervised applications;" +#: main/templates/main/index_parts/faculty_warning.html:7 +msgid "" +"Deze portal is bedoeld voor medewerkers (en studenten) van de Faculteit " +"Geesteswetenschappen." +msgstr "" +"This portal is intended for employees (and students) of the Faculty of " +"Humanities." -#: main/templates/main/index.html:170 -msgid "al mijn aanvragen." -msgstr "all my applications" +#: main/templates/main/index_parts/faculty_warning.html:12 +msgid "Volgens onze gegevens werk/studeer je bij de" +msgstr "According to our information, you work/study at the" -#: main/templates/main/index.html:173 -msgid "FETC-GW archief" -msgstr "FEtC-H archive" +#: main/templates/main/index_parts/faculty_warning.html:17 +msgid "" +"Volgens onze gegevens werk/studeer je bij een andere faculteit of dienst." +msgstr "According to our data, you work/study at another faculty or service." -#: main/templates/main/index.html:176 -msgid "Alle goedgekeurde aanvragen bekijken van de Algemene Kamer" -msgstr "View all processed and approved applications of the General Chamber" +#: main/templates/main/index_parts/faculty_warning.html:21 +msgid "" +"Controleer of je inderdaad een aanvraag wilt indienen bij de Facultaire " +"Ethische Toetsingscommissie van Geesteswetenschappen." +msgstr "" +"Please check whether you indeed want to submit an application to the Faculty " +"Ethics Assessment Committee – Humanities." -#: main/templates/main/index.html:179 -msgid "Alle goedgekeurde aanvragen bekijken van de Linguïstiek Kamer" +#: main/templates/main/index_parts/faculty_warning.html:26 +msgid "" +"Als je vermoedt dat dit incorrect is, neem dan contact op met portalsupport.gw@uu.nl." msgstr "" -"View all processed and approved applications of the Linguistics Chamber" +"If you suspect this is incorrect, please contact support at portalsupport.gw@uu.nl. " -#: main/templates/main/index.html:190 -msgid "Reglement van de FETC-GW" -msgstr "Regulations of the FEtC-H" +#: main/templates/main/index_parts/proposal_box.html:8 +#: proposals/api/views.py:22 proposals/api/views.py:75 +#: proposals/api/views.py:88 proposals/api/views.py:115 +#: proposals/api/views.py:131 +#: proposals/templates/proposals/vue_templates/proposal_archive_list.html:71 +#: proposals/templates/proposals/vue_templates/proposal_list.html:116 +msgid "Laatst bijgewerkt" +msgstr "Last edited" -#: main/templates/main/index.html:197 -msgid "Veelgestelde vragen m.b.t. dit portal" -msgstr "Frequently asked questions relating to this portal" +#: main/templates/main/index_parts/proposal_box.html:10 +#: main/templates/main/index_parts/proposal_box.html:12 +msgid "Ingediend op" +msgstr "Submitted on" + +#: main/templates/main/index_parts/proposal_box.html:21 +msgid "Verder" +msgstr "Continue" -#: main/templates/main/index.html:204 -msgid "Bannerfoto door Kim O'leary" -msgstr "Cover image by Kim O'leary" +#: main/templates/main/index_parts/proposal_box.html:24 +msgid "Beoordeel" +msgstr "Review" #: main/templates/main/landing.html:50 msgid "" @@ -802,9 +749,8 @@ msgstr "Javascript needs to be enabled to see the email address" msgid "Technische ondersteuning" msgstr "Technical support" -#: main/templates/main/landing.html:77 -#: main/templates/registration/login.html:14 -#: main/templates/registration/login.html:37 +#: main/templates/main/landing.html:77 main/templates/registration/login.html:8 +#: main/templates/registration/login.html:33 msgid "Inloggen" msgstr "Log in" @@ -816,7 +762,7 @@ msgstr "" "You need a Solis-ID to log in. If you do not have a Solis ID, please contact " "the secretary of the FEtC-H." -#: main/templates/main/landing.html:87 main/templates/main/landing.html:96 +#: main/templates/main/landing.html:86 main/templates/main/landing.html:94 msgid "Log in met je Solis-ID" msgstr "Log in with your Solis-ID" @@ -835,20 +781,20 @@ msgid "" msgstr "" "Click here to return to the start page." -#: main/templates/registration/login.html:20 +#: main/templates/registration/login.html:16 msgid "" "Gebruikersnaam of wachtwoord incorrect. Probeer het alstublieft opnieuw." msgstr "Username or password incorrect. Please try again." -#: main/templates/registration/login.html:22 +#: main/templates/registration/login.html:18 msgid "Je kan hier inloggen met je Solis-ID en wachtwoord." msgstr "You can log in here with your Solis-ID and password." -#: main/templates/registration/login.html:29 +#: main/templates/registration/login.html:25 msgid "Gebruikersnaam" msgstr "Username" -#: main/templates/registration/login.html:35 +#: main/templates/registration/login.html:31 msgid "Wachtwoord" msgstr "Password" @@ -1051,17 +997,17 @@ msgstr "" "On this page you can edit the forms related to the proposal " "%(title)s(reference number %(ref_number)s), trajectory %(order)s." -#: observations/templates/observations/observation_update_attachments.html:43 +#: observations/templates/observations/observation_update_attachments.html:42 #: proposals/templates/proposals/proposal_confirmation.html:36 #: proposals/templates/proposals/proposal_diff.html:55 -#: proposals/templates/proposals/proposal_update_attachments.html:30 -#: proposals/templates/proposals/proposal_update_date_start.html:33 -#: reviews/templates/reviews/change_chamber_form.html:23 +#: proposals/templates/proposals/proposal_update_attachments.html:29 +#: proposals/templates/proposals/proposal_update_date_start.html:32 +#: reviews/templates/reviews/change_chamber_form.html:20 #: reviews/templates/reviews/decision_form.html:99 #: reviews/templates/reviews/review_assign_form.html:46 #: reviews/templates/reviews/review_close_form.html:40 #: reviews/templates/reviews/review_discontinue_form.html:70 -#: studies/templates/studies/study_update_attachments.html:30 +#: studies/templates/studies/study_update_attachments.html:29 msgid "Terug naar de vorige pagina" msgstr "Back to the previous page" @@ -1074,24 +1020,16 @@ msgstr "Observational research" msgid "Observatie opgeslagen" msgstr "Observation saved" -#: proposals/api/views.py:23 proposals/api/views.py:116 -#: proposals/api/views.py:147 +#: proposals/api/views.py:21 proposals/api/views.py:114 +#: proposals/api/views.py:145 msgid "Datum afgerond" msgstr "Date reviewed" -#: proposals/api/views.py:24 proposals/api/views.py:77 -#: proposals/api/views.py:90 proposals/api/views.py:117 -#: proposals/api/views.py:133 -#: proposals/templates/proposals/vue_templates/proposal_archive_list.html:71 -#: proposals/templates/proposals/vue_templates/proposal_list.html:116 -msgid "Laatst bijgewerkt" -msgstr "Last edited" - -#: proposals/api/views.py:114 +#: proposals/api/views.py:112 msgid "Datum ingediend bij eindverantwoordelijke" msgstr "Date sent to supervisor" -#: proposals/forms.py:58 +#: proposals/forms.py:67 msgid "" "Zijn er nog andere onderzoekers bij deze aanvraag betrokken die " "niet geaffilieerd zijn aan een van de onderzoeksinstituten " @@ -1100,19 +1038,19 @@ msgstr "" "Are there any other researchers involved outside the above-" "mentioned institutes? " -#: proposals/forms.py:79 proposals/validators.py:22 +#: proposals/forms.py:89 proposals/validators.py:22 msgid "Er bestaat al een aanvraag met deze titel." msgstr "There is an existing application with this title." -#: proposals/forms.py:144 +#: proposals/forms.py:158 msgid "Selecteer..." msgstr "Select..." -#: proposals/forms.py:153 +#: proposals/forms.py:167 msgid "Docent" msgstr "Professor" -#: proposals/forms.py:155 +#: proposals/forms.py:169 msgid "" "Vul hier de docent van de cursus in waarbinnen je deze portal moet " "doorlopen. De docent kan na afloop de aanvraag inkijken in de portal. De " @@ -1123,23 +1061,23 @@ msgstr "" "This application will not be published in the semipublic archive of the FEtC-" "H." -#: proposals/forms.py:207 +#: proposals/forms.py:221 msgid "Je dient een promotor/begeleider op te geven." msgstr "You are required to specify a promotor/supervisor." -#: proposals/forms.py:213 +#: proposals/forms.py:227 msgid "Je kunt niet jezelf als promotor/begeleider opgeven." msgstr "You cannot submit yourself as the promotor/supervisor." -#: proposals/forms.py:227 +#: proposals/forms.py:241 msgid "Je hebt jezelf niet als onderzoekers geselecteerd." msgstr "You have not selected yourself." -#: proposals/forms.py:232 +#: proposals/forms.py:246 msgid "Je hebt geen andere onderzoekers geselecteerd." msgstr "You have not selected any other researchers." -#: proposals/forms.py:243 +#: proposals/forms.py:257 msgid "" "Dit veld is verplicht, maar je kunt later terugkomen om " "hem verder in te vullen." @@ -1147,7 +1085,7 @@ msgstr "" "This field is required, but you may choose to come back to this page later " "to fill it in." -#: proposals/forms.py:254 +#: proposals/forms.py:268 msgid "" "Indien je geen toestemming hebt van een andere ethische commissie, dien je " "het normale formulier in te vullen. Ga terug naar de startpagina, en " @@ -1160,23 +1098,23 @@ msgstr "" "page, and select \"Submit a new application that is completely new in this " "portal\" or \"from a copy of an old application.\"" -#: proposals/forms.py:286 +#: proposals/forms.py:300 msgid "Ik maak een oefenaanvraag aan" msgstr "I am creating a practice application" -#: proposals/forms.py:302 proposals/models.py:586 +#: proposals/forms.py:317 proposals/models.py:586 msgid "Te kopiëren aanvraag" msgstr "Application to be copied" -#: proposals/forms.py:304 proposals/models.py:588 +#: proposals/forms.py:319 proposals/models.py:588 msgid "Dit veld toont enkel aanvragen waar je zelf een medeuitvoerende bent." msgstr "This field shows only applications in which you are involved." -#: proposals/forms.py:346 +#: proposals/forms.py:361 msgid "Te reviseren aanvraag" msgstr "Application to be revised" -#: proposals/forms.py:348 +#: proposals/forms.py:363 msgid "" "Dit veld toont enkel ingediende, (nog) niet goedgekeurde aanvragen waar jij " "een medeuitvoerende bent." @@ -1184,70 +1122,70 @@ msgstr "" "This field only shows submitted applications that have not been approved " "(yet) in which you are involved." -#: proposals/forms.py:379 +#: proposals/forms.py:394 msgid "Te amenderen aanvraag" msgstr "Application to be amended" -#: proposals/forms.py:381 +#: proposals/forms.py:396 msgid "" "Dit veld toont enkel goedgekeurde aanvragen waar je zelf een medeuitvoerende " "bent." msgstr "This field shows only approved applications in which you are involved." -#: proposals/forms.py:439 proposals/forms.py:598 proposals/forms.py:630 -#: proposals/forms.py:752 +#: proposals/forms.py:454 proposals/forms.py:613 proposals/forms.py:645 +#: proposals/forms.py:767 msgid "Dit veld is verplicht om verder te gaan." msgstr "This field is required to continue." -#: proposals/forms.py:449 +#: proposals/forms.py:464 msgid "Je dient een instelling op te geven." msgstr "You are required to specify an institution." -#: proposals/forms.py:515 +#: proposals/forms.py:530 msgid "In dit geval is een beslissing van een METC vereist" msgstr "In this case, a decision by a METC is required" -#: proposals/forms.py:524 +#: proposals/forms.py:539 msgid "Naam traject 1" msgstr "Title of trajectory 1" -#: proposals/forms.py:527 +#: proposals/forms.py:542 msgid "Naam traject 2" msgstr "Title of trajectory 2" -#: proposals/forms.py:530 +#: proposals/forms.py:545 msgid "Naam traject 3" msgstr "Title of trajectory 3" -#: proposals/forms.py:533 +#: proposals/forms.py:548 msgid "Naam traject 4" msgstr "Title of trajectory 4" -#: proposals/forms.py:536 +#: proposals/forms.py:551 msgid "Naam traject 5" msgstr "Title of trajectory 5" -#: proposals/forms.py:539 +#: proposals/forms.py:554 msgid "Naam traject 6" msgstr "Title of trajectory 6" -#: proposals/forms.py:542 +#: proposals/forms.py:557 msgid "Naam traject 7" msgstr "Title of trajectory 7" -#: proposals/forms.py:545 +#: proposals/forms.py:560 msgid "Naam traject 8" msgstr "Title of trajectory 8" -#: proposals/forms.py:548 +#: proposals/forms.py:563 msgid "Naam traject 9" msgstr "Title of trajectory 9" -#: proposals/forms.py:551 +#: proposals/forms.py:566 msgid "Naam traject 10" msgstr "Title of trajectory 10" -#: proposals/forms.py:606 +#: proposals/forms.py:621 msgid "" "Als niet dezelfde trajecten worden doorlopen, moeten er minstens twee " "verschillende trajecten zijn." @@ -1255,19 +1193,19 @@ msgstr "" "If different trajectories are used, at least two different trajectories " "should be filled in." -#: proposals/forms.py:641 +#: proposals/forms.py:656 msgid "Nieuwe beoogde startdatum" msgstr "New intended start date" -#: proposals/forms.py:708 +#: proposals/forms.py:723 msgid "Toestemmingsverklaring voor traject {} nog niet toegevoegd." msgstr "Declaration of consent for trajectory {} not yet added." -#: proposals/forms.py:715 +#: proposals/forms.py:730 msgid "Informatiebrief voor traject {} nog niet toegevoegd." msgstr "Information letter for trajectory {} not yet added." -#: proposals/forms.py:729 +#: proposals/forms.py:744 msgid "" "De embargo-periode kan maximaal 2 jaar zijn. Kies een datum binnen 2 jaar " "van vandaag." @@ -1275,14 +1213,10 @@ msgstr "" "The embargo-period can last a maximum of 2 years. Pick a date within 2 years " "from today." -#: proposals/forms.py:761 +#: proposals/forms.py:776 msgid "Vul in in welke talen de formulieren worden vertaald." msgstr "Please fill in the languages" -#: proposals/menus.py:9 -msgid "Nieuwe aanvraag starten" -msgstr "Start a new application" - #: proposals/menus.py:13 msgid "Nieuwe aanvraag starten op basis van een kopie van een oude aanvraag" msgstr "Start a new application based on a copy of an old application" @@ -1355,10 +1289,6 @@ msgstr "View all approved applications of the Linguistics Chamber" msgid "Site-export" msgstr "Site-export" -#: proposals/menus.py:112 proposals/views/proposal_views.py:185 -msgid "Archief" -msgstr "Archive" - #: proposals/mixins.py:21 #, python-format msgid "Aanvraag %(title)s bewerkt" @@ -1838,7 +1768,7 @@ msgstr "Has the METC already come to a decision?" msgid "Upload hier de beslissing van het METC (in .pdf of .doc(x)-formaat)" msgstr "Please upload the decision of METC (in .pdf or .doc(x)-format) here" -#: proposals/models.py:883 +#: proposals/models.py:886 #, python-brace-format msgid "WMO {title}, status {status}" msgstr "WMO {title}, status {status}" @@ -1900,14 +1830,14 @@ msgstr "Delete application" msgid "Weet je zeker dat je de aanvraag %(title)s wilt verwijderen?" msgstr "Are you sure you want to delete the application %(title)s?" -#: proposals/templates/proposals/proposal_confirm_delete.html:20 +#: proposals/templates/proposals/proposal_confirm_delete.html:22 #: proposals/templates/proposals/vue_templates/proposal_list.html:66 #: tasks/templates/tasks/session_confirm_delete.html:20 #: tasks/templates/tasks/task_confirm_delete.html:20 msgid "Verwijderen" msgstr "Delete" -#: proposals/templates/proposals/proposal_confirm_delete.html:21 +#: proposals/templates/proposals/proposal_confirm_delete.html:23 #: proposals/templates/proposals/proposal_copy.html:93 #: tasks/templates/tasks/session_confirm_delete.html:21 #: tasks/templates/tasks/task_confirm_delete.html:21 @@ -2102,22 +2032,25 @@ msgstr "" "funding, provided by Utrecht University." #: proposals/templates/proposals/proposal_data_management.html:46 -msgid "Nuttige informatie:" -msgstr "Useful information:" +msgid "Nuttige workshops:" +msgstr "Recommended workshops" #: proposals/templates/proposals/proposal_data_management.html:48 msgid "" -"Voor vragen over privacy, zoals: \"Wat zijn persoonlijke gegevens?\" of " -"\"Wanneer mag ik mijn onderzoek anoniem noemen?\", raden we je aan het Data " -"Privacy Handboek te raadplegen." -msgstr "For all your questions regarding privacy, e.g.: \"What are personal " -"data?\" or \"When may I call my research anonymous?\", consult the Data " -"Privacy Handbook." +"Als je dit nog niet gedaan hebt, wordt er sterk aangeraden om de volgende " +"workshop te volgen:" +msgstr "If you have not already done so, it is highly recommended you attend: " #: proposals/templates/proposals/proposal_data_management.html:53 msgid "" +"
  • de workshop Quick start to Research Data Management
  • " +msgstr "" +"
  • the workshop Quick start to Research Data Management
  • " + +#: proposals/templates/proposals/proposal_data_management.html:61 +msgid "" "Voor advies op het gebied van data management planning kun je contact " "opnemen met de datamanager GW, Frans de Liagre Böhl via datamanagement.gw@uu.nl." @@ -2127,11 +2060,11 @@ msgstr "" "target=\"_blank\">datamanagement.gw@uu.nl, who is the data manager of " "the Faculty of Humanities." -#: proposals/templates/proposals/proposal_data_management.html:57 +#: proposals/templates/proposals/proposal_data_management.html:65 msgid "Privacy: AVG en GDPR" msgstr "Privacy: AVG and GDPR" -#: proposals/templates/proposals/proposal_data_management.html:59 +#: proposals/templates/proposals/proposal_data_management.html:67 msgid "" "Wanneer je persoonsgebonden data verzamelt, zorg je er voor dat je je houdt " "aan de Algemene Verordening Gegevensbescherming, of AVG. Deze wet is de " @@ -2144,7 +2077,7 @@ msgstr "" "regulation is in line with European GDPR privacy legislation." -#: proposals/templates/proposals/proposal_data_management.html:65 +#: proposals/templates/proposals/proposal_data_management.html:73 msgid "" "De autoriteit persoonsgegevens heeft de workshop Handling personal data in research " +"Voor vragen over privacy, zoals: \"Wat zijn persoonlijke gegevens?\" of " +"\"Wanneer mag ik mijn onderzoek anoniem noemen?\", raden we je aan het Data " +"Privacy Handboek te raadplegen." msgstr "" -"
  • the workshop Handling personal data in research
  • " +"For all your questions regarding privacy, e.g.: \"What are personal data?\" " +"or \"When may I call my research anonymous?\", consult the Data Privacy Handbook." -#: proposals/templates/proposals/proposal_data_management.html:86 +#: proposals/templates/proposals/proposal_data_management.html:87 msgid "" "Voor advies op het gebied van privacy en de AVG kun je contact opnemen met " "de privacy officer van GW via privacy." @@ -2202,7 +2132,7 @@ msgstr "" "to the original application." #: proposals/templates/proposals/proposal_form.html:7 -#: proposals/templates/proposals/proposal_form.html:78 +#: proposals/templates/proposals/proposal_form.html:94 #: proposals/templates/proposals/proposal_form_pre_approved.html:7 #: proposals/templates/proposals/proposal_form_pre_approved.html:83 #: proposals/utils/pdf_diff_logic.py:428 proposals/utils/proposal_utils.py:47 @@ -2213,20 +2143,19 @@ msgstr "" msgid "Algemene informatie over de aanvraag" msgstr "General information about the application" -#: proposals/templates/proposals/proposal_form.html:58 +#: proposals/templates/proposals/proposal_form.html:29 #: proposals/templates/proposals/proposal_form_pre_approved.html:74 #: proposals/templates/proposals/proposal_submit.html:35 msgid "Aantal woorden:" msgstr "Number of words:" -#: proposals/templates/proposals/proposal_form.html:75 -#: proposals/templates/proposals/proposal_submit.html:163 +#: proposals/templates/proposals/proposal_form.html:41 msgid "" -"Je bewerkt op het moment een oefenaanvraag. Deze kan niet ter beoordeling " -"door de FETC-GW worden ingediend." +"Als de beoogde startdatum binnen twee weken van het indienen van de aanvraag " +"ligt, kan de FETC geen officiële goedkeuring meer geven." msgstr "" -"You are currently editing a practice application. These can not be submitted " -"to the FETC-H for review." +"If the intended start date lies within two weeks of submission, the FETC-H " +"will not be able to provide official approval for this proposal." #: proposals/templates/proposals/proposal_form.html:80 msgid "" @@ -2238,13 +2167,14 @@ msgstr "" "supervision. Please note that this form should be filled in as if you were " "that student/PhD candidate. " -#: proposals/templates/proposals/proposal_form.html:110 +#: proposals/templates/proposals/proposal_form.html:88 +#: proposals/templates/proposals/proposal_submit.html:163 msgid "" -"Als de beoogde startdatum binnen twee weken van het indienen van de aanvraag " -"ligt, kan de FETC geen officiële goedkeuring meer geven." +"Je bewerkt op het moment een oefenaanvraag. Deze kan niet ter beoordeling " +"door de FETC-GW worden ingediend." msgstr "" -"If the intended start date lies within two weeks of submission, the FETC-H " -"will not be able to provide official approval for this proposal." +"You are currently editing a practice application. These can not be submitted " +"to the FETC-H for review." #: proposals/templates/proposals/proposal_form_pre_approved.html:85 msgid "" @@ -3039,12 +2969,12 @@ msgid "Revisie/amendement van" msgstr "Revision/amendment of" #: proposals/templates/proposals/wmo_application.html:7 -#: proposals/templates/proposals/wmo_application.html:26 +#: proposals/templates/proposals/wmo_application.html:24 #: proposals/utils/pdf_diff_logic.py:522 msgid "Aanmelding bij de METC" msgstr "Registration with the METC" -#: proposals/templates/proposals/wmo_application.html:34 +#: proposals/templates/proposals/wmo_application.html:27 msgid "" "Zolang je aanvraag nog niet is beoordeeld door de METC, kan je niet verder " "in het aanmeldingsproces." @@ -3053,16 +2983,16 @@ msgstr "" "the application process." #: proposals/templates/proposals/wmo_check.html:7 -#: proposals/templates/proposals/wmo_check.html:27 +#: proposals/templates/proposals/wmo_check.html:23 msgid "WMO-check" msgstr "WMO check" -#: proposals/templates/proposals/wmo_check.html:37 +#: proposals/templates/proposals/wmo_check.html:30 msgid "Opnieuw beginnen" msgstr "Start again" #: proposals/templates/proposals/wmo_form.html:7 -#: proposals/templates/proposals/wmo_form.html:30 +#: proposals/templates/proposals/wmo_form.html:28 #: proposals/utils/pdf_diff_logic.py:497 msgid "" "Ethische toetsing nodig door een Medische Ethische Toetsingscommissie (METC)?" @@ -3333,11 +3263,11 @@ msgstr "long route (4-weeks)" msgid "Direct terug naar aanvrager (Nog niet in behandeling)" msgstr "Return directly to applicant (not yet under review)" -#: reviews/forms.py:34 reviews/menus.py:67 reviews/mixins.py:173 +#: reviews/forms.py:34 reviews/menus.py:67 reviews/mixins.py:174 msgid "Algemene Kamer" msgstr "General Chamber" -#: reviews/forms.py:35 reviews/menus.py:77 reviews/mixins.py:176 +#: reviews/forms.py:35 reviews/menus.py:77 reviews/mixins.py:177 msgid "Linguïstiek Kamer" msgstr "Linguistics Chamber" @@ -3504,7 +3434,7 @@ msgstr "" "Click to make your decision " "(as a supervisor)." -#: reviews/templates/reviews/action_explaination.html:53 +#: reviews/templates/reviews/action_explaination.html:55 msgid "Uitleg secretaris" msgstr "Explanation for secretary" @@ -3579,9 +3509,9 @@ msgstr "Reasons" msgid "Beoordelende kamer wijzigen" msgstr "Change reviewing chamber" -#: reviews/templates/reviews/change_chamber_form.html:21 -#: reviews/templates/reviews/review_assign_form.html:49 -#: reviews/templates/reviews/review_discontinue_form.html:73 +#: reviews/templates/reviews/change_chamber_form.html:19 +#: reviews/templates/reviews/review_assign_form.html:47 +#: reviews/templates/reviews/review_discontinue_form.html:71 msgid "OK" msgstr "OK" @@ -5222,4 +5152,4 @@ msgstr "Task edited" #: tasks/views/task_views.py:56 msgid "Taak verwijderd" -msgstr "Task deleted" \ No newline at end of file +msgstr "Task deleted" diff --git a/main/forms/conditional_form.py b/main/forms/conditional_form.py index 4794df4bc..9772877cd 100644 --- a/main/forms/conditional_form.py +++ b/main/forms/conditional_form.py @@ -1,10 +1,11 @@ +from cdh.core.forms import TemplatedModelForm from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from ..utils import is_empty -class ConditionalModelForm(forms.ModelForm): +class ConditionalModelForm(TemplatedModelForm): def check_empty(self, cleaned_data, f1, error_message=""): is_required = False if not error_message: diff --git a/main/forms/mixins.py b/main/forms/mixins.py index 7c5575e15..d170cefb5 100644 --- a/main/forms/mixins.py +++ b/main/forms/mixins.py @@ -2,7 +2,7 @@ from django.forms.fields import Field, FileField from django.forms.models import InlineForeignKeyField, construct_instance from django.forms.utils import ErrorDict -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ class SoftValidationMixin: @@ -11,6 +11,9 @@ class SoftValidationMixin: validator errors. """ + # Disable the default TemplatedForm behavior of showing valid fields, it will be even more confusing + show_valid_fields = False + _soft_validation_fields = [] def __init__(self, *args, **kwargs): diff --git a/main/menus.py b/main/menus.py index ebf35c80c..cd3032b5f 100644 --- a/main/menus.py +++ b/main/menus.py @@ -1,18 +1,6 @@ from django.urls import reverse from django.utils.translation import gettext_lazy as _ -from django.conf import settings from menu import Menu, MenuItem -Menu.add_item("home", MenuItem(_("Startpagina"), reverse("main:home"), exact_url=True)) - -Menu.add_item( - "footer", - MenuItem( - _("Log in"), settings.LOGIN_URL, check=lambda x: not x.user.is_authenticated - ), -) - -Menu.add_item( - "footer", - MenuItem(_("Log uit"), reverse("logout"), check=lambda x: x.user.is_authenticated), -) +# TODO: decide if we want this +# Menu.add_item("home", MenuItem(_("Startpagina"), reverse("main:home"), exact_url=True)) diff --git a/main/models.py b/main/models.py index bf94d82b0..7195cec6f 100644 --- a/main/models.py +++ b/main/models.py @@ -1,7 +1,7 @@ from django.contrib.auth import get_user_model from django.contrib.auth.models import User from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ class YesNoDoubt(models.TextChoices): diff --git a/main/static/main/images/coverimage-summer_Kim_Oleary.jpg b/main/static/main/images/coverimage-autumn.jpg similarity index 100% rename from main/static/main/images/coverimage-summer_Kim_Oleary.jpg rename to main/static/main/images/coverimage-autumn.jpg diff --git a/main/static/main/images/coverimage-spring.jpg b/main/static/main/images/coverimage-spring.jpg new file mode 100644 index 000000000..bbb44c226 Binary files /dev/null and b/main/static/main/images/coverimage-spring.jpg differ diff --git a/main/static/main/images/coverimage-summer.jpg b/main/static/main/images/coverimage-summer.jpg new file mode 100644 index 000000000..88945c0ec Binary files /dev/null and b/main/static/main/images/coverimage-summer.jpg differ diff --git a/main/static/main/images/coverimage.jpg b/main/static/main/images/coverimage.jpg deleted file mode 100644 index fe1eeb5a5..000000000 Binary files a/main/static/main/images/coverimage.jpg and /dev/null differ diff --git a/main/static/main/style.css b/main/static/main/style.css index 0925d92d7..c3a5bd127 100644 --- a/main/static/main/style.css +++ b/main/static/main/style.css @@ -1,304 +1,4 @@ -#header-img { - float: right; -} - -#content { - margin: .5em; - padding: 1em; - background: none repeat scroll 0% 0% rgb(255, 255, 255); -} - -.pure-menu-custom { - box-shadow: 0 .25em .5em rgba(0, 0, 0, 0.4); - margin-bottom: 2.5em; -} - -#title { - color: gray; -} - -.task_list { - background: rgb(250, 250, 250); - border: 1px solid #eee; - padding: 0em 1em 1em 1em; -} - -.startpage-ul { - list-style: circle; -} - -.startpage-ul li { - margin-top: 3px; -} - -.startpage-ul a { - text-underline-offset: .1em; -} - -form label { - display: inline-block; -} - -.button-grid { - display: grid; - grid-auto-flow: column; - column-gap: 15px; - text-align: center; -} - -.button-grid > .button { - line-height: 1.5em; - padding-top: 1rem; - padding-bottom: 1rem; - padding-right: 10px; - padding-left: 10px; -} - -.form-buttons a, .form-buttons input { - margin-top: 5px; -} - - - -@media (min-width: 768px) -{ - .form-buttons .continue-button { - float: right; - } -} - -/* Displaying the differences between Proposals */ -.proposals-diff { - table-layout: fixed; - width: 100%; - text-align: left; -} - -.proposals-diff-question { - width: 50%; -} - -.proposals-diff-answer { - width: 25%; -} - -.proposals-diff td.diff { - background-color: orange; -} - -.proposals-diff th, .proposals-diff td { - padding: 10px; -} - -/* Form specifics */ -input[name=title] { - width: 20em; -} - -.form-errors { - color: red; -} - -form ul { - list-style-type: none; - padding: 0; - margin: 0; -} - -form th { - font-weight: normal; - width: 45%; - text-align: left; -} - -form tr { - background: transparent !important; - border-bottom: 2px #eee solid; -} - -form tr:last-child { - border-bottom: none; -} - -form tr th, form tr td { - padding: 10px 0; -} - - -form tr td { - padding-left: 20px; -} - -@media (max-width: 870px) { - form tr td { - padding-left: 0; - } -} - -/** Select all titles added by add_title, except if it's in the first row of the table **/ -form table tr:not(:first-child) > th > strong { - display: inline-block; - margin-top: 20px; -} - -.errorlist { - color: red; -} - -form table { - width: 100%; - margin-bottom: 2em; -} - -/* No bullet for list items in tables */ -td li { - list-style-type: none; -} - -a.icon-link { - text-decoration: none; -} - -.exportTable td, .exportTable th { - padding: 2px -} - -.compare ins { - background: lightgreen; - text-decoration: none; -} -.compare del { - background: lightcoral; - text-decoration: none; -} -.document-compare { - margin-top: 10px; - padding-top: 10px; - border-top: 1px solid #ddd; -} - -/** Navigation bar **/ - -.navigation-bar > ul { - list-style: none; - display: flex; - width: 100%; - padding: 0; - margin-top: 40px; - margin-bottom: 30px; -} - -.navigation-bar > ul > li { - flex: 1; - width: auto; - text-align: center; - margin-top: -33px; -} - -.navigation-bar a { - text-decoration: none; -} - -.navigation-content { - border-top: 2px solid #666; -} - -.navigation-content.inactive { - border-color: #999; - color: #999; -} - -.navigation-content.active { - border-color: #ffcd00; - color: #000; -} - -.navigation-bubble { - border: 2px solid #666; - border-radius: 50%; - color: #666; - width: 40px; - height: 40px; - padding-top: 5px; - background: #fff; - margin-top: -21px; - margin-left: calc(50% - 21px); - z-index: 10; - text-align: center; -} - -.inactive .navigation-bubble { - border-color: #999; - color: #999 -} - -.active .navigation-bubble { - border-color: #ffcd00; -} - -.navigation-text { - text-decoration: none; - margin-bottom: -15px; -} - -.navigation-text .dropdown-toggle { - cursor: pointer; -} - -.dropdown-submenu { - position: relative; -} - -.dropdown-submenu > .dropdown-menu { - top: 0; - left: 100%; - margin-top: -6px; - margin-left: -1px; - -webkit-border-radius: 0 6px 6px 6px; - -moz-border-radius: 0 6px 6px; - border-radius: 0 6px 6px 6px; -} - -.dropdown-submenu:hover > .dropdown-menu { - display: block; -} - -.dropdown-submenu > a:after { - display: block; - content: " "; - float: right; - width: 0; - height: 0; - border-color: transparent; - border-style: solid; - border-width: 5px 0 5px 5px; - border-left-color: #ccc; - margin-top: 5px; - margin-right: -10px; -} - -.dropdown-submenu .dropdown-toggle::after { - border-left: .3em solid; - border-top: .3em solid transparent; - border-right: 0; - border-bottom: .3em solid transparent; - vertical-align: inherit; - float: right; - margin-top: 0.5em; -} - -.dropdown-submenu:hover > a:after { - border-left-color: #fff; -} - -.dropdown-submenu.pull-left { - float: none; -} - -.dropdown-submenu.pull-left > .dropdown-menu { - left: -100%; - margin-left: 10px; - -webkit-border-radius: 6px 0 6px 6px; - -moz-border-radius: 6px 0 6px 6px; - border-radius: 6px 0 6px 6px; +.uu-root-container { + --bs-nav-link-font-size: .9rem; + --bs-uu-header-font-size: .9rem; } \ No newline at end of file diff --git a/main/static/main/style.css.bak b/main/static/main/style.css.bak new file mode 100644 index 000000000..0925d92d7 --- /dev/null +++ b/main/static/main/style.css.bak @@ -0,0 +1,304 @@ +#header-img { + float: right; +} + +#content { + margin: .5em; + padding: 1em; + background: none repeat scroll 0% 0% rgb(255, 255, 255); +} + +.pure-menu-custom { + box-shadow: 0 .25em .5em rgba(0, 0, 0, 0.4); + margin-bottom: 2.5em; +} + +#title { + color: gray; +} + +.task_list { + background: rgb(250, 250, 250); + border: 1px solid #eee; + padding: 0em 1em 1em 1em; +} + +.startpage-ul { + list-style: circle; +} + +.startpage-ul li { + margin-top: 3px; +} + +.startpage-ul a { + text-underline-offset: .1em; +} + +form label { + display: inline-block; +} + +.button-grid { + display: grid; + grid-auto-flow: column; + column-gap: 15px; + text-align: center; +} + +.button-grid > .button { + line-height: 1.5em; + padding-top: 1rem; + padding-bottom: 1rem; + padding-right: 10px; + padding-left: 10px; +} + +.form-buttons a, .form-buttons input { + margin-top: 5px; +} + + + +@media (min-width: 768px) +{ + .form-buttons .continue-button { + float: right; + } +} + +/* Displaying the differences between Proposals */ +.proposals-diff { + table-layout: fixed; + width: 100%; + text-align: left; +} + +.proposals-diff-question { + width: 50%; +} + +.proposals-diff-answer { + width: 25%; +} + +.proposals-diff td.diff { + background-color: orange; +} + +.proposals-diff th, .proposals-diff td { + padding: 10px; +} + +/* Form specifics */ +input[name=title] { + width: 20em; +} + +.form-errors { + color: red; +} + +form ul { + list-style-type: none; + padding: 0; + margin: 0; +} + +form th { + font-weight: normal; + width: 45%; + text-align: left; +} + +form tr { + background: transparent !important; + border-bottom: 2px #eee solid; +} + +form tr:last-child { + border-bottom: none; +} + +form tr th, form tr td { + padding: 10px 0; +} + + +form tr td { + padding-left: 20px; +} + +@media (max-width: 870px) { + form tr td { + padding-left: 0; + } +} + +/** Select all titles added by add_title, except if it's in the first row of the table **/ +form table tr:not(:first-child) > th > strong { + display: inline-block; + margin-top: 20px; +} + +.errorlist { + color: red; +} + +form table { + width: 100%; + margin-bottom: 2em; +} + +/* No bullet for list items in tables */ +td li { + list-style-type: none; +} + +a.icon-link { + text-decoration: none; +} + +.exportTable td, .exportTable th { + padding: 2px +} + +.compare ins { + background: lightgreen; + text-decoration: none; +} +.compare del { + background: lightcoral; + text-decoration: none; +} +.document-compare { + margin-top: 10px; + padding-top: 10px; + border-top: 1px solid #ddd; +} + +/** Navigation bar **/ + +.navigation-bar > ul { + list-style: none; + display: flex; + width: 100%; + padding: 0; + margin-top: 40px; + margin-bottom: 30px; +} + +.navigation-bar > ul > li { + flex: 1; + width: auto; + text-align: center; + margin-top: -33px; +} + +.navigation-bar a { + text-decoration: none; +} + +.navigation-content { + border-top: 2px solid #666; +} + +.navigation-content.inactive { + border-color: #999; + color: #999; +} + +.navigation-content.active { + border-color: #ffcd00; + color: #000; +} + +.navigation-bubble { + border: 2px solid #666; + border-radius: 50%; + color: #666; + width: 40px; + height: 40px; + padding-top: 5px; + background: #fff; + margin-top: -21px; + margin-left: calc(50% - 21px); + z-index: 10; + text-align: center; +} + +.inactive .navigation-bubble { + border-color: #999; + color: #999 +} + +.active .navigation-bubble { + border-color: #ffcd00; +} + +.navigation-text { + text-decoration: none; + margin-bottom: -15px; +} + +.navigation-text .dropdown-toggle { + cursor: pointer; +} + +.dropdown-submenu { + position: relative; +} + +.dropdown-submenu > .dropdown-menu { + top: 0; + left: 100%; + margin-top: -6px; + margin-left: -1px; + -webkit-border-radius: 0 6px 6px 6px; + -moz-border-radius: 0 6px 6px; + border-radius: 0 6px 6px 6px; +} + +.dropdown-submenu:hover > .dropdown-menu { + display: block; +} + +.dropdown-submenu > a:after { + display: block; + content: " "; + float: right; + width: 0; + height: 0; + border-color: transparent; + border-style: solid; + border-width: 5px 0 5px 5px; + border-left-color: #ccc; + margin-top: 5px; + margin-right: -10px; +} + +.dropdown-submenu .dropdown-toggle::after { + border-left: .3em solid; + border-top: .3em solid transparent; + border-right: 0; + border-bottom: .3em solid transparent; + vertical-align: inherit; + float: right; + margin-top: 0.5em; +} + +.dropdown-submenu:hover > a:after { + border-left-color: #fff; +} + +.dropdown-submenu.pull-left { + float: none; +} + +.dropdown-submenu.pull-left > .dropdown-menu { + left: -100%; + margin-left: 10px; + -webkit-border-radius: 6px 0 6px 6px; + -moz-border-radius: 6px 0 6px 6px; + border-radius: 6px 0 6px 6px; +} \ No newline at end of file diff --git a/main/templates/auth/user_detail.html b/main/templates/auth/user_detail.html index 6da2e6410..02fc507f7 100644 --- a/main/templates/auth/user_detail.html +++ b/main/templates/auth/user_detail.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load fetc_filters %} {% load get_field_name %} @@ -9,7 +9,7 @@ {% block header_title %}{{ user_object.get_full_name }} - {{ block.super }}{% endblock %} {% block content %} -
    +

    {{ user_object.get_full_name }}

    diff --git a/main/templates/base/fetc_base.html b/main/templates/base/fetc_base.html new file mode 100644 index 000000000..038b80133 --- /dev/null +++ b/main/templates/base/fetc_base.html @@ -0,0 +1,39 @@ +{% extends "base/tool_base.html" %} + +{% load i18n %} +{% load static %} + +{# This is what is appended to #} +{% block header_title %} + {% trans "FETC-GW" %} +{% endblock %} + +{# Any side-wide stuff that needs to placed in <head> #} +{% block html_head %} + <link rel="stylesheet" type="text/css" href="{% static 'main/style.css' %}"> + <script type="text/javascript" + charset="utf8" + src="{% static 'main/js/datepicker-nl.js' %}"></script> + <script type="text/javascript" + charset="utf8" + src="{% static 'main/js/redirect-submit.js' %}"></script> + {% include "base/form_styling.html" %} +{% endblock %} + +{% block uu-header-pre-menu %} + <a href="{% url 'main:home' %}" + class="navbar-text fs-4 text-black text-decoration-none d-none d-lg-flex text-nowrap pe-4"> + {% trans 'FETC-GW Portal' %} + </a> +{% endblock %} + +{% block uu-header-post-menu %} + {% if request.user.is_authenticated %} + <div class="navbar-text text-black border-left text-nowrap ms-3"> + {% with request.user as user %} + {{ user.first_name }} <a href="{% url 'logout' %}">({% trans 'Log uit' %})</a> + {% endwith %} + </div> + {% endif %} + {% include 'base/tool_language_box.html' %} +{% endblock %} diff --git a/main/templates/base/fetc_form_base.html b/main/templates/base/fetc_form_base.html new file mode 100644 index 000000000..07e2893b6 --- /dev/null +++ b/main/templates/base/fetc_form_base.html @@ -0,0 +1,60 @@ +{% extends 'base/fetc_base.html' %} + +{% block content %} + <div class="uu-container"> + {# A block one can use to insert content before the stepper/form container #} + {% block pre-form-container-content %}{% endblock %} + + {# todo: responsive design #} + <div class="col-3"> + {% block stepper %} + {% include "base/stepper.html" %} + {% endblock %} + + </div> + <div class="col-9"> + <form action="" method="post" class="uu-form {% block form-css-classes %}{% endblock %} + " enctype="multipart/form-data"> + {% csrf_token %} + {# A block one can use to add stuff before the actual form, but next to the stepper #} + {% block pre-form %} + <div class="uu-form-text-row"> + <div class="uu-form-text"> + {% block pre-form-text %}{% endblock %} + + </div> + <aside class="uu-form-text-aside"> + {% block pre-form-aside %}{% endblock %} + + </aside> + </div> + {% endblock %} + + {{ form }} + {% block form-buttons %} + <div class="uu-form-text-row"> + <div class="uu-form-text">{% include "base/form_buttons.html" %}</div> + </div> + {% endblock %} + + {# A block one can use to add stuff after the form, but still next to the stepper #} + {% block post-form %} + <div class="uu-form-text-row"> + <div class="uu-form-text"> + {% block post-form-text %}{% endblock %} + + </div> + <aside class="uu-form-text-aside"> + {% block post-form-aside %}{% endblock %} + + </aside> + </div> + {% endblock %} + + </form> + </div> + {# A block one can use to insert content after the stepper/form container #} + {% block post-form-container-content %}{% endblock %} + + </div> +{% endblock %} diff --git a/main/templates/base/form_buttons.html b/main/templates/base/form_buttons.html index e7cd1ed23..1ae0be030 100644 --- a/main/templates/base/form_buttons.html +++ b/main/templates/base/form_buttons.html @@ -1,44 +1,17 @@ {% load i18n %} -<div class="mt-3 mb-3 form-buttons"> - <div class="button-grid"> - {% if not no_back %} - <input class="button" - type="submit" - name="save_back" - value="{% trans '<< Opslaan en vorige stap' %}" /> - {% if proposal %} - {% if proposal.is_pre_assessment %} - <a class="button js-submit-redirect" - href="{% url 'proposals:update_pre' proposal.pk %}">{% trans "Terug naar begin aanvraag" %}</a> - {% elif proposal.is_pre_approved %} - <a class="button js-submit-redirect" - href="{% url 'proposals:update_pre_approved' proposal.pk %}">{% trans "Terug naar begin aanvraag" %}</a> - {% elif proposal.is_practice %} - <a class="button js-submit-redirect" - href="{% url 'proposals:update_practice' proposal.pk %}"> - {% trans "Terug naar begin aanvraag" %} - </a> - {% else %} - <a class="button js-submit-redirect" - href="{% url 'proposals:update' proposal.pk %}">{% trans "Terug naar begin aanvraag" %}</a> - {% endif %} - {% endif %} - {% if study %} - <a class="button js-submit-redirect" - href="{% url 'studies:update' study.pk %}">{% trans "Terug naar begin traject" %}</a> - {% endif %} - {% if session %} - <a class="button js-submit-redirect" - href="{% url 'tasks:start' session.pk %}">{% trans "Terug naar begin sessie" %}</a> - {% endif %} - {% endif %} - {% if not no_forward %} - {% trans 'Opslaan en volgende stap >>' as default_next_text %} - <input class="button button-colored continue-button" - type="submit" - name="save_continue" - value="{{ next_text|default:default_next_text }}" /> - {% endif %} - </div> +<div class="mt-4 mb-3 w-100 d-flex"> + {% if not no_back %} + <input class="btn btn-secondary" + type="submit" + name="save_back" + value="{% trans '<< Opslaan en vorige stap' %}" /> + {% endif %} + {% if not no_forward %} + {% trans 'Opslaan en volgende stap >>' as default_next_text %} + <input class="btn btn-primary continue-button ms-auto" + type="submit" + name="save_continue" + value="{{ next_text|default:default_next_text }}" /> + {% endif %} </div> diff --git a/main/templates/base/form_styling.html b/main/templates/base/form_styling.html index bb0d9dfeb..fa38ae5f6 100644 --- a/main/templates/base/form_styling.html +++ b/main/templates/base/form_styling.html @@ -32,7 +32,7 @@ b_checkboxes.trigger('change'); } - input_b.parents('tr').toggle(check); + input_b.parents('.uu-form-row').toggle(check); }); input_a.change(); } @@ -57,10 +57,10 @@ if(header) { - input_b.parents('tr').prev().toggle(check); + input_b.parents('div').prev().toggle(check); } - input_b.parents('tr').toggle(check); + input_b.parents('.uu-form-row').toggle(check); }); input_a.change(); } @@ -111,7 +111,7 @@ let url = "{% url 'main:check_requires' %}"; let params = {'value': checked_inputs, 'app': app_name, 'model': model_name, 'field': field_name}; let req = $.post(url, params, function(data) { - r_input.parents('tr').toggle(data.result); + r_input.parents('.uu-form-row').toggle(data.result); // If we don't want to show the field, unselect all selected checkboxes of that field (if any) if (data.result === false) { @@ -125,7 +125,7 @@ // Remove header if present if(header) { - r_input.parents('tr').prev().toggle(data.result); + r_input.parents('div').prev().toggle(data.result); } //when the request is done, mark it undefined postrequests.delete(process_identifier); @@ -138,42 +138,11 @@ // Adds a title row to a form field function add_title(field, title) { - var insert = $('<tr>').append($('<th>').append($('<strong>').text(title))).append($('<td>')); - $('#id_' + field).parents('tr').before(insert); + var insert = $('<div>').append($('<h3>').text(title)); + $('#id_' + field).parents('.uu-form-row').before(insert); } $(function() { - // Will put help texts as a tooltip on an information image - $("[id^=id]").each(function() { - var help = $(this).nextAll('.helptext'); - if (help.html()) - { - var label = $("th label[for^='" + $(this).attr('id') + "']").first(); - label.after(` <img src="{% static 'main/images/information.png' %}">`); - label.next().qtip({ - content: { - text: help.html(), - }, - hide: { - fixed: true, - delay: 500, - }, - }); - help.remove(); - } - }); - - // Will remove labels off table headers for checkbox/radio fields - $('input[type="radio"], input[type="checkbox"]').parents('tr').find('th label').contents().unwrap(); - - // Will automatically create tabindices - $('select[name!=language], input[type!=hidden], textarea, .pure-button').each(function(index) { - $(this).attr('tabindex', index + 1) - }); - - // Will set a custom width for the language element - $('select[name="language"] + .select2-container').width('110px'); - // Will make each textarea auto-resize. // Copied from: http://stackoverflow.com/a/25621277 function h(e) { diff --git a/main/templates/base/login_header.html b/main/templates/base/login_header.html deleted file mode 100644 index ed081a8b3..000000000 --- a/main/templates/base/login_header.html +++ /dev/null @@ -1,11 +0,0 @@ -{% load i18n %} -{% load transformat %} - -{% if request.user.is_authenticated %} - {% with request.user as user %} - {% transformat "Welkom {}" user.get_full_name %} - <a href="{% url 'logout' %}">({% trans 'Log uit' %})</a> - {% endwith %} -{% else %} -   {# UI requires a line here #} -{% endif %} diff --git a/main/templates/base/navigation.html b/main/templates/base/navigation.html index caecae092..7a13b063f 100644 --- a/main/templates/base/navigation.html +++ b/main/templates/base/navigation.html @@ -1,69 +1 @@ -{% load fetc_filters %} -{% load uil_filters %} - -{% include 'base/sidebar.html' %} -<div class="navigation-bar hide-xs"> - <ul> - {% counter main_counter create 1 %} - {% for item in nav_items %} - {% if not item.is_title %} - {# First layer, the bar itself #} - <li> - {% counter main_counter store %} - <div class="navigation-content {% if not item.url %}inactive{% endif %} {% if main_counter == active %}active{% endif %} "> - {% if item.url %}<a class="js-submit-redirect" href="{{ item.url }}">{% endif %} - <div class="navigation-bubble">{% counter main_counter value %}</div> - {% if item.url %}</a>{% endif %} - <div class="navigation-text"> - {% if not item.children %} - {{ item.title }} - {% else %} - {# If it has children, create a dropdown instead #} - <div class="dropdown"> - <span class="dropdown-toggle" - type="button" - id="dropdownMenuButton" - data-toggle="dropdown" - aria-haspopup="true" - aria-expanded="false">{{ item.title }}</span> - <div class="dropdown-menu multi-level" - aria-labelledby="dropdownMenuButton"> - {# Second layer (first dropdown) #} - {% for child in item.children %} - {% if not child.children %} - <a href="{{ child.url|default_if_none:"#" }}" - class="dropdown-item js-submit-redirect {% if not child.url %}disabled{% endif %}"> - {{ child.title }} - </a> - {% else %} - {# Third layer (second dropdown) #} - <div class="dropdown-submenu dropdown-item"> - <span class="dropdown-toggle" - type="button" - id="dropdownMenuButton" - data-toggle="dropdown" - aria-haspopup="true" - aria-expanded="false">{{ child.title }}</span> - <div class="dropdown-menu" aria-labelledby="dropdownMenuButton"> - {# Don't support more than 3 layers. This should be enough #} - {% for subchild in child.children %} - <a href="{{ subchild.url|default_if_none:"#" }}" - class="dropdown-item js-submit-redirect {% if not subchild.url %}disabled{% endif %}"> - {{ subchild.title }} - </a> - {% endfor %} - </div> - </div> - {% endif %} - {% endfor %} - </div> - </div> - {% endif %} - </div> - </div> - </li> - {% counter main_counter increment %} - {% endif %} - {% endfor %} - </ul> -</div> +{# TODO: remove when all references are gone #} diff --git a/main/templates/base/sidebar.html b/main/templates/base/sidebar.html deleted file mode 100644 index f4c0bc086..000000000 --- a/main/templates/base/sidebar.html +++ /dev/null @@ -1,80 +0,0 @@ -{% load static %} -{% load i18n %} - -<script type="text/javascript" - charset="utf8" - src="//cdnjs.cloudflare.com/ajax/libs/jquery-sidebar/3.3.2/jquery.sidebar.min.js"></script> -<link rel="stylesheet" - type="text/css" - href="{% static 'main/progress.css' %}"> -<script> -$(function() { - // Add dividers - $('.progress li:even').prepend('<div class="item">'); - - // Set current item and remove previous URLs - $('a[href="{{request.path}}"]').prev().addClass('current'); - - // Sidebar functionality - $('.progress').sidebar({side: 'right'}); - $('.open-progress').click(function() { - $('.progress').show(); - $('.progress').trigger('sidebar:open'); - }); - $('.close-progress').click(function() { - $('.progress').trigger('sidebar:close'); - }); -}); -</script> -<button class="pure-button open-progress show-xs">{% trans "Toon voortgang" %}</button> -<br /> -<div class="progress"> - <button class="pure-button close-progress">{% trans "Sluiten" %}</button> - <h2>{% trans "Voortgang" %}</h2> - <ul> - {% for item in nav_items %} - {% if not item.is_title %} - <li> - {% if item.url %} - <a class="sideBarLink js-submit-redirect {% if item.is_title %}title{% endif %}" - href="{{ item.url }}">{{ item.title }}</a> - {% else %} - <span class="{% if item.is_title %}title{% endif %}">{{ item.title }}</span> - {% endif %} - </li> - <li> - <div class="divider"></div> - </li> - {% for child in item.children %} - <li> - {% if child.url %} - <a class="ml-3 js-submit-redirect sideBarLink {% if child.is_title %}title{% endif %}" - href="{{ child.url }}">{{ child.title }}</a> - {% else %} - <span class="ml-3 {% if child.is_title %}title{% endif %}">{{ child.title }}</span> - {% endif %} - </li> - <li> - <div class="divider"></div> - </li> - {% for subchild in child.children %} - <li> - {% if subchild.url %} - <a class="ml-5 js-submit-redirect sideBarLink" href="{{ subchild.url }}">{{ subchild.title }}</a> - {% else %} - <span class="ml-5">{{ subchild.title }}</span> - {% endif %} - </li> - <li> - <div class="divider"></div> - </li> - {% endfor %} - {% endfor %} - {% else %} - </ul> - <strong>{{ item.title }}</strong> - <ul> - {% endif %} - {% endfor %} - </ul> -</div> diff --git a/main/templates/base/site_header.html b/main/templates/base/site_header.html deleted file mode 100644 index aac33d38d..000000000 --- a/main/templates/base/site_header.html +++ /dev/null @@ -1,3 +0,0 @@ -{% load i18n %} - -{% trans "Portal FETC - Geesteswetenschappen" %} diff --git a/main/templates/base/site_html_head.html b/main/templates/base/site_html_head.html deleted file mode 100644 index 60501b7c9..000000000 --- a/main/templates/base/site_html_head.html +++ /dev/null @@ -1,10 +0,0 @@ -{% load static %} - -<link rel="stylesheet" type="text/css" href="{% static 'main/style.css' %}"> -<script type="text/javascript" - charset="utf8" - src="{% static 'main/js/datepicker-nl.js' %}"></script> -<script type="text/javascript" - charset="utf8" - src="{% static 'main/js/redirect-submit.js' %}"></script> -{% include "base/form_styling.html" %} diff --git a/main/templates/base/site_title.html b/main/templates/base/site_title.html deleted file mode 100644 index 53157f48e..000000000 --- a/main/templates/base/site_title.html +++ /dev/null @@ -1,3 +0,0 @@ -{% load i18n %} - -{% trans "FETC-GW" %} diff --git a/main/templates/base/stepper.html b/main/templates/base/stepper.html new file mode 100644 index 000000000..b16334bbe --- /dev/null +++ b/main/templates/base/stepper.html @@ -0,0 +1,28 @@ +{% load cdh_filters %} + +<div class="stepper"> + <ul> + {% counter counter create 1 %} + {% for url in proposal.available_urls %} + <li> + <a class="stepper-item" href="{{ url.url }}"> + <span class="stepper-bubble stepper-bubble-largest">{% counter counter value %}</span> + <span>{{ url.title }}</span> + </a> + {% if url.children %} + <ul> + {% for child in url.children %} + <li> + <a class="stepper-item" href="{{ child.url }}"> + <span class="stepper-bubble stepper-bubble-normal"></span> + <span>{{ child.title }}</span> + </a> + </li> + {% endfor %} + </ul> + {% endif %} + </li> + {% counter counter increment %} + {% endfor %} + </ul> +</div> diff --git a/main/templates/error/400.html b/main/templates/error/400.html index 8c24478a5..0b01e3bec 100644 --- a/main/templates/error/400.html +++ b/main/templates/error/400.html @@ -1,9 +1,9 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2> {# Technically untrue, but we act like it's our fault when it's actually theirs. #} diff --git a/main/templates/error/403.html b/main/templates/error/403.html index e680da6c4..2ae550829 100644 --- a/main/templates/error/403.html +++ b/main/templates/error/403.html @@ -1,9 +1,9 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans 'Geen toegang' %}</h2> <p>{% trans 'Je hebt geen toegang tot de opgevraagde pagina.' %}</p> diff --git a/main/templates/error/403_csrf.html b/main/templates/error/403_csrf.html index 0afd99004..f30582847 100644 --- a/main/templates/error/403_csrf.html +++ b/main/templates/error/403_csrf.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} @@ -7,7 +7,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans 'Verzoek kon niet geverifieerd worden' %}</h2> <p>{% trans 'Er is iets fout gegaan met het verifiëren van je browser.' %}</p> diff --git a/main/templates/error/404.html b/main/templates/error/404.html index 58af97167..f7e7638c6 100644 --- a/main/templates/error/404.html +++ b/main/templates/error/404.html @@ -1,9 +1,9 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans 'Pagina niet gevonden' %}</h2> <p>{% trans 'Sorry, deze pagina is helaas niet (meer) beschikbaar.' %}</p> diff --git a/main/templates/error/500.html b/main/templates/error/500.html index c28084678..dd28391bc 100644 --- a/main/templates/error/500.html +++ b/main/templates/error/500.html @@ -1,9 +1,9 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans 'Server error' %}</h2> <p> diff --git a/main/templates/main/index.html b/main/templates/main/index.html index 10f923f63..5c361ea0f 100644 --- a/main/templates/main/index.html +++ b/main/templates/main/index.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% load static %} @@ -7,69 +7,49 @@ {% trans "Startpagina" %} - {{ block.super }} {% endblock %} -{% block content %} - <div class="coverimage"> - <img src="{% static 'main/images/coverimage-summer_Kim_Oleary.jpg' %}" /> - </div> - {% if not is_humanities %} - <div class="uu-inner-container mt-1"> - <div class="col-12 alert alert-warning text-body"> - <p> - {% blocktrans trimmed %} - Deze portal is bedoeld voor medewerkers (en studenten) van de Faculteit Geesteswetenschappen. - {% endblocktrans %} - {% if user.faculties.all %} - {# Filters do not like blocktrans, so that value is just outside... #} - {% blocktrans trimmed %} - Volgens onze gegevens werk/studeer je bij de - {% endblocktrans %} - {{ user.faculties.all|join:',' }}. - {% else %} - {% blocktrans trimmed %} - Volgens onze gegevens werk/studeer je bij een andere faculteit of dienst. - {% endblocktrans %} - {% endif %} - {% blocktrans trimmed %} - Controleer of je inderdaad een aanvraag wilt indienen bij de Facultaire Ethische Toetsingscommissie van Geesteswetenschappen. - {% endblocktrans %} - </p> - <p class="mb-0"> - {% blocktrans trimmed %} - Als je vermoedt dat dit incorrect is, neem dan contact op met <a href="mailto:portalsupport.gw@uu.nl">portalsupport.gw@uu.nl</a>. - {% endblocktrans %} - </p> - </div> - </div> - {% endif %} - <div class="uu-inner-container mt-1"> - <div class="col-12"> - {% for message in systemmessage_list %} - <div class="{{ message.css_class }}"> - {% autoescape off %} - {{ message.message }} - {% endautoescape %} - </div> - {% endfor %} - <h3>{% trans "Startpagina" %} - {{ user.get_full_name }}</h3> - </div> +{% block pre-messages-content %} + {% include 'main/index_parts/cover.html' %} + <div class="uu-hero"> + <h2>{% trans "Startpagina" %} - {{ user.get_full_name }}</h2> </div> - <div class="uu-inner-container"> - <div class="col-12"> - <p> - {% blocktrans trimmed %} - Formele goedkeuring door één van beide kamers van de FETC-GW (middels een formele goedkeuringsbrief) is vereist voor mensgebonden onderzoek binnen de Faculteit Geesteswetenschappen. Voorafgaand aan het onderzoek, maar ook voorafgaand aan het rekruteren van deelnemers, moet de aanvraag zijn goedgekeurd. Het is dus van belang om te wachten met de aanvang van het onderzoek tot deze brief ontvangen is. - {% endblocktrans %} - </p> +{% endblock %} + +{% block content %} + {% include "main/index_parts/faculty_warning.html" %} + <div class="uu-container"> + <div class="col-12 col-md-8 pe-5"> <p> {% blocktrans trimmed %} - NB: Goedgekeurde aanvragen komen in het archief van deze portal te staan, zie het menu hierboven. Dit archief is toegankelijk voor iedereen met een Solis-ID die bij de Faculteit Geesteswetenschappen werkt of studeert. + Formele goedkeuring door één van beide kamers van de FETC-GW (middels een formele goedkeuringsbrief) + is vereist voor mensgebonden onderzoek binnen de Faculteit Geesteswetenschappen. Voorafgaand aan het + onderzoek, maar ook voorafgaand aan het rekruteren van deelnemers, moet de aanvraag zijn + goedgekeurd. Het is dus van belang om te wachten met de aanvang van het onderzoek tot deze brief + ontvangen is. {% endblocktrans %} </p> <p> {% blocktrans trimmed %} - Heb je een vraag over de werking van de portal, ontdek je een foutje, missende functionaliteit, of verkeerde vertaling? Neem dan contact op met <a href="mailto:portalsupport.gw@uu.nl">portalsupport.gw@uu.nl</a>. + NB: Goedgekeurde aanvragen komen in het archief van deze portal te staan, zie het menu hierboven. + Dit archief is toegankelijk voor iedereen met een Solis-ID die bij de Faculteit Geesteswetenschappen + werkt of studeert. {% endblocktrans %} </p> + </div> + <div class="col-12 col-md-4"> + {% if proposals %} + {% for proposal in proposals %} + {% include "main/index_parts/proposal_box.html" %} + {% endfor %} + <div class="text-end"> + <a class="btn btn-sm btn-outline-secondary btn-arrow-right" + href="{% url 'proposals:my_archive' %}">{% trans "Bekijk al mijn aanvragen" %}</a> + </div> + {% endif %} + </div> + </div> + <div class="uu-container"> + <div class="col-12"> + <h2>{% trans "Voordat je begint" %}</h2> <ul> <li> {% trans "Check voor het indienen:" %} @@ -82,126 +62,103 @@ <h3>{% trans "Startpagina" %} - {{ user.get_full_name }}</h3> </li> <li> {% blocktrans trimmed %} - Het <a href="https://fetc-gw.wp.hum.uu.nl/reglement-fetc-gw/" target="blank">reglement van de FETC-GW</a>. - {% endblocktrans %} - </li> - </ul> - <li> - {% blocktrans trimmed %} - Gebruik de juiste (meest recente) <a href="https://intranet.uu.nl/documenten-ethische-toetsingscommissie-gw" - target="blank">voorbeelddocumenten</a> voor de <em>informed consent</em>. (de laatstse versie is van <u>december 2021</u>) - </li> - {% endblocktrans %} - </li> - {% blocktrans trimmed %} - <li> - Voor advies over data management (plannen): <a href="mailto:datamanagement.gw@uu.nl">datamanagement.gw@uu.nl</a>. - </li> - <li> - Voor advies over privacy zaken: <a href="mailto:privacy.gw@uu.nl">privacy.gw@uu.nl</a>. - </li> - <li> - Voor vragen over de procedure: <a href="mailto:fetc-gw@uu.nl">Desiree Capel</a>. - </li> - <li> - Voor vragen over de portal zelf: <a href="mailto:portalsupport.gw@uu.nl">portalsupport.gw@uu.nl</a>. + Het reglement van de + <a href="https://fetc-gw.wp.hum.uu.nl/reglement-algemene-kamer/" + target="blank">Algemene + Kamer (AK)</a> + of dat van de + <a href="https://fetc-gw.wp.hum.uu.nl/reglement-linguistiek-kamer/" + target="blank">Linguïstiek + Kamer (LK)</a>. + {% endblocktrans %} + </li> + </ul> + <li> + {% blocktrans trimmed %} + Gebruik de juiste (meest recente) + <a href="https://intranet.uu.nl/documenten-ethische-toetsingscommissie-gw" + target="blank">voorbeelddocumenten</a> + voor de <em>informed consent</em>. (de laatstse versie is van <u>december 2021</u>) + </li> + {% endblocktrans %} </li> - {% endblocktrans %} - </ul> - <p> - {% blocktrans trimmed %} - In deze portal kan je het volgende doen: - {% endblocktrans %} - </p> - </div> - </div> - <div class="uu-inner-container"> - <div class="col-md-6 col-12"> - <h5>{% trans "Dien een nieuwe aanvraag in" %}</h5> - {# {% trans '(check de meest recente voorbeelddocumenten op <a href="https://intranet.uu.nl/documenten-ethische-toetsingscommissie-gw" target="_blank">intranet</a>)' %}#} - <ul class="startpage-ul"> - <li> - <a href="{% url 'proposals:start' %}">{% trans "die volledig nieuw is in deze portal;" %}</a> - </li> - <li> - <a href="{% url 'proposals:copy' %}">{% trans "op basis van een kopie van een oude aanvraag;" %}</a> - </li> - <li> - <a href="{% url 'proposals:start_pre' %}">{% trans "voor (al dan niet goedgekeurde) subsidieaanvragen;" %}</a> - </li> - <li> - <a href="{% url 'proposals:start_pre_approved' %}">{% trans "die al goedgekeurd is door een andere ethische toetsingscomissie." %}</a> - </li> - </ul> + </ul> + </div> </div> - <div class="col-md-6 col-12"> - <h5>{% trans "Een aanvraag reviseren" %}</h5> - {# {% trans '(check de meest recente voorbeelddocumenten op <a href="https://intranet.uu.nl/documenten-ethische-toetsingscommissie-gw" target="_blank">intranet</a>)' %}#} - <ul class="startpage-ul"> - <li> - <a href="{% url 'proposals:copy_revision' %}">{% trans "als een revisie, gebaseerd op opmerkingen van de FETC-GW;" %}</a> - </li> - <li> - <a href="{% url 'proposals:copy_amendment' %}">{% trans "als amendement, wanneer de aanvraag al goedgekeurd is door de FETC-GW." %}</a> - </li> - </ul> + <div class="uu-hero text-bg-light justify-content-md-between justify-content-center flex-wrap gap-3"> + <a class="btn btn-outline-secondary" + href="{% url 'proposals:my_archive' %}">{% trans "Bekijk mijn aanvragen" %}</a> + <a class="btn btn-outline-secondary" href="{% url 'proposals:start' %}">{% trans "Nieuwe aanvraag starten" %}</a> + <a class="btn btn-outline-secondary" + href="{% url 'proposals:copy_revision' %}">{% trans "Nieuwe revisie starten" %}</a> + <a class="btn btn-outline-secondary" + href="{% url 'proposals:copy_amendment' %}">{% trans "Nieuw amendement starten" %}</a> + <a class="btn btn-outline-secondary" + href="{% url 'proposals:archive' 'LK' %}">{% trans "Archief" %}</a> </div> - </div> - <div class="uu-inner-container mt-2 mb-2"> - <div class="col-md-6 col-12"> - <h6>{% trans "Bekijk" %}</h6> - <ul class="startpage-ul"> - <li> - <a href="{% url 'proposals:my_concepts' %}">{% trans "mijn conceptaanvragen;" %}</a> - </li> - <li> - <a href="{% url 'proposals:my_practice' %}">{% trans "mijn oefenaanvragen;" %}</a> - </li> - <li> - <a href="{% url 'proposals:my_submitted' %}">{% trans "mijn ingediende aanvragen;" %}</a> - </li> - <li> - <a href="{% url 'proposals:my_completed' %}">{% trans "mijn afgehandelde aanvragen;" %}</a> - </li> - <li> - <a href="{% url 'proposals:my_supervised' %}">{% trans "mijn aanvragen als eindverantwoordelijke;" %}</a> - </li> - <li> - <a href="{% url 'proposals:my_archive' %}">{% trans "al mijn aanvragen." %}</a> - </li> - </ul> - <h6 class="mt-2 d-inline-block">{% trans 'FETC-GW archief' %}</h6> - <ul class="startpage-ul"> - <li> - <a href="{% url 'proposals:archive' 'AK' %}">{% trans "Alle goedgekeurde aanvragen bekijken van de Algemene Kamer" %}</a> - </li> - <li> - <a href="{% url 'proposals:archive' 'LK' %}">{% trans "Alle goedgekeurde aanvragen bekijken van de Linguïstiek Kamer" %}</a> - </li> - </ul> - </div> - <div class="col-md-6 col-12"> - <h6>Help</h6> - <ul class="startpage-ul"> - <li> - <a href="http://fetc-gw.wp.hum.uu.nl/" target="_blank">{% trans "FETC-GW website" %}</a> - </li> - <li> - <a href="{% trans "https://fetc-gw.wp.hum.uu.nl/reglement-fetc-gw/" %}" target="_blank">{% trans "Reglement van de FETC-GW" %}</a> - </li> - <li> - <a href="https://intranet.uu.nl/documenten-ethische-toetsingscommissie-gw" - target="_blank">{% trans "Informed consent formulieren" %}</a> - </li> - <li> - <a href="{% url 'faqs:list' %}">{% trans "Veelgestelde vragen m.b.t. dit portal" %}</a> - </li> - </ul> + <div class="uu-container"> + <div class="row gx-3 gy-4"> + <div class="col-12 col-md-4"> + <h3>{% trans 'Ondersteuning' %}</h3> + <p class="mb-2"> + {% blocktrans trimmed %} + <strong>FETC-GW secretaris</strong> + <br /> + Desiree Capel (fetc.gw@uu.nl) + {% endblocktrans %} + </p> + <p class="mb-2"> + {% blocktrans trimmed %} + <strong>Data Management advies</strong> + <br /> + datamanagement.gw@uu.nl + {% endblocktrans %} + </p> + <p class="mb-2"> + {% blocktrans trimmed %} + <strong>Privacy kwesties/vragen</strong> + <br /> + privacy.gw@uu.nl + {% endblocktrans %} + </p> + <p class="mb-2"> + {% blocktrans trimmed %} + <strong>Technical support</strong> + <br /> + portalsupport.gw@uu.nl + {% endblocktrans %} + </p> + </div> + <div class="col-12 col-md-4"> + <h3>{% trans 'Resources' %}</h3> + {# What should this be in dutch tho? #} + <ul> + <li> + <a href="http://fetc-gw.wp.hum.uu.nl/" target="_blank">{% trans "FETC-GW website" %}</a> + </li> + <li> + <a href="https://fetc-gw.wp.hum.uu.nl/reglement-fetc-gw/" + target="_blank">{% trans "Reglement van de FETC-GW" %}</a> + </li> + <li> + <a href="https://intranet.uu.nl/documenten-ethische-toetsingscommissie-gw" + target="_blank">{% trans "Informed consent formulieren" %}</a> + </li> + <li> + <a href="{% url 'faqs:list' %}">{% trans "Veelgestelde vragen m.b.t. dit portal" %}</a> + </li> + </ul> + </div> + <div class="col-12 col-md-4"> + <h3>{% trans 'Feedback' %}</h3> + <p> + {% blocktrans trimmed %} + Heb je een vraag over de werking van de portal, ontdek je een foutje, missende functionaliteit, + of verkeerde vertaling? Neem dan contact op met + <a href="mailto:portaldev.gw@uu.nl">portaldev.gw@uu.nl</a>. + {% endblocktrans %} + </p> + </div> + </div> </div> - <hr> - </hr> - <div class="col-12 mt-4"> - <p>{% trans "Bannerfoto door Kim O'leary" %}</p> - </div> -</div> -{% endblock %} + {% endblock %} diff --git a/main/templates/main/index_parts/cover.html b/main/templates/main/index_parts/cover.html new file mode 100644 index 000000000..6bec5fcc0 --- /dev/null +++ b/main/templates/main/index_parts/cover.html @@ -0,0 +1,8 @@ +{% load static %} + +<div class="uu-cover h-400 {{ cover_image.classes }}"> + <img class="uu-cover-image w-100" + alt="cover" + src="{% static cover_image.image %}" /> + <div class="uu-cover-copyright uu-cover-copyright-right">Cover by {{ cover_image.author }}</div> +</div> diff --git a/main/templates/main/index_parts/faculty_warning.html b/main/templates/main/index_parts/faculty_warning.html new file mode 100644 index 000000000..f931ada71 --- /dev/null +++ b/main/templates/main/index_parts/faculty_warning.html @@ -0,0 +1,32 @@ +{% load i18n %} + +{% if not is_humanities %} + <div class="uu-container"> + <div class="col-12 alert alert-warning text-body"> + <p> + {% blocktrans trimmed %} + Deze portal is bedoeld voor medewerkers (en studenten) van de Faculteit Geesteswetenschappen. + {% endblocktrans %} + {% if user.faculties.all %} + {# Filters do not like blocktrans, so that value is just outside... #} + {% blocktrans trimmed %} + Volgens onze gegevens werk/studeer je bij de + {% endblocktrans %} + {{ user.faculties.all|join:',' }}. + {% else %} + {% blocktrans trimmed %} + Volgens onze gegevens werk/studeer je bij een andere faculteit of dienst. + {% endblocktrans %} + {% endif %} + {% blocktrans trimmed %} + Controleer of je inderdaad een aanvraag wilt indienen bij de Facultaire Ethische Toetsingscommissie van Geesteswetenschappen. + {% endblocktrans %} + </p> + <p class="mb-0"> + {% blocktrans trimmed %} + Als je vermoedt dat dit incorrect is, neem dan contact op met <a href="mailto:portalsupport.gw@uu.nl">portalsupport.gw@uu.nl</a>. + {% endblocktrans %} + </p> + </div> + </div> +{% endif %} diff --git a/main/templates/main/index_parts/proposal_box.html b/main/templates/main/index_parts/proposal_box.html new file mode 100644 index 000000000..b0f22fd73 --- /dev/null +++ b/main/templates/main/index_parts/proposal_box.html @@ -0,0 +1,27 @@ +{% load i18n %} + +<div class="text-bg-light mb-2 p-3"> + <div class="d-flex mb-2 align-items-center"> + <div class="h3 mb-0">{{ proposal.reference_number }}</div> + <div class="text-muted ms-auto"> + {% if proposal.status == proposal.Statuses.DRAFT %} + {% trans "Laatst bijgewerkt" %}: {{ proposal.date_modified|date:"j-m-Y" }} + {% elif proposal.status == proposal.Statuses.SUBMITTED_TO_SUPERVISOR %} + {% trans "Ingediend op" %}: {{ proposal.date_submitted_supervisor|date:"j-m-Y" }} + {% else %} + {% trans "Ingediend op" %}: {{ proposal.date_submitted|date:"j-m-Y" }} + {% endif %} + </div> + </div> + <div class="h4 text-truncate">{{ proposal.title }}</div> + <div class="text-muted">{{ proposal.get_status_display }}</div> + <div class="d-flex mt-3"> + {% if proposal.status == proposal.Statuses.DRAFT %} + <a class="ms-auto btn btn-primary btn-arrow-right" + href="{{ proposal.continue_url }}">{% trans "Verder" %}</a> + {% elif proposal.status == proposal.Statuses.SUBMITTED_TO_SUPERVISOR %} + <a class="ms-auto btn btn-primary btn-arrow-right" + href="{% url 'reviews:decide' proposal.supervisor_decision.pk %}">{% trans "Beoordeel" %}</a> + {% endif %} + </div> +</div> diff --git a/main/templates/main/landing.html b/main/templates/main/landing.html index 3a61585ee..3aeb8db33 100644 --- a/main/templates/main/landing.html +++ b/main/templates/main/landing.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% load static %} @@ -23,28 +23,28 @@ </script> {% endblock %} -{% block content %} - <div class="coverimage"> - <img src="{% static 'main/images/coverimage-summer_Kim_Oleary.jpg' %}" /> - </div> - {# Very ugly imitation of uu-hero #} - <div style="background: #FFCD00; margin: -10px -15px; padding:1rem;"> - <div class="uu-inner-container" style="padding-left: 15px"> - <h2 style="font-weight: 500">{% trans "Startpagina" %}</h2> - </div> +{% block pre-messages-content %} + {% include 'main/index_parts/cover.html' %} + <div class="uu-hero"> + <h2>{% trans "Startpagina" %}</h2> </div> - <div class="uu-inner-container mt-1"> - <div class="col-12"> - {% for message in systemmessage_list %} - <div class="{{ message.css_class }}"> - {% autoescape off %} - {{ message.message }} - {% endautoescape %} - </div> - {% endfor %} +{% endblock %} + +{% block content %} + {% if systemmessage_list %} + <div class="uu-container"> + <div class="col-12"> + {% for message in systemmessage_list %} + <div class="{{ message.css_class }}"> + {% autoescape off %} + {{ message.message }} + {% endautoescape %} + </div> + {% endfor %} + </div> </div> - </div> - <div class="uu-inner-container mt-4"> + {% endif %} + <div class="uu-container"> <div class="col-12 col-md-8"> <p> {% blocktrans trimmed %} @@ -82,8 +82,7 @@ <h3>{% trans "Inloggen" %}</h3> {% endblocktrans %} </p> {% if show_saml %} - <a href="{% url 'saml-login' %}?next={{ next }}" - class="button button-colored"> + <a href="{% url 'saml-login' %}?next={{ next }}" class="btn btn-primary"> {% trans 'Log in met je Solis-ID' %} {% if login_descriptors %}(SAML){% endif %} </a> @@ -91,8 +90,7 @@ <h3>{% trans "Inloggen" %}</h3> {# Unnecessary layout hack #} {% if show_saml and show_django %}<div class="mt-1"></div>{% endif %} {% if show_django %} - <a href="{% url 'login' %}?next={{ next }}" - class="button button-colored"> + <a href="{% url 'login' %}?next={{ next }}" class="btn btn-primary"> {% trans 'Log in met je Solis-ID' %} {% if login_descriptors %}(Non-SAML){% endif %} </a> diff --git a/main/templates/registration/logged_out.html b/main/templates/registration/logged_out.html index f67b94eca..52af97bfe 100644 --- a/main/templates/registration/logged_out.html +++ b/main/templates/registration/logged_out.html @@ -1,9 +1,9 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Uitloggen" %}</h2> <p>{% trans "Je bent succesvol uitgelogd." %}</p> diff --git a/main/templates/registration/login.html b/main/templates/registration/login.html index 846aa2fb0..8da9ca678 100644 --- a/main/templates/registration/login.html +++ b/main/templates/registration/login.html @@ -1,20 +1,16 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% load static %} -{% block content %} - {# TODO: when migration to SAML, this template needs to become a TemplateView #} - <div class="coverimage"> - <img src="{% static 'main/images/coverimage-summer_Kim_Oleary.jpg' %}" /> - </div> - {# Very ugly imitation of uu-hero #} - <div style="background: #FFCD00; margin: -10px -15px; padding:1rem;"> - <div class="uu-inner-container" style="padding-left: 15px"> - <h2 style="font-weight: 500">{% trans "Inloggen" %}</h2> - </div> +{% block pre-messages-content %} + <div class="uu-hero"> + <h2>{% trans "Inloggen" %}</h2> </div> - <div class="uu-inner-container mt-4"> +{% endblock %} + +{% block content %} + <div class="uu-container"> <div class="col-12 col-md-4"> {% if form.errors %} <p class="form-errors">{% trans "Gebruikersnaam of wachtwoord incorrect. Probeer het alstublieft opnieuw." %}</p> @@ -34,7 +30,7 @@ <h2 style="font-weight: 500">{% trans "Inloggen" %}</h2> type="password" placeholder="{% trans 'Wachtwoord' %}"> <br /> - <input class="mt-3 mb-3" type="submit" value="{% trans 'Inloggen' %}" /> + <button class="btn btn-primary mt-2" type="submit">{% trans 'Inloggen' %}</button> <input type="hidden" name="next" value="{{ next }}" /> </form> </div> diff --git a/main/templatetags/compare_tags.py b/main/templatetags/compare_tags.py index 2b8eef841..91cd0cc9e 100644 --- a/main/templatetags/compare_tags.py +++ b/main/templatetags/compare_tags.py @@ -1,6 +1,6 @@ from django import template from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.utils import get_static_file from proposals.models import Proposal diff --git a/main/utils.py b/main/utils.py index d03c1bda9..6ff581545 100644 --- a/main/utils.py +++ b/main/utils.py @@ -4,7 +4,7 @@ from django.contrib.staticfiles.storage import staticfiles_storage from django.db.models import Q from django.db.models.fields.files import FieldFile -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ import magic # whoooooo import pdftotext diff --git a/main/validators.py b/main/validators.py index fbaf07f31..e5b720761 100644 --- a/main/validators.py +++ b/main/validators.py @@ -1,7 +1,7 @@ from django.core.exceptions import ValidationError from django.core.files.uploadedfile import UploadedFile from django.core.validators import BaseValidator -from django.utils.translation import ugettext_lazy, ungettext_lazy +from django.utils.translation import gettext_lazy, ngettext_lazy ALLOWED_CONTENT_TYPES = [ "application/pdf", @@ -13,7 +13,7 @@ class MaxWordsValidator(BaseValidator): compare = lambda self, a, b: a > b clean = lambda self, x: len(x.split()) - message = ungettext_lazy( + message = ngettext_lazy( "Dit veld mag maximaal %(limit_value)d woord bevatten.", "Dit veld mag maximaal %(limit_value)d woorden bevatten.", "limit_value", @@ -25,5 +25,5 @@ def validate_pdf_or_doc(value): f = value.file if isinstance(f, UploadedFile) and f.content_type not in ALLOWED_CONTENT_TYPES: raise ValidationError( - ugettext_lazy("Alleen .pdf- of .doc(x)-bestanden zijn toegestaan.") + gettext_lazy("Alleen .pdf- of .doc(x)-bestanden zijn toegestaan.") ) diff --git a/main/views.py b/main/views.py index 488060f9b..8410fd08c 100644 --- a/main/views.py +++ b/main/views.py @@ -24,7 +24,7 @@ from django.shortcuts import render from django.urls import reverse from django.utils import timezone -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from django.views.decorators.csrf import csrf_exempt from django.views.generic.detail import SingleObjectMixin @@ -57,8 +57,58 @@ def get_queryset(self): return self.model.objects.filter(not_after__gt=now, not_before__lt=now) -class HomeView(LoginRequiredMixin, _SystemMessageView): +class SeasonalCoverImageMixin: + seasons = { + "spring": { + "image": "main/images/coverimage-spring.jpg", + "author": "Dick Boetekees", + # This controls how the image is fitted inside the container; every image has its own 'best' fit + "classes": "align-items-end", + }, + "summer": { + "image": "main/images/coverimage-summer.jpg", + "author": "Bert Spiertz", + "classes": "align-items-middle", + }, + "autumn": { + "image": "main/images/coverimage-autumn.jpg", + "author": "Ivar Pel", + "classes": "align-items-middle", + }, + "winter": { + "image": "main/images/coverimage-winter.jpg", + "author": "Simona Evstatieva", + "classes": "align-items-middle", + }, + } + + def get_context_data(self, *args, **kwargs): + context = super().get_context_data(*args, **kwargs) + context["cover_image"] = self.get_seasonal_cover_image() + return context + + def get_seasonal_cover_image(self): + now = timezone.now() + + # Allow overriding by adding a ?season= get parameter + # For dev/testing mostly + if override := self.request.GET.get("season", None): + if override in self.seasons.keys(): + return self.seasons[override] + + if now.month in [3, 4, 5]: + return self.seasons["spring"] + elif now.month in [6, 7, 8]: + return self.seasons["summer"] + elif now.month in [9, 10, 11]: + return self.seasons["autumn"] + else: + return self.seasons["winter"] + + +class HomeView(LoginRequiredMixin, SeasonalCoverImageMixin, _SystemMessageView): template_name = "main/index.html" + max_n_proposals = 2 def no_permissions_fail(self, request=None): """ @@ -73,11 +123,55 @@ def get_context_data(self, *args, **kwargs): context = super().get_context_data(*args, **kwargs) context["is_humanities"] = is_member_of_humanities(self.request.user) + context["proposals"] = self.get_priority_proposals() return context + def get_priority_proposals(self): + proposals = [] + + proposals += Proposal.objects.filter( + supervisor=self.request.user, + status=Proposal.Statuses.SUBMITTED_TO_SUPERVISOR, + date_reviewed_supervisor=None, + ).order_by("date_submitted_supervisor")[: self.max_n_proposals] + + if len(proposals) == self.max_n_proposals: + return proposals + + n_needed = self.max_n_proposals - len(proposals) + + proposals += ( + Proposal.objects.filter( + applicants=self.request.user, + status=Proposal.Statuses.DRAFT, + ) + .distinct() + .order_by( + "-date_modified", + )[:n_needed] + ) + + if len(proposals) == self.max_n_proposals: + return proposals + + n_needed = self.max_n_proposals - len(proposals) + + proposals += ( + Proposal.objects.filter( + applicants=self.request.user, + status__gt=Proposal.Statuses.DRAFT, + ) + .distinct() + .order_by( + "-date_modified", + )[:n_needed] + ) + + return proposals + -class LandingView(_SystemMessageView): +class LandingView(SeasonalCoverImageMixin, _SystemMessageView): template_name = "main/landing.html" model = SystemMessage @@ -540,9 +634,9 @@ class DeleteView(LoginRequiredMixin, UserAllowedMixin, generic.DeleteView): """Generic delete view including login required and user allowed mixin and alternative for success message""" - def delete(self, request, *args, **kwargs): + def form_valid(self, form): messages.success(self.request, self.success_message) - return super(DeleteView, self).delete(request, *args, **kwargs) + return super(DeleteView, self).form_valid(form) class UserMediaView(LoginRequiredMixin, generic.View): diff --git a/observations/models.py b/observations/models.py index 25403c7ed..9dcdf4c44 100644 --- a/observations/models.py +++ b/observations/models.py @@ -1,6 +1,6 @@ from django.core.validators import MaxValueValidator from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.models import SettingModel from main.validators import validate_pdf_or_doc diff --git a/observations/templates/observations/observation_form.html b/observations/templates/observations/observation_form.html index 61eb3fa57..f95163a67 100644 --- a/observations/templates/observations/observation_form.html +++ b/observations/templates/observations/observation_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -34,7 +34,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/observations/templates/observations/observation_update_attachments.html b/observations/templates/observations/observation_update_attachments.html index d01e80e15..334fe6569 100644 --- a/observations/templates/observations/observation_update_attachments.html +++ b/observations/templates/observations/observation_update_attachments.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -21,7 +21,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Formulieren aanpassen" %}</h2> <p> @@ -36,11 +36,10 @@ <h2>{% trans "Formulieren aanpassen" %}</h2> {{ form.as_table }} </table> <input type="hidden" name="next" value="{{ request.META.HTTP_REFERER }}"> - <input class="pure-button pure-button-primary" + <input class="btn btn-primary" type="submit" value="{% trans 'Formulieren aanpassen' %}" /> - <a class="pure-button pure-button-secondary" - href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> </form> </div> </div> diff --git a/observations/utils.py b/observations/utils.py index 509c8f95e..b3cc24a4e 100644 --- a/observations/utils.py +++ b/observations/utils.py @@ -1,5 +1,5 @@ from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from main.utils import AvailableURL diff --git a/observations/views.py b/observations/views.py index 0121ff727..a7f854e1d 100644 --- a/observations/views.py +++ b/observations/views.py @@ -1,5 +1,5 @@ from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import CreateView, UpdateView, AllowErrorsOnBackbuttonMixin from fetc import settings diff --git a/proposals/api/serializers.py b/proposals/api/serializers.py index 6be309a3a..291283fe1 100644 --- a/proposals/api/serializers.py +++ b/proposals/api/serializers.py @@ -3,7 +3,7 @@ from main.serializers import UserSerializer from proposals.models import Proposal from reviews.api.serializers import InlineReviewSerializer, InlineDecisionSerializer -from uil.core.rest.serializers import ModelDisplaySerializer +from cdh.rest.server.serializers import ModelDisplaySerializer class ProposalInlineSerializer(ModelDisplaySerializer): diff --git a/proposals/api/views.py b/proposals/api/views.py index 47693495e..f2c25d6c7 100644 --- a/proposals/api/views.py +++ b/proposals/api/views.py @@ -1,12 +1,10 @@ from braces.views import LoginRequiredMixin from django.db.models import Q -from django.utils.decorators import method_decorator -from django.utils.translation import ugettext_lazy as _ -from django.views.decorators.cache import cache_page +from django.utils.translation import gettext_lazy as _ from rest_framework.authentication import SessionAuthentication from reviews.mixins import CommitteeMixin -from uil.vue.rest import FancyListApiView +from cdh.vue.rest import FancyListApiView from main.utils import is_secretary from reviews.models import Review diff --git a/proposals/forms.py b/proposals/forms.py index 9adf50bbb..b296aa8a1 100644 --- a/proposals/forms.py +++ b/proposals/forms.py @@ -5,13 +5,12 @@ from django.contrib.auth import get_user_model from django.db.models import Q -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.utils.functional import lazy -from django.utils.safestring import mark_safe +from django.utils.safestring import mark_safe, SafeString from django.utils import timezone -from datetime import timedelta -mark_safe_lazy = lazy(mark_safe, str) +mark_safe_lazy = lazy(mark_safe, SafeString) from main.forms import ConditionalModelForm, SoftValidationMixin from main.models import YesNoDoubt @@ -20,9 +19,19 @@ from .models import Proposal, Relation, Wmo from .utils import check_local_facilities from .validators import UniqueTitleValidator -from .widgets import SelectMultipleUser, SelectUser -from cdh.core.forms import DateField +from cdh.core.forms import ( + DateField, + BootstrapRadioSelect, + BootstrapCheckboxSelectMultiple, + BootstrapSelect, + SearchableSelectWidget, + DateInput, + SplitDateTimeWidget, + BootstrapSplitDateTimeWidget, + TemplatedForm, + TemplatedModelForm, +) class ProposalForm(UserKwargModelFormMixin, SoftValidationMixin, ConditionalModelForm): @@ -63,16 +72,17 @@ class Meta: ), } widgets = { - "is_pre_approved": forms.RadioSelect(choices=YES_NO), - "institution": forms.RadioSelect(), - "relation": forms.RadioSelect(), - "student_context": forms.RadioSelect(), - "other_applicants": forms.RadioSelect(choices=YES_NO), - "other_stakeholders": forms.RadioSelect(choices=YES_NO), + "is_pre_approved": BootstrapRadioSelect(choices=YES_NO), + "institution": BootstrapRadioSelect(), + "relation": BootstrapRadioSelect(), + "student_context": BootstrapRadioSelect(), + "other_applicants": BootstrapRadioSelect(choices=YES_NO), + "other_stakeholders": BootstrapRadioSelect(choices=YES_NO), + "date_start": DateInput(), "summary": forms.Textarea(attrs={"cols": 50}), - "funding": forms.CheckboxSelectMultiple(), - "applicants": SelectMultipleUser(), - "supervisor": forms.Select(), + "funding": BootstrapCheckboxSelectMultiple(), + "applicants": SearchableSelectWidget(), + "supervisor": SearchableSelectWidget(), } error_messages = { "title": { @@ -121,6 +131,10 @@ def __init__(self, *args, **kwargs): self.fields["institution"].empty_label = None self.fields["student_context"].empty_label = None + # Needed to set the widget into multiple mode + # TODO: write a DSC widget that has this enabled by default + self.fields["applicants"].widget.allow_multiple_selected = True + # Only revisions or amendments are allowed to have a title that's not # unique. if not self.instance or not self.instance.is_revision: @@ -281,15 +295,15 @@ def clean(self): ) -class ProposalStartPracticeForm(forms.Form): +class ProposalStartPracticeForm(TemplatedForm): practice_reason = forms.ChoiceField( label=_("Ik maak een oefenaanvraag aan"), choices=Proposal.PracticeReasons.choices, - widget=forms.RadioSelect(), + widget=BootstrapRadioSelect(), ) -class BaseProposalCopyForm(UserKwargModelFormMixin, forms.ModelForm): +class BaseProposalCopyForm(UserKwargModelFormMixin, TemplatedModelForm): class Meta: model = Proposal fields = ["parent", "is_revision"] @@ -297,6 +311,7 @@ class Meta: "is_revision": forms.HiddenInput(), } + # TODO: figure out if we need to change widgets here parent = ParentChoiceModelField( queryset=Proposal.objects.all(), label=_("Te kopiëren aanvraag"), @@ -403,7 +418,7 @@ def _get_parent_queryset(self): ) -class ProposalConfirmationForm(forms.ModelForm): +class ProposalConfirmationForm(TemplatedModelForm): class Meta: model = Proposal fields = ["date_confirmed", "confirmation_comments"] @@ -413,7 +428,7 @@ class WmoForm(SoftValidationMixin, ConditionalModelForm): class Meta: model = Wmo fields = ["metc", "metc_details", "metc_institution", "is_medical"] - widgets = {"metc": forms.RadioSelect(), "is_medical": forms.RadioSelect()} + widgets = {"metc": BootstrapRadioSelect(), "is_medical": BootstrapRadioSelect()} _soft_validation_fields = ["metc_details", "metc_institution", "is_medical"] @@ -456,7 +471,7 @@ def clean(self): ) -class WmoCheckForm(forms.ModelForm): +class WmoCheckForm(TemplatedModelForm): class Meta: model = Wmo fields = [ @@ -464,8 +479,8 @@ class Meta: "is_medical", ] widgets = { - "metc": forms.RadioSelect(), - "is_medical": forms.RadioSelect(), + "metc": BootstrapRadioSelect(), + "is_medical": BootstrapRadioSelect(), } def __init__(self, *args, **kwargs): @@ -486,8 +501,8 @@ class Meta: "metc_decision_pdf", ] widgets = { - "metc_application": forms.RadioSelect(choices=YES_NO), - "metc_decision": forms.RadioSelect(choices=YES_NO), + "metc_application": BootstrapRadioSelect(choices=YES_NO), + "metc_decision": BootstrapRadioSelect(choices=YES_NO), } _soft_validation_fields = [ diff --git a/proposals/mixins.py b/proposals/mixins.py index a3c2d0b15..6a7462dc0 100644 --- a/proposals/mixins.py +++ b/proposals/mixins.py @@ -3,7 +3,7 @@ from braces.views import UserFormKwargsMixin from xhtml2pdf import pisa from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.core.exceptions import ImproperlyConfigured from django.views.generic.base import TemplateResponseMixin diff --git a/proposals/models.py b/proposals/models.py index d73facb49..81ff7709b 100644 --- a/proposals/models.py +++ b/proposals/models.py @@ -7,12 +7,12 @@ from django.core.validators import MaxValueValidator, MinValueValidator from django.db import models from django.utils import timezone -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.utils.functional import lazy -from django.utils.safestring import mark_safe +from django.utils.safestring import mark_safe, SafeString -mark_safe_lazy = lazy(mark_safe, str) +mark_safe_lazy = lazy(mark_safe, SafeString) from main.models import YesNoDoubt from main.validators import MaxWordsValidator, validate_pdf_or_doc @@ -861,10 +861,13 @@ class WMOStatuses(models.IntegerChoices): on_delete=models.CASCADE, ) - def save(self, *args, **kwargs): + def save(self, *args, update_fields=None, **kwargs): """Sets the correct status on save of a WMO""" self.update_status() - super(Wmo, self).save(*args, **kwargs) + # If update_fields is supplied, we need to add status to it (or it will be ignored) + if update_fields is not None and "name" in update_fields: + update_fields = {"status"}.union(update_fields) + super(Wmo, self).save(*args, update_fields=update_fields, **kwargs) def update_status(self): if ( diff --git a/proposals/templates/proposals/compare_documents.html b/proposals/templates/proposals/compare_documents.html index 146114de3..41075deac 100644 --- a/proposals/templates/proposals/compare_documents.html +++ b/proposals/templates/proposals/compare_documents.html @@ -44,7 +44,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans 'Vergelijk documenten' %}</h2> <p> @@ -68,11 +68,11 @@ <h4> <div class="warning" style="display: none; clear: both;"> {% trans 'Er zijn geen wijzigingen gevonden in dit document!' %} </div> - <button id="button-split" class="float-right">{% trans 'Bekijk apart' %}</button> - <button id="button-combined" style="display: none" class="float-right">{% trans 'Bekijk gecombineerd' %}</button> + <button id="button-split" class="float-end">{% trans 'Bekijk apart' %}</button> + <button id="button-combined" style="display: none" class="float-end">{% trans 'Bekijk gecombineerd' %}</button> </div> </div> - <div class="uu-inner-container document-compare"> + <div class="uu-container document-compare"> <div class="col-6"> <p> <strong>{% trans "Oud" %}:</strong> @@ -86,7 +86,7 @@ <h4> </p> </div> </div> - <div class="uu-inner-container compare"> + <div class="uu-container compare"> <div class="col-12 text-center mt-5 mb-5" id="loading-icon"> <img src="{% static 'main/images/loading.gif' %}" /> </div> diff --git a/proposals/templates/proposals/proposal_confirm_delete.html b/proposals/templates/proposals/proposal_confirm_delete.html index 43b9246ae..16b1fd2fd 100644 --- a/proposals/templates/proposals/proposal_confirm_delete.html +++ b/proposals/templates/proposals/proposal_confirm_delete.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} @@ -7,7 +7,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Aanvraag verwijderen" %}</h2> <p> @@ -17,8 +17,10 @@ <h2>{% trans "Aanvraag verwijderen" %}</h2> </p> <form action="" method="post"> {% csrf_token %} - <input class="button" type="submit" value="{% trans 'Verwijderen' %}" /> - <a class="button" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> + <input class="btn btn-danger" + type="submit" + value="{% trans 'Verwijderen' %}" /> + <a class="btn btn-secondary" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> </form> </div> </div> diff --git a/proposals/templates/proposals/proposal_confirmation.html b/proposals/templates/proposals/proposal_confirmation.html index 7637fd475..9357ac150 100644 --- a/proposals/templates/proposals/proposal_confirmation.html +++ b/proposals/templates/proposals/proposal_confirmation.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -20,7 +20,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Bevestigingsbrief versturen" %}</h2> <p> @@ -33,8 +33,8 @@ <h2>{% trans "Bevestigingsbrief versturen" %}</h2> <table> {{ form.as_table }} </table> - <a class="button" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> - <input class="button" + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <input class="btn btn-secondary" type="submit" value="{% trans 'Bevestigingsbrief verstuurd' %}" /> </form> diff --git a/proposals/templates/proposals/proposal_copy.html b/proposals/templates/proposals/proposal_copy.html index f4c92e10d..a2d586e92 100644 --- a/proposals/templates/proposals/proposal_copy.html +++ b/proposals/templates/proposals/proposal_copy.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -15,7 +15,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2> {% if is_revision %} @@ -89,9 +89,9 @@ <h2> <table> {{ form.as_table }} </table> - <div class="float-right mt-2 mb-3"> - <a class="button" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> - <input class="button" type="submit" value="{% trans 'Kopiëren' %}" /> + <div class="float-end mt-2 mb-3"> + <a class="btn btn-secondary" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> + <input class="btn btn-primary" type="submit" value="{% trans 'Kopiëren' %}" /> </div> </form> </div> diff --git a/proposals/templates/proposals/proposal_data_management.html b/proposals/templates/proposals/proposal_data_management.html index 65cd7e51c..bd66acbf6 100644 --- a/proposals/templates/proposals/proposal_data_management.html +++ b/proposals/templates/proposals/proposal_data_management.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=proposal.available_urls active=5 %} {% include 'base/navigation.html' %} diff --git a/proposals/templates/proposals/proposal_diff.html b/proposals/templates/proposals/proposal_diff.html index 739fb6d7b..e75e44098 100644 --- a/proposals/templates/proposals/proposal_diff.html +++ b/proposals/templates/proposals/proposal_diff.html @@ -1,9 +1,9 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} {% load proposal_filters %} {% load static %} -{% load uil_filters %} +{% load cdh_filters %} {% load get_field_name %} {% load diff_tags %} @@ -32,7 +32,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2> {% trans "Overzicht van wijzigingen bij aanmelding " %} @@ -43,7 +43,7 @@ <h2> </p> </div> </div> - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12 compare document-compare"> <div class="col-12 text-center mt-5 mb-5" id="loading-icon"> <img src="{% static 'main/images/loading.gif' %}" /> @@ -51,8 +51,8 @@ <h2> {% for section in sections %} {% include section %} {% endfor %} - <p class="mt-5 float-right"> - <button class="button" onclick="window.history.back();">{% trans "Terug naar de vorige pagina" %}</button> + <p class="mt-5 float-end"> + <button class="btn btn-secondary" onclick="window.history.back();">{% trans "Terug naar de vorige pagina" %}</button> </p> </div> </div> diff --git a/proposals/templates/proposals/proposal_export_list.html b/proposals/templates/proposals/proposal_export_list.html index f6c6efd83..8576afee0 100644 --- a/proposals/templates/proposals/proposal_export_list.html +++ b/proposals/templates/proposals/proposal_export_list.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -6,7 +6,7 @@ {% block header_title %}Goedgekeurde aanvragen - {{ block.super }}{% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>Approved proposals</h2> <table class="display exportTable w-100"> diff --git a/proposals/templates/proposals/proposal_form.html b/proposals/templates/proposals/proposal_form.html index 02b196253..832807a86 100644 --- a/proposals/templates/proposals/proposal_form.html +++ b/proposals/templates/proposals/proposal_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_form_base.html" %} {% load static %} {% load i18n %} @@ -8,6 +8,7 @@ {% endblock %} {% block html_head %} + {{ block.super }} <script type="text/javascript" charset="utf8" src="{% static 'proposals/js/word_counter.js' %}"></script> @@ -22,125 +23,73 @@ depends_on_value('other_stakeholders', 'True', 'stakeholders'); check_field_required('funding', 'needs_details', 'funding_details', 'proposals'); check_field_required('funding', 'needs_name', 'funding_name', 'proposals'); + }); + $(function () { + // adds running wordcounter for the summary and self_assessment text fields + let translated_string = " {% trans 'Aantal woorden:' %} " + wordCounter("summary", translated_string) + wordCounter("self_assessment", translated_string) + }); - // Add datepicker for date_start, set locale to current language - $.datepicker.setDefaults($.datepicker.regional["{{ LANGUAGE_CODE }}"]); + $(function () { + /* Find date start input */ + let date_start_input = $("#id_date_start") - var date_format = '{{ LANGUAGE_CODE }}' === 'nl' ? 'dd-mm-yy' : 'yy-mm-dd'; - $("#id_date_start").datepicker({ - dateFormat: date_format, - }) + /* Insert warning element */ + date_start_input.after(` + <p id="date_start_warning" class="mb-2 mt-2"> + {% trans "Als de beoogde startdatum binnen twee weken van het indienen van de aanvraag ligt, kan de FETC geen officiële goedkeuring meer geven."%} + </p> + `) - // AJAX applicants - $('select#id_applicants').select2({ - ajax: { - url: '{% url 'main:user_search' %}', - dataType: 'json', - data: function (params) { - return { - q: params.term || '*', - page: params.page || 1 - } - }, - delay: 1500, - error: function (err) { - console.log(err) - }, - cache: true - } - }); - - // AJAX supervisors - $('select#id_supervisor').select2(); - }); - $(function() { - // adds running wordcounter for the summary and self_assessment text fields - let translated_string = " {% trans 'Aantal woorden:' %} " - wordCounter("summary", translated_string) - wordCounter("self_assessment", translated_string) - }); - </script> -{% endblock %} - -{% block content %} - <div class="uu-inner-container"> - <div class="col-12"> - {% if not create %} - {% with nav_items=proposal.available_urls active=1 %} - {% include 'base/navigation.html' %} - {% endwith %} - {% endif %} - {% if is_practice %} - <div class="info"> - {% trans "Je bewerkt op het moment een oefenaanvraag. Deze kan niet ter beoordeling door de FETC-GW worden ingediend." %} - </div> - {% endif %} - <h2>{% trans "Algemene informatie over de aanvraag" %}</h2> - {% if not create and is_supervisor %} - {% blocktrans trimmed %} - Je past nu een aanvraag aan van een student/PhD kandidaat onder jouw supervisie. Let er op dat je het - formulier - invult alsof jij die student/PhD kandidaat bent. - {% endblocktrans %} - <br /> - <br /> - {% endif %} - <form action="" method="post" enctype="multipart/form-data"> - {% csrf_token %} - <table> - {{ form.as_table }} - </table> - {% include "base/form_buttons.html" %} - </form> - </div> - </div> - <!-- Code for intended start date warning --> - <style> - #date_start_warning { - line-height: 1.5; - } - </style> - <script> - /* Find date start input */ - let date_start_input = $("#id_date_start") + /* Re-select warning paragraph */ + const date_start_warning = $("#date_start_warning") - /* Insert warning element */ - date_start_input.after(` -<p id="date_start_warning" class="mb-2 mt-2"> - {% trans "Als de beoogde startdatum binnen twee weken van het indienen van de aanvraag ligt, kan de FETC geen officiële goedkeuring meer geven."%} -</p> - `) + /* Define checker function */ + function checkDateStart() { + let date_value = date_start_input.val(); + if (date_value == "") { + return true + } + let parsed_date = new Date(date_value); + let today = new Date(); + let date_difference = parsed_date - today; + const two_weeks_ms = 1000 * 60 * 60 * 24 * 14; + return date_difference > two_weeks_ms; + } - /* Re-select warning paragraph */ - const date_start_warning = $("#date_start_warning") + /* Define warning update function */ + function updateWarning() { + date_start_warning.toggleClass("text-danger", checkDateStart() == false); + } - /* Define checker function */ - function checkDateStart() - { - let date_value = date_start_input.val(); - if (date_value=="") { - return true - } - let parsed_date = new Date(date_value); - let today = new Date(); - let date_difference = parsed_date - today; - const two_weeks_ms = 1000*60*60*24*14; - return date_difference>two_weeks_ms; - } + /* Listen for changing of start date */ + date_start_input.on('change', () => { + updateWarning(); + }); - /* Define warning update function */ - function updateWarning() - { - date_start_warning.toggleClass("text-danger", checkDateStart()==false); - } - - /* Listen for changing of start date */ - date_start_input.on('change', () =>{ - updateWarning(); - }); + /* Give the update function a warmup run */ + updateWarning(); + }); + </script> +{% endblock %} - /* Give the update function a warmup run */ - updateWarning(); +{% block pre-form-container-content %} + {% if not create and is_supervisor %} + <div class="alert alert-info"> + {% blocktrans trimmed %} + Je past nu een aanvraag aan van een student/PhD kandidaat onder jouw supervisie. Let er op dat je + het formulier invult alsof jij die student/PhD kandidaat bent. + {% endblocktrans %} + </div> + {% endif %} + {% if is_practice %} + <div class="alert alert-info"> + {% trans "Je bewerkt op het moment een oefenaanvraag. Deze kan niet ter beoordeling door de FETC-GW worden ingediend." %} + </div> + {% endif %} +{% endblock %} - </script> +{% block pre-form-text %} + <h3>{% trans "Algemene informatie over de aanvraag" %}</h3> {% endblock %} diff --git a/proposals/templates/proposals/proposal_form_pre_approved.html b/proposals/templates/proposals/proposal_form_pre_approved.html index 396a86f6b..6ba05324f 100644 --- a/proposals/templates/proposals/proposal_form_pre_approved.html +++ b/proposals/templates/proposals/proposal_form_pre_approved.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -78,7 +78,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Algemene informatie over de aanvraag" %}</h2> {% if not create and is_supervisor %} diff --git a/proposals/templates/proposals/proposal_list.html b/proposals/templates/proposals/proposal_list.html index 0b97279d1..98a833357 100644 --- a/proposals/templates/proposals/proposal_list.html +++ b/proposals/templates/proposals/proposal_list.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load vue_tags %} {% load static %} @@ -9,7 +9,7 @@ {% block html_head %} {# This template loads in either the dev or prod Vue library, depending on settings.DEBUG #} - {% include 'uil.vue/vueloader.html' %} + {% include 'cdh.vue/vueloader.html' %} {# Load in the base component FancyList #} {% load_vue_component 'FancyList' %} {% include 'proposals/vue_templates/proposal_list.html' %} @@ -22,7 +22,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{{ title }}</h2> {% static "proposals/images/page_white_go.png" as img_next %} diff --git a/proposals/templates/proposals/proposal_pdf.html b/proposals/templates/proposals/proposal_pdf.html index 423850555..735c27518 100644 --- a/proposals/templates/proposals/proposal_pdf.html +++ b/proposals/templates/proposals/proposal_pdf.html @@ -4,7 +4,7 @@ {% load fetc_filters %} {% load proposal_filters %} {% load get_field_name %} -{% load uil_filters %} +{% load cdh_filters %} {% block extra_style %} <style type="text/css"> diff --git a/proposals/templates/proposals/proposal_private_archive.html b/proposals/templates/proposals/proposal_private_archive.html index d5e32d94b..304dd388d 100644 --- a/proposals/templates/proposals/proposal_private_archive.html +++ b/proposals/templates/proposals/proposal_private_archive.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load vue_tags %} {% load static %} @@ -9,7 +9,7 @@ {% block html_head %} {# This template loads in either the dev or prod Vue library, depending on settings.DEBUG #} - {% include 'uil.vue/vueloader.html' %} + {% include 'cdh.vue/vueloader.html' %} {# Load in the base component FancyList #} {% load_vue_component 'FancyList' %} {% include 'proposals/vue_templates/proposal_archive_list.html' %} @@ -22,7 +22,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{{ title }}</h2> {% static "proposals/images/page_white_go.png" as img_next %} diff --git a/proposals/templates/proposals/proposal_public_archive.html b/proposals/templates/proposals/proposal_public_archive.html index f9ce6ced1..7fb80913b 100644 --- a/proposals/templates/proposals/proposal_public_archive.html +++ b/proposals/templates/proposals/proposal_public_archive.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -9,7 +9,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans 'Goedgekeurde aanvragen' %}</h2> <table class="table table-striped w-100 mt-5"> diff --git a/proposals/templates/proposals/proposal_start.html b/proposals/templates/proposals/proposal_start.html index 13b2d9173..504a4844e 100644 --- a/proposals/templates/proposals/proposal_start.html +++ b/proposals/templates/proposals/proposal_start.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Een nieuwe aanvraag aanmelden" %}</h2> <ul> @@ -72,7 +72,7 @@ <h2>{% trans "Een nieuwe aanvraag aanmelden" %}</h2> {% endblocktrans %} </li> </ul> - <a class="button button-colored float-right mb-4" + <a class="btn btn-primary float-end mb-4" href="{% url 'proposals:create' %}">{% trans "Volgende stap >>" %}</a> </div> </div> diff --git a/proposals/templates/proposals/proposal_start_practice.html b/proposals/templates/proposals/proposal_start_practice.html index 53b59ccb7..fed25b7fa 100644 --- a/proposals/templates/proposals/proposal_start_practice.html +++ b/proposals/templates/proposals/proposal_start_practice.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Een nieuwe aanvraag aanmelden (oefenportaal)" %}</h2> <ul> diff --git a/proposals/templates/proposals/proposal_start_pre_approved.html b/proposals/templates/proposals/proposal_start_pre_approved.html index 4417f9b9c..a91c1e9f3 100644 --- a/proposals/templates/proposals/proposal_start_pre_approved.html +++ b/proposals/templates/proposals/proposal_start_pre_approved.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -9,7 +9,7 @@ {% block content %} {% trans "https://fetc-gw.wp.hum.uu.nl/reglement-fetc-gw/" as reg_url %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Een nieuwe aanvraag aanmelden (die al goedgekeurd is door een andere ethische toetsingscomissie)" %}</h2> <p> @@ -33,7 +33,7 @@ <h2>{% trans "Een nieuwe aanvraag aanmelden (die al goedgekeurd is door een ande <a href="mailto:fetc-gw@uu.nl">fetc-gw@uu.nl</a>). {% endblocktrans %} </p> - <a class="button button-colored float-right mb-3" + <a class="btn btn-primary float-end mb-3" href="{% url 'proposals:create_pre_approved' %}">{% trans "Volgende stap >>" %}</a> </div> </div> diff --git a/proposals/templates/proposals/proposal_start_pre_assessment.html b/proposals/templates/proposals/proposal_start_pre_assessment.html index a0e29d324..17fa99842 100644 --- a/proposals/templates/proposals/proposal_start_pre_assessment.html +++ b/proposals/templates/proposals/proposal_start_pre_assessment.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Nieuwe FETC-aanvraag voor (al dan niet goedgekeurde) subsidieaanvragen" %}</h2> <p> @@ -39,7 +39,7 @@ <h2>{% trans "Nieuwe FETC-aanvraag voor (al dan niet goedgekeurde) subsidieaanvr <img src="{% static 'proposals/images/fetc-flowchart-pre-2.png' %}" style="width: 100%"> </p> - <a class="button button-colored float-right mb-3" + <a class="btn btn-primary float-end mb-3" href="{% url 'proposals:create_pre' %}">{% trans "Volgende stap >>" %}</a> </div> </div> diff --git a/proposals/templates/proposals/proposal_submit.html b/proposals/templates/proposals/proposal_submit.html index ba041907c..a60ff51b3 100644 --- a/proposals/templates/proposals/proposal_submit.html +++ b/proposals/templates/proposals/proposal_submit.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -39,7 +39,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=proposal.available_urls active=pagenr %} {% include 'base/navigation.html' %} diff --git a/proposals/templates/proposals/proposal_submitted.html b/proposals/templates/proposals/proposal_submitted.html index 32df1340b..1c0d94d72 100644 --- a/proposals/templates/proposals/proposal_submitted.html +++ b/proposals/templates/proposals/proposal_submitted.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -15,7 +15,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2> {% if proposal.is_pre_assessment %} diff --git a/proposals/templates/proposals/proposal_update_attachments.html b/proposals/templates/proposals/proposal_update_attachments.html index b59faee2d..9477196a0 100644 --- a/proposals/templates/proposals/proposal_update_attachments.html +++ b/proposals/templates/proposals/proposal_update_attachments.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Formulieren aanpassen" %}</h2> <p> @@ -23,11 +23,10 @@ <h2>{% trans "Formulieren aanpassen" %}</h2> {{ form.as_table }} </table> <input type="hidden" name="next" value="{{ request.META.HTTP_REFERER }}"> - <input class="pure-button pure-button-primary" + <input class="btn btn-primary" type="submit" value="{% trans 'Formulieren aanpassen' %}" /> - <a class="pure-button pure-button-secondary" - href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> </form> </div> </div> diff --git a/proposals/templates/proposals/proposal_update_date_start.html b/proposals/templates/proposals/proposal_update_date_start.html index 143512cf0..a784b6477 100644 --- a/proposals/templates/proposals/proposal_update_date_start.html +++ b/proposals/templates/proposals/proposal_update_date_start.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Startdatum aanpassen" %}</h2> <p> @@ -26,11 +26,10 @@ <h2>{% trans "Startdatum aanpassen" %}</h2> {{ form.as_table }} </table> <input type="hidden" name="next" value="{{ request.META.HTTP_REFERER }}"> - <input class="pure-button pure-button-primary" + <input class="btn btn-primary" type="submit" value="{% trans 'Startdatum aanpassen' %}" /> - <a class="pure-button pure-button-secondary" - href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> </form> </div> </div> diff --git a/proposals/templates/proposals/study_consent.html b/proposals/templates/proposals/study_consent.html index 7c8a54329..657c4fa2c 100644 --- a/proposals/templates/proposals/study_consent.html +++ b/proposals/templates/proposals/study_consent.html @@ -1,8 +1,8 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} -{% load uil_filters %} +{% load cdh_filters %} {% block header_title %} {% trans "Informed consent formulieren" %} - {{ block.super }} @@ -64,7 +64,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=proposal.available_urls active=4 %} {% include 'base/navigation.html' %} @@ -126,7 +126,7 @@ <h2>{% trans "Informed consent formulieren uploaden" %}</h2> {% else %} {% set used = 0 %} {# We only add the add link if the form is empty, as this simplifies the JS #} - <div style="float:right;"> + <div class="float-end"> <a href="#" id="new-{% counter extra_form_counter value %}" class="new" diff --git a/proposals/templates/proposals/study_start.html b/proposals/templates/proposals/study_start.html index eebce8d03..4f8f8b1f2 100644 --- a/proposals/templates/proposals/study_start.html +++ b/proposals/templates/proposals/study_start.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -55,7 +55,7 @@ {% block content %} {% trans "Je kan de aard van de aanvraag nu in detail op de volgende pagina's specificeren." as is_similar %} {% trans "Je kan de aard van de aanvraag nu <em>per traject</em> in detail op de volgende pagina's specificeren." as is_dissimilar %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/proposals/templates/proposals/translated_consent_forms.html b/proposals/templates/proposals/translated_consent_forms.html index 9372d2237..c150d63f7 100644 --- a/proposals/templates/proposals/translated_consent_forms.html +++ b/proposals/templates/proposals/translated_consent_forms.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -16,7 +16,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=proposal.available_urls active=pagenr %} {% include 'base/navigation.html' %} diff --git a/proposals/templates/proposals/vue_templates/proposal_archive_list.html b/proposals/templates/proposals/vue_templates/proposal_archive_list.html index a2bb72f80..538059c6f 100644 --- a/proposals/templates/proposals/vue_templates/proposal_archive_list.html +++ b/proposals/templates/proposals/vue_templates/proposal_archive_list.html @@ -11,7 +11,7 @@ <script type="text/x-template" id="proposalsUFLList"> <FancyList {# It's a long, but standard, list, so we just include the default list #} - {% include 'uil.vue/fancy-list-params.txt' %} + {% include 'cdh.vue/fancy-list-params.txt' %} > {# General note: the #{slot}="data" defines in which Vue variable all properties are loaded. #} {# FancyList only exposes `item` and `context`, where item is the item from the data for a given row. #} diff --git a/proposals/templates/proposals/vue_templates/proposal_list.html b/proposals/templates/proposals/vue_templates/proposal_list.html index 2431c0d84..03d54cd96 100644 --- a/proposals/templates/proposals/vue_templates/proposal_list.html +++ b/proposals/templates/proposals/vue_templates/proposal_list.html @@ -13,7 +13,7 @@ <script type="text/x-template" id="proposalsUFLList"> <FancyList {# It's a long, but standard, list, so we just include the default list #} - {% include 'uil.vue/fancy-list-params.txt' %} + {% include 'cdh.vue/fancy-list-params.txt' %} > {# General note: the #{slot}="data" defines in which Vue variable all properties are loaded. #} {# FancyList only exposes `item` and `context`, where item is the item from the data for a given row. #} diff --git a/proposals/templates/proposals/wmo_application.html b/proposals/templates/proposals/wmo_application.html index c05c2ed3d..6d9fc23f2 100644 --- a/proposals/templates/proposals/wmo_application.html +++ b/proposals/templates/proposals/wmo_application.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_form_base.html" %} {% load static %} {% load i18n %} @@ -8,6 +8,7 @@ {% endblock %} {% block html_head %} + {{ block.super }} <script> $(function () { depends_on_value('metc_application', 'True', 'metc_decision'); @@ -17,27 +18,13 @@ </script> {% endblock %} -{% block content %} - <div class="uu-inner-container"> - <div class="col-12"> - {% with nav_items=wmo.proposal.available_urls active=2 %} - {% include 'base/navigation.html' %} - {% endwith %} - <h2>{% trans "Aanmelding bij de METC" %}</h2> - <form action="" method="post" enctype="multipart/form-data"> - {% csrf_token %} - <table> - {{ form.as_table }} - </table> - {% if wmo.status == wmo.WMOStatuses.WAITING %} - <div class="warning"> - {% trans "Zolang je aanvraag nog niet is beoordeeld door de METC, kan je niet verder in het aanmeldingsproces." %} - </div> - {% endif %} - {% with proposal=wmo.proposal %} - {% include "base/form_buttons.html" %} - {% endwith %} - </form> +{% block form-css-classes %}uu-form-no-gap uu-form-no-help{% endblock %} + +{% block pre-form %} + <h3>{% trans "Aanmelding bij de METC" %}</h3> + {% if wmo.status == wmo.WMOStatuses.WAITING %} + <div class="alert alert-warning mt-3"> + {% trans "Zolang je aanvraag nog niet is beoordeeld door de METC, kan je niet verder in het aanmeldingsproces." %} </div> - </div> + {% endif %} {% endblock %} diff --git a/proposals/templates/proposals/wmo_check.html b/proposals/templates/proposals/wmo_check.html index 15eb9015b..0908ecbc9 100644 --- a/proposals/templates/proposals/wmo_check.html +++ b/proposals/templates/proposals/wmo_check.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_form_base.html" %} {% load static %} {% load i18n %} @@ -8,6 +8,7 @@ {% endblock %} {% block html_head %} + {{ block.super }} <script type="text/javascript" charset="utf8" src="{% static 'proposals/js/wmo.js' %}"></script> @@ -18,24 +19,13 @@ </script> {% endblock %} -{% block content %} - <div class="uu-inner-container"> - <div class="col-12"> - {% with nav_items=wmo.proposal.available_urls active=2 %} - {% include 'base/navigation.html' %} - {% endwith %} - <h2>{% trans "WMO-check" %}</h2> - <form action="" method="post" enctype="multipart/form-data"> - {% csrf_token %} - <table> - {{ form.as_table }} - </table> - <div id="metc_status"></div> - <input class="pure-button pure-button-primary" - type="button" - onclick="javascript:location.reload();" - value="{% trans 'Opnieuw beginnen' %}" /> - </form> - </div> - </div> +{% block pre-form %} + <h3>{% trans "WMO-check" %}</h3> +{% endblock %} + +{% block form-buttons %} + <input class="btn btn-primary" + type="button" + onclick="location.reload();" + value="{% trans 'Opnieuw beginnen' %}" /> {% endblock %} diff --git a/proposals/templates/proposals/wmo_form.html b/proposals/templates/proposals/wmo_form.html index 334393725..06a33da75 100644 --- a/proposals/templates/proposals/wmo_form.html +++ b/proposals/templates/proposals/wmo_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_form_base.html" %} {% load static %} {% load i18n %} @@ -8,6 +8,7 @@ {% endblock %} {% block html_head %} + {{ block.super }} <script type="text/javascript" charset="utf8" src="{% static 'proposals/js/wmo.js' %}"></script> @@ -21,23 +22,8 @@ </script> {% endblock %} -{% block content %} - <div class="uu-inner-container"> - <div class="col-12"> - {% with nav_items=proposal.available_urls active=2 %} - {% include 'base/navigation.html' %} - {% endwith %} - <h2>{% trans "Ethische toetsing nodig door een Medische Ethische Toetsingscommissie (METC)?" %}</h2> - <form action="" method="post" enctype="multipart/form-data"> - {% csrf_token %} - <table> - {{ form.as_table }} - </table> - <div id="metc_status"></div> - {% with proposal=wmo.proposal %} - {% include "base/form_buttons.html" %} - {% endwith %} - </form> - </div> - </div> +{% block form-css-classes %}uu-form-no-gap{% endblock %} + +{% block pre-form %} + <h3>{% trans "Ethische toetsing nodig door een Medische Ethische Toetsingscommissie (METC)?" %}</h3> {% endblock %} diff --git a/proposals/tests/misc_tests.py b/proposals/tests/misc_tests.py index 0d8c57677..31704f456 100644 --- a/proposals/tests/misc_tests.py +++ b/proposals/tests/misc_tests.py @@ -8,6 +8,7 @@ from main.models import Setting, YesNoDoubt from interventions.models import Intervention from observations.models import Observation +from studies.utils import create_documents_for_study from tasks.models import Session, Task, Registration from studies.models import Study, Recruitment from proposals.api.views import MyProposalsApiView diff --git a/proposals/utils/pdf_diff_logic.py b/proposals/utils/pdf_diff_logic.py index 64ff04b47..e211ded26 100644 --- a/proposals/utils/pdf_diff_logic.py +++ b/proposals/utils/pdf_diff_logic.py @@ -6,7 +6,7 @@ from django.template.loader import get_template from django.utils.html import format_html from django.utils.safestring import mark_safe -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from proposals.templatetags.proposal_filters import ( needs_details, diff --git a/proposals/utils/proposal_utils.py b/proposals/utils/proposal_utils.py index b0d1c08ed..c16074f10 100644 --- a/proposals/utils/proposal_utils.py +++ b/proposals/utils/proposal_utils.py @@ -13,7 +13,7 @@ from django.db.models import Q from django.urls import reverse from django.template.loader import render_to_string -from django.utils.translation import activate, get_language, ugettext as _ +from django.utils.translation import activate, get_language, gettext as _ from django.utils.deconstruct import deconstructible from main.utils import AvailableURL, get_secretary diff --git a/proposals/utils/validate_proposal.py b/proposals/utils/validate_proposal.py index 4611a15ea..77c601e7c 100644 --- a/proposals/utils/validate_proposal.py +++ b/proposals/utils/validate_proposal.py @@ -23,7 +23,7 @@ ) from ..models import Proposal -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.urls import reverse_lazy as reverse diff --git a/proposals/views/proposal_views.py b/proposals/views/proposal_views.py index 141e94095..07d1685c4 100644 --- a/proposals/views/proposal_views.py +++ b/proposals/views/proposal_views.py @@ -8,7 +8,7 @@ from django.db.models import Q from django.db.models.fields.files import FieldFile from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.views import generic from django.http import FileResponse diff --git a/proposals/views/study_views.py b/proposals/views/study_views.py index cb53258a0..9d35f404c 100644 --- a/proposals/views/study_views.py +++ b/proposals/views/study_views.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import AllowErrorsOnBackbuttonMixin, UpdateView, FormSetUpdateView from studies.models import Documents, Study diff --git a/proposals/views/wmo_views.py b/proposals/views/wmo_views.py index 15a049437..59d35dc0b 100644 --- a/proposals/views/wmo_views.py +++ b/proposals/views/wmo_views.py @@ -4,7 +4,7 @@ from django.http import JsonResponse from django.views import generic from django.views.decorators.csrf import csrf_exempt -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.models import YesNoDoubt from main.views import CreateView, UpdateView, AllowErrorsOnBackbuttonMixin diff --git a/requirements.in b/requirements.in index 8343939d2..dc65c1494 100644 --- a/requirements.in +++ b/requirements.in @@ -1,4 +1,4 @@ -Django>=3.2,<4.0 +Django>=4.2,<5.0 django-auth-ldap django-braces django-modeltranslation @@ -19,9 +19,8 @@ django-user-agents pillow>=6.0 pygments requests --e git+https://github.com/UiL-OTS-labs/django-shared-core.git@v2.0.10#egg=uil-django-core -e git+https://github.com/UiL-OTS-labs/python-docx2txt#egg=docx2txt -cdh-django-core[federated-auth] @ git+https://github.com/CentreForDigitalHumanities/django-shared-core.git@v3.1.0 +cdh-django-core[core,federated-auth,vue,mail,files,rest,recommended] @ git+https://github.com/CentreForDigitalHumanities/django-shared-core.git@v3.2.0-alpha.0 python-magic pdftotext bpython diff --git a/requirements.txt b/requirements.txt index 0dad18191..5a89a4ab2 100644 --- a/requirements.txt +++ b/requirements.txt @@ -2,12 +2,10 @@ # This file is autogenerated by pip-compile with Python 3.9 # by the following command: # -# pip-compile -U +# pip-compile # -e git+https://github.com/UiL-OTS-labs/python-docx2txt#egg=docx2txt # via -r requirements.in --e git+https://github.com/UiL-OTS-labs/django-shared-core.git@v2.0.10#egg=uil-django-core - # via -r requirements.in alabaster==0.7.16 # via sphinx arabic-reshaper==3.0.0 @@ -21,13 +19,15 @@ asn1crypto==1.5.1 # pyhanko-certvalidator babel==2.14.0 # via sphinx -black==24.3.0 +black==24.4.0 # via -r requirements.in blessed==1.20.0 # via curtsies bpython==0.24 - # via -r requirements.in -cdh-django-core[federated-auth] @ git+https://github.com/CentreForDigitalHumanities/django-shared-core.git@v3.1.0 + # via + # -r requirements.in + # cdh-django-core +cdh-django-core[core,federated-auth,files,mail,recommended,rest,vue] @ git+https://github.com/CentreForDigitalHumanities/django-shared-core.git@v3.2.0-alpha.0 # via -r requirements.in certifi==2024.2.2 # via @@ -45,11 +45,12 @@ click==8.1.7 # djlint # pyhanko closure==20191111 - # via uil-django-core + # via cdh-django-core colorama==0.4.6 # via djlint cryptography==42.0.5 # via + # cdh-django-core # pyhanko # pyhanko-certvalidator # pyopenssl @@ -70,14 +71,16 @@ defusedxml==0.7.1 # pysaml2 deprecated==1.2.14 # via cdh-django-core -django==3.2.25 +django==4.2.11 # via # -r requirements.in # cdh-django-core # django-auth-ldap # django-braces + # django-csp # django-debug-toolbar # django-extensions + # django-filter # django-modeltranslation # django-simple-menu # django-user-agents @@ -85,28 +88,43 @@ django==3.2.25 # djangosaml2 # sentry-sdk # sphinxcontrib-django - # uil-django-core -django-auth-ldap==4.7.0 +django-auth-ldap==4.8.0 # via -r requirements.in django-braces==1.15.0 - # via -r requirements.in + # via + # -r requirements.in + # cdh-django-core +django-csp==3.8 + # via cdh-django-core django-debug-toolbar==4.3.0 - # via -r requirements.in + # via + # -r requirements.in + # cdh-django-core django-extensions==3.2.3 - # via -r requirements.in + # via + # -r requirements.in + # cdh-django-core +django-filter==24.2 + # via cdh-django-core django-impersonate==1.9.2 - # via -r requirements.in + # via + # -r requirements.in + # cdh-django-core django-modeltranslation==0.18.11 - # via -r requirements.in + # via + # -r requirements.in + # cdh-django-core django-simple-menu==2.1.3 - # via -r requirements.in + # via + # -r requirements.in + # cdh-django-core django-user-agents==0.4.0 # via -r requirements.in djangorestframework==3.15.1 # via # -r requirements.in - # uil-django-core -djangosaml2==1.6.0 + # cdh-django-core +djangosaml2==1.9.2 # via # -r requirements.in # cdh-django-core @@ -132,7 +150,7 @@ html5lib==1.1 # via # -r requirements.in # xhtml2pdf -idna==3.6 +idna==3.7 # via requests imagesize==1.4.1 # via sphinx @@ -144,11 +162,11 @@ jsbeautifier==1.15.1 # via # cssbeautifier # djlint -json5==0.9.24 +json5==0.9.25 # via djlint lesscpy==0.15.1 - # via uil-django-core -lxml==5.2.0 + # via cdh-django-core +lxml==5.2.1 # via svglib markupsafe==2.1.5 # via jinja2 @@ -203,17 +221,17 @@ pyhanko-certvalidator==0.26.3 # pyhanko # xhtml2pdf pyjwt==2.8.0 - # via uil-django-core + # via cdh-django-core pyopenssl==24.1.0 # via pysaml2 -pypdf==4.1.0 +pypdf==4.2.0 # via xhtml2pdf pypng==0.20220715.0 # via qrcode pysaml2==7.5.0 # via djangosaml2 pyscss==1.4.0 - # via uil-django-core + # via cdh-django-core python-bidi==0.4.2 # via xhtml2pdf python-dateutil==2.9.0.post0 @@ -221,11 +239,11 @@ python-dateutil==2.9.0.post0 python-ldap==3.4.4 # via django-auth-ldap python-magic==0.4.27 - # via -r requirements.in -pytz==2024.1 # via - # django - # pysaml2 + # -r requirements.in + # cdh-django-core +pytz==2024.1 + # via pysaml2 pyxdg==0.28 # via bpython pyyaml==6.0.1 @@ -244,12 +262,12 @@ requests==2.31.0 # via # -r requirements.in # bpython + # cdh-django-core # pyhanko # pyhanko-certvalidator # pysaml2 # sphinx - # uil-django-core -sentry-sdk[django]==1.44.0 +sentry-sdk[django]==1.45.0 # via -r requirements.in six==1.16.0 # via @@ -289,7 +307,7 @@ sphinxcontrib-qthelp==1.0.7 # via sphinx sphinxcontrib-serializinghtml==1.1.10 # via sphinx -sqlparse==0.4.4 +sqlparse==0.5.0 # via # django # django-debug-toolbar @@ -305,7 +323,7 @@ tomli==2.0.1 # djlint tqdm==4.66.2 # via djlint -typing-extensions==4.10.0 +typing-extensions==4.11.0 # via # asgiref # black @@ -325,7 +343,7 @@ urllib3==2.2.1 user-agents==2.2.0 # via django-user-agents vbuild==0.8.2 - # via uil-django-core + # via cdh-django-core wcwidth==0.2.13 # via blessed webencodings==0.5.1 diff --git a/reviews/api/serializers.py b/reviews/api/serializers.py index 3a5e10ec8..613835ce3 100644 --- a/reviews/api/serializers.py +++ b/reviews/api/serializers.py @@ -1,5 +1,5 @@ from proposals.models import Proposal -from uil.core.rest.serializers import ModelDisplaySerializer +from cdh.rest.server.serializers import ModelDisplaySerializer from ..models import Decision, Review from rest_framework import serializers from main.serializers import UserSerializer diff --git a/reviews/api/views.py b/reviews/api/views.py index 7a3b48d00..cc3bfa0da 100644 --- a/reviews/api/views.py +++ b/reviews/api/views.py @@ -4,12 +4,12 @@ from braces.views import GroupRequiredMixin, LoginRequiredMixin from django.conf import settings from django.db.models import Q, Exists, OuterRef -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from rest_framework.authentication import SessionAuthentication from main.utils import is_secretary from proposals.models import Proposal -from uil.vue.rest import FancyListApiView +from cdh.vue.rest import FancyListApiView from ..mixins import CommitteeMixin from ..models import Decision, Review diff --git a/reviews/forms.py b/reviews/forms.py index 50aad9951..51743f736 100644 --- a/reviews/forms.py +++ b/reviews/forms.py @@ -1,6 +1,6 @@ from django import forms from django.contrib.auth.models import Group -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.conf import settings from main.forms import ConditionalModelForm from main.utils import YES_NO, get_reviewers_from_groups, is_secretary diff --git a/reviews/mixins.py b/reviews/mixins.py index 209331413..7a4f2af65 100644 --- a/reviews/mixins.py +++ b/reviews/mixins.py @@ -1,8 +1,9 @@ +from functools import cached_property + from django.conf import settings from django.contrib.auth.models import Group from django.core.exceptions import ImproperlyConfigured, PermissionDenied -from django.utils.functional import cached_property -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.views.generic.base import ContextMixin from django.views.generic.detail import SingleObjectMixin diff --git a/reviews/models.py b/reviews/models.py index a86803074..fb4bd85c4 100644 --- a/reviews/models.py +++ b/reviews/models.py @@ -1,7 +1,7 @@ from django.conf import settings from django.contrib.auth import get_user_model from django.db import models -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.utils import timezone from proposals.models import Proposal diff --git a/reviews/templates/reviews/change_chamber_form.html b/reviews/templates/reviews/change_chamber_form.html index 8daafe976..f254ceb63 100644 --- a/reviews/templates/reviews/change_chamber_form.html +++ b/reviews/templates/reviews/change_chamber_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Beoordelende kamer wijzigen" %}</h2> <form action="" method="post" enctype="multipart/form-data"> @@ -16,11 +16,8 @@ <h2>{% trans "Beoordelende kamer wijzigen" %}</h2> <table> {{ form.as_table }} </table> - <input class="pure-button pure-button-primary" - type="submit" - value="{% trans 'OK' %}" /> - <a class="pure-button pure-button-secondary" - href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <input class="btn btn-primary" type="submit" value="{% trans 'OK' %}" /> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> </form> </div> </div> diff --git a/reviews/templates/reviews/committee_members_workload.html b/reviews/templates/reviews/committee_members_workload.html index 99455a54d..605dbbb39 100644 --- a/reviews/templates/reviews/committee_members_workload.html +++ b/reviews/templates/reviews/committee_members_workload.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load fetc_filters %} {% load get_field_name %} @@ -13,7 +13,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h3 class="mb-3">{% trans 'Lopende reviews' %} {{ committee }}</h3> <table class="dt w-100" data-language="{% datatables_lang %}"> diff --git a/reviews/templates/reviews/decision_form.html b/reviews/templates/reviews/decision_form.html index 8a1c5d85b..c16b32af7 100644 --- a/reviews/templates/reviews/decision_form.html +++ b/reviews/templates/reviews/decision_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> {% with review=decision.review %} {% include "reviews/review_detail_sidebar.html" %} {% endwith %} @@ -95,9 +95,9 @@ <h2>{% trans "Aanvraag beoordelen" %}</h2> <table> {{ form.as_table }} </table> - <div class="float-right"> - <a class="button" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> - <input class="pure-button pure-button-primary" + <div class="float-end"> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <input class="btn btn-primary" type="submit" value="{% trans 'Beslissing opslaan' %}" /> </div> diff --git a/reviews/templates/reviews/review_assign_form.html b/reviews/templates/reviews/review_assign_form.html index 3db20b2ba..e86bc2b3c 100644 --- a/reviews/templates/reviews/review_assign_form.html +++ b/reviews/templates/reviews/review_assign_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -21,7 +21,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> {% with review=review %} {% include "reviews/review_detail_sidebar.html" %} {% endwith %} @@ -42,11 +42,9 @@ <h2>{% trans "Commissieleden aanstellen" %}</h2> <table> {{ form.as_table }} </table> - <div class="float-right"> - <a class="button" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> - <input class="pure-button pure-button-primary" - type="submit" - value="{% trans 'OK' %}" /> + <div class="float-end"> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <input class="btn btn-primary" type="submit" value="{% trans 'OK' %}" /> </div> </form> {% if not review.proposal.is_pre_assessment %} diff --git a/reviews/templates/reviews/review_close_form.html b/reviews/templates/reviews/review_close_form.html index 9a892a9ea..1f5417839 100644 --- a/reviews/templates/reviews/review_close_form.html +++ b/reviews/templates/reviews/review_close_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -19,7 +19,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Review afsluiten" %}</h2> <p> @@ -36,8 +36,8 @@ <h3>{% trans "Uiteindelijk besluit" %}</h3> <table> {{ form.as_table }} </table> - <div class="float-right"> - <a class="button" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <div class="float-end"> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> <input type="submit" value="{% trans 'Review afsluiten' %}" /> </div> </form> diff --git a/reviews/templates/reviews/review_closed.html b/reviews/templates/reviews/review_closed.html index 16bf1d18a..3a847aa8f 100644 --- a/reviews/templates/reviews/review_closed.html +++ b/reviews/templates/reviews/review_closed.html @@ -1,11 +1,11 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load proposal_filters %} {% load fetc_filters %} {% load i18n %} {% load compare_tags %} -{% load uil_filters %} +{% load cdh_filters %} {% block header_title %} {% trans 'Aanvraag al beoordeeld' %} @@ -14,7 +14,7 @@ {% block content %} {% url 'proposals:my_supervised' as my_supervised_url %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12 col-md-9"> <h2> {% trans 'Aanvraag al beoordeeld' %} diff --git a/reviews/templates/reviews/review_detail.html b/reviews/templates/reviews/review_detail.html index 7bbd8719a..ec0545773 100644 --- a/reviews/templates/reviews/review_detail.html +++ b/reviews/templates/reviews/review_detail.html @@ -1,23 +1,23 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load proposal_filters %} {% load fetc_filters %} {% load i18n %} {% load compare_tags %} -{% load uil_filters %} +{% load cdh_filters %} {% block header_title %} {{ review.proposal.title }} - {{ review.proposal.reference_number }} - {{ block.super }} {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{{ review.proposal.title }} - {{ review.proposal.reference_number }}</h2> </div> </div> - <div class="uu-inner-container"> + <div class="uu-container"> {% with review=review %} {% include "reviews/review_detail_sidebar.html" %} {% endwith %} diff --git a/reviews/templates/reviews/review_discontinue_form.html b/reviews/templates/reviews/review_discontinue_form.html index abf941f0a..0b733f368 100644 --- a/reviews/templates/reviews/review_discontinue_form.html +++ b/reviews/templates/reviews/review_discontinue_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -21,7 +21,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> {% with review=review %} {% include "reviews/review_detail_sidebar.html" %} {% endwith %} @@ -66,11 +66,9 @@ <h2>{% trans "Afhandeling definitief beëindigen" %}</h2> <table> {{ form.as_table }} </table> - <div class="float-right"> - <a class="button" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> - <input class="pure-button pure-button-primary" - type="submit" - value="{% trans 'OK' %}" /> + <div class="float-end"> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <input class="btn btn-primary" type="submit" value="{% trans 'OK' %}" /> </div> </form> </div> diff --git a/reviews/templates/reviews/ufl_list.html b/reviews/templates/reviews/ufl_list.html index 19b54414d..124d7a34b 100644 --- a/reviews/templates/reviews/ufl_list.html +++ b/reviews/templates/reviews/ufl_list.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -10,7 +10,7 @@ {% block html_head %} {# This template loads in either the dev or prod Vue library, depending on settings.DEBUG #} - {% include 'uil.vue/vueloader.html' %} + {% include 'cdh.vue/vueloader.html' %} {# Load in the base component FancyList #} {% load_vue_component 'FancyList' %} {% include list_template %} @@ -23,7 +23,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{{ committee_name }} - {{ title }}</h2> </div> diff --git a/reviews/templates/reviews/vue_templates/decision_list.html b/reviews/templates/reviews/vue_templates/decision_list.html index 5fc6f3839..82de71277 100644 --- a/reviews/templates/reviews/vue_templates/decision_list.html +++ b/reviews/templates/reviews/vue_templates/decision_list.html @@ -16,7 +16,7 @@ <script type="text/x-template" id="reviewsUFLList"> <FancyList {# It's a long, but standard, list, so we just include the default list #} - {% include 'uil.vue/fancy-list-params.txt' %} + {% include 'cdh.vue/fancy-list-params.txt' %} > {# General note: the #{slot}="data" defines in which Vue variable all properties are loaded. #} {# FancyList only exposes `item` and `context`, where item is the item from the data for a given row. #} diff --git a/reviews/templates/reviews/vue_templates/decision_list_reviewer.html b/reviews/templates/reviews/vue_templates/decision_list_reviewer.html index b457e524c..68e09cab9 100644 --- a/reviews/templates/reviews/vue_templates/decision_list_reviewer.html +++ b/reviews/templates/reviews/vue_templates/decision_list_reviewer.html @@ -16,7 +16,7 @@ <script type="text/x-template" id="reviewsUFLList"> <FancyList {# It's a long, but standard, list, so we just include the default list #} - {% include 'uil.vue/fancy-list-params.txt' %} + {% include 'cdh.vue/fancy-list-params.txt' %} > {# General note: the #{slot}="data" defines in which Vue variable all properties are loaded. #} {# FancyList only exposes `item` and `context`, where item is the item from the data for a given row. #} diff --git a/reviews/templates/reviews/vue_templates/review_list.html b/reviews/templates/reviews/vue_templates/review_list.html index b9f90fcea..9037b16d0 100644 --- a/reviews/templates/reviews/vue_templates/review_list.html +++ b/reviews/templates/reviews/vue_templates/review_list.html @@ -17,7 +17,7 @@ <script type="text/x-template" id="reviewsUFLList"> <FancyList {# It's a long, but standard, list, so we just include the default list #} - {% include 'uil.vue/fancy-list-params.txt' %} + {% include 'cdh.vue/fancy-list-params.txt' %} > {# General note: the #{slot}="data" defines in which Vue variable all properties are loaded. #} {# FancyList only exposes `item` and `context`, where item is the item from the data for a given row. #} diff --git a/reviews/templatetags/documents_list.py b/reviews/templatetags/documents_list.py index 612096a7a..ebc74db4f 100644 --- a/reviews/templatetags/documents_list.py +++ b/reviews/templatetags/documents_list.py @@ -5,7 +5,7 @@ from proposals.models import Proposal, Wmo from observations.models import Observation from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.utils.html import escape from django.utils.safestring import mark_safe diff --git a/reviews/utils/review_actions.py b/reviews/utils/review_actions.py index a4ddb947b..3dcbc4bf8 100644 --- a/reviews/utils/review_actions.py +++ b/reviews/utils/review_actions.py @@ -1,4 +1,4 @@ -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from django.urls import reverse from django.conf import settings from django.utils.safestring import mark_safe diff --git a/reviews/utils/review_utils.py b/reviews/utils/review_utils.py index 9342178a7..8eb6bf9ce 100644 --- a/reviews/utils/review_utils.py +++ b/reviews/utils/review_utils.py @@ -5,7 +5,7 @@ from django.core.mail import send_mail from django.urls import reverse from django.template.loader import render_to_string -from django.utils.translation import activate, get_language, ugettext_lazy as _ +from django.utils.translation import activate, get_language, gettext_lazy as _ from django.utils import timezone from main.models import YesNoDoubt diff --git a/reviews/views.py b/reviews/views.py index 3b9c4e9a8..e27547fad 100644 --- a/reviews/views.py +++ b/reviews/views.py @@ -8,7 +8,7 @@ from django.urls import reverse from django.utils import timezone from django.views import generic -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.contrib.auth import get_user_model from django.db.models import Q, Count diff --git a/studies/app.py b/studies/apps.py similarity index 74% rename from studies/app.py rename to studies/apps.py index 12b40970d..129d34c42 100644 --- a/studies/app.py +++ b/studies/apps.py @@ -6,4 +6,4 @@ class StudiesConfig(AppConfig): verbose_name = "studies" def ready(self): - import studies.signals.handlers + import studies.signals.handlers # noqa diff --git a/studies/forms.py b/studies/forms.py index 10a07fe4c..f82f45a45 100644 --- a/studies/forms.py +++ b/studies/forms.py @@ -2,8 +2,8 @@ from django import forms from django.utils.functional import lazy -from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ +from django.utils.safestring import mark_safe, SafeString +from django.utils.translation import gettext_lazy as _ from main.forms import ConditionalModelForm, SoftValidationMixin from main.models import YesNoDoubt @@ -43,7 +43,7 @@ class Meta: "recruitment": forms.CheckboxSelectMultiple(), "compensation": forms.RadioSelect(), } - mark_safe_lazy = lazy(mark_safe, str) + mark_safe_lazy = lazy(mark_safe, SafeString) labels = { "legally_incapable": mark_safe_lazy( _( diff --git a/studies/models.py b/studies/models.py index 8644113f0..878b1a277 100644 --- a/studies/models.py +++ b/studies/models.py @@ -6,11 +6,11 @@ from django.db.models import Q -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from django.utils.functional import lazy -from django.utils.safestring import mark_safe +from django.utils.safestring import mark_safe, SafeString -mark_safe_lazy = lazy(mark_safe, str) +mark_safe_lazy = lazy(mark_safe, SafeString) from main.models import YesNoDoubt from main.validators import validate_pdf_or_doc diff --git a/studies/templates/studies/session_start.html b/studies/templates/studies/session_start.html index abd44e591..f88486434 100644 --- a/studies/templates/studies/session_start.html +++ b/studies/templates/studies/session_start.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/studies/templates/studies/study_design.html b/studies/templates/studies/study_design.html index d0ed355dc..30fded803 100644 --- a/studies/templates/studies/study_design.html +++ b/studies/templates/studies/study_design.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/studies/templates/studies/study_end.html b/studies/templates/studies/study_end.html index 3af305f74..2d40f32bf 100644 --- a/studies/templates/studies/study_end.html +++ b/studies/templates/studies/study_end.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -19,7 +19,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/studies/templates/studies/study_form.html b/studies/templates/studies/study_form.html index 68238b8fd..f59ea6910 100644 --- a/studies/templates/studies/study_form.html +++ b/studies/templates/studies/study_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -72,7 +72,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/studies/templates/studies/study_update_attachments.html b/studies/templates/studies/study_update_attachments.html index 7d6ca5288..c36dc200b 100644 --- a/studies/templates/studies/study_update_attachments.html +++ b/studies/templates/studies/study_update_attachments.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Formulieren aanpassen" %}</h2> <p> @@ -23,11 +23,10 @@ <h2>{% trans "Formulieren aanpassen" %}</h2> {{ form.as_table }} </table> <input type="hidden" name="next" value="{{ request.META.HTTP_REFERER }}"> - <input class="pure-button pure-button-primary" + <input class="btn btn-primary" type="submit" value="{% trans 'Formulieren aanpassen' %}" /> - <a class="pure-button pure-button-secondary" - href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> + <a class="btn btn-secondary" href="javascript:history.go(-1);">{% trans "Terug naar de vorige pagina" %}</a> </form> </div> </div> diff --git a/studies/templatetags/describe_documents.py b/studies/templatetags/describe_documents.py index 59d3849f1..301b459f5 100644 --- a/studies/templatetags/describe_documents.py +++ b/studies/templatetags/describe_documents.py @@ -3,7 +3,7 @@ from django.urls import reverse from django.utils.html import escape from django.utils.safestring import mark_safe -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from observations.models import Observation from proposals.models import Proposal, Wmo diff --git a/studies/utils.py b/studies/utils.py index 30c3e9206..fa364fcd4 100644 --- a/studies/utils.py +++ b/studies/utils.py @@ -1,7 +1,7 @@ from __future__ import division from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from main.utils import AvailableURL from interventions.utils import intervention_url, copy_intervention_to_study diff --git a/studies/views/session_views.py b/studies/views/session_views.py index 2583c6eef..509665069 100644 --- a/studies/views/session_views.py +++ b/studies/views/session_views.py @@ -1,7 +1,7 @@ # -*- encoding: utf-8 -*- from django.urls import reverse -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import AllowErrorsOnBackbuttonMixin, UpdateView from tasks.models import Session diff --git a/studies/views/study_views.py b/studies/views/study_views.py index 38e100737..83c8be473 100644 --- a/studies/views/study_views.py +++ b/studies/views/study_views.py @@ -6,7 +6,7 @@ from django.http import JsonResponse from django.views import generic from django.views.decorators.csrf import csrf_exempt -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import AllowErrorsOnBackbuttonMixin, UpdateView from main.utils import string_to_bool diff --git a/tasks/forms.py b/tasks/forms.py index 33f756a42..3eaadf57d 100644 --- a/tasks/forms.py +++ b/tasks/forms.py @@ -1,17 +1,17 @@ # -*- encoding: utf-8 -*- from django import forms -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.forms import ConditionalModelForm, SoftValidationMixin from main.utils import YES_NO from .models import Session, Task -from django.utils.safestring import mark_safe +from django.utils.safestring import mark_safe, SafeString from django.utils.functional import lazy -mark_safe_lazy = lazy(mark_safe, str) +mark_safe_lazy = lazy(mark_safe, SafeString) class TaskStartForm(SoftValidationMixin, ConditionalModelForm): diff --git a/tasks/models.py b/tasks/models.py index cc4297b1f..f674e6b0f 100644 --- a/tasks/models.py +++ b/tasks/models.py @@ -1,6 +1,6 @@ from django.db import models from django.core.validators import MinValueValidator, MaxValueValidator -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.models import SettingModel from studies.models import Study diff --git a/tasks/templates/tasks/session_confirm_delete.html b/tasks/templates/tasks/session_confirm_delete.html index f5cbacfbd..93c17bb0a 100644 --- a/tasks/templates/tasks/session_confirm_delete.html +++ b/tasks/templates/tasks/session_confirm_delete.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} @@ -7,7 +7,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Sessie verwijderen" %}</h2> <form action="" method="post"> @@ -15,10 +15,10 @@ <h2>{% trans "Sessie verwijderen" %}</h2> <p> Weet u zeker dat u deze sessie <strong>{{ session.order }}</strong> in de aanvraag <em>{{ session.study.proposal.title }}</em> wilt verwijderen? </p> - <input class="button btn-danger" + <input class="btn btn-danger" type="submit" value="{% trans 'Verwijderen' %}" /> - <a class="button" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> + <a class="btn btn-secondary" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> </form> </div> </div> diff --git a/tasks/templates/tasks/task_confirm_delete.html b/tasks/templates/tasks/task_confirm_delete.html index 70eb88b56..48bd6a93d 100644 --- a/tasks/templates/tasks/task_confirm_delete.html +++ b/tasks/templates/tasks/task_confirm_delete.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load i18n %} @@ -7,7 +7,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> <h2>{% trans "Taak verwijderen" %}</h2> <form action="" method="post"> @@ -15,10 +15,10 @@ <h2>{% trans "Taak verwijderen" %}</h2> <p> Weet u zeker dat u de taak <strong>{{ task.name }}</strong> uit sessie <strong>{{ task.session.order }}</strong> in de aanvraag <em>{{ task.session.study.proposal.title }}</em> wilt verwijderen? </p> - <input class="button btn-danger" + <input class="btn btn-danger" type="submit" value="{% trans 'Verwijderen' %}" /> - <a class="button" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> + <a class="btn btn-secondary" href="javascript:history.go(-1)">{% trans "Annuleren" %}</a> </form> </div> </div> diff --git a/tasks/templates/tasks/task_end.html b/tasks/templates/tasks/task_end.html index 8c2d8fa00..aa0957017 100644 --- a/tasks/templates/tasks/task_end.html +++ b/tasks/templates/tasks/task_end.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -8,7 +8,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=session.study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/tasks/templates/tasks/task_form.html b/tasks/templates/tasks/task_form.html index 53fce3fee..9d4f48f34 100644 --- a/tasks/templates/tasks/task_form.html +++ b/tasks/templates/tasks/task_form.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -19,7 +19,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=task.session.study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/tasks/templates/tasks/task_start.html b/tasks/templates/tasks/task_start.html index 763210e55..3552d6843 100644 --- a/tasks/templates/tasks/task_start.html +++ b/tasks/templates/tasks/task_start.html @@ -1,4 +1,4 @@ -{% extends "base/base.html" %} +{% extends "base/fetc_base.html" %} {% load static %} {% load i18n %} @@ -19,7 +19,7 @@ {% endblock %} {% block content %} - <div class="uu-inner-container"> + <div class="uu-container"> <div class="col-12"> {% with nav_items=session.study.proposal.available_urls active=3 %} {% include 'base/navigation.html' %} diff --git a/tasks/utils.py b/tasks/utils.py index 3742292fa..3d77c981e 100644 --- a/tasks/utils.py +++ b/tasks/utils.py @@ -1,7 +1,7 @@ from __future__ import division from django.urls import reverse -from django.utils.translation import ugettext as _ +from django.utils.translation import gettext as _ from main.utils import AvailableURL diff --git a/tasks/views/session_views.py b/tasks/views/session_views.py index dd079898b..3a3e9b29b 100644 --- a/tasks/views/session_views.py +++ b/tasks/views/session_views.py @@ -2,7 +2,7 @@ from django.urls import reverse from django.http import HttpResponseRedirect -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import AllowErrorsOnBackbuttonMixin, UpdateView, DeleteView from ..forms import TaskStartForm, TaskEndForm @@ -21,7 +21,7 @@ class SessionDelete(DeletionAllowedMixin, DeleteView): def get_success_url(self): return reverse("studies:design_end", args=(self.object.study.pk,)) - def delete(self, request, *args, **kwargs): + def form_valid(self, form): """ Deletes the Session and updates the Study and other Sessions. Completely overrides the default delete function (as that calls delete too late for us). diff --git a/tasks/views/task_views.py b/tasks/views/task_views.py index 3ed3975ef..07c5ff325 100644 --- a/tasks/views/task_views.py +++ b/tasks/views/task_views.py @@ -2,7 +2,7 @@ from django.urls import reverse from django.http import HttpResponseRedirect -from django.utils.translation import ugettext_lazy as _ +from django.utils.translation import gettext_lazy as _ from main.views import AllowErrorsOnBackbuttonMixin, UpdateView, DeleteView from ..forms import TaskForm @@ -58,7 +58,7 @@ class TaskDelete(DeletionAllowedMixin, DeleteView): def get_success_url(self): return reverse("tasks:end", args=(self.object.session.pk,)) - def delete(self, request, *args, **kwargs): + def form_valid(self, form): """ Deletes the Task and updates the Session. Completely overrides the default delete function (as that calls delete too late for us).