Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/footer #698

Merged
merged 5 commits into from
Sep 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 22 additions & 0 deletions main/templates/base/fetc_base.html
Original file line number Diff line number Diff line change
Expand Up @@ -37,3 +37,25 @@
{% endif %}
{% include 'base/tool_language_box.html' %}
{% endblock %}

{% block site-footer %}
{% get_current_language as LANGUAGE_CODE %}
<div class="uu-footer">
<div class="col-10">
{% with 'cdh.core/images/logo-footer-'|add:LANGUAGE_CODE|add:'.svg' as header_image %}
<img src="{% static header_image %}"
alt="{% trans 'cdh.core:uu' %}"
title="{% trans 'cdh.core:uu' %}" />
{% endwith %}
</div>
<div class="col-2 d-none d-md-block">
{% if request.user.is_authenticated %}
<a href="{% url 'logout' %}">{% trans 'Log uit' %}</a>
<br />
{% else %}
<a href="{% url 'login' %}">{% trans 'Log in' %}</a>
<br />
{% endif %}
</div>
</div>
{% endblock %}
21 changes: 0 additions & 21 deletions proposals/forms.py
Original file line number Diff line number Diff line change
Expand Up @@ -579,27 +579,6 @@ def clean(self):
)


class WmoCheckForm(TemplatedModelForm):
class Meta:
model = Wmo
fields = [
"metc",
"is_medical",
]
widgets = {
"metc": BootstrapRadioSelect(),
"is_medical": BootstrapRadioSelect(),
}

def __init__(self, *args, **kwargs):
"""
- Remove empty label from is_medical/is_behavioristic field and reset the choices
"""
super(WmoCheckForm, self).__init__(*args, **kwargs)
self.fields["is_medical"].empty_label = None
self.fields["is_medical"].choices = YesNoDoubt.choices


class WmoApplicationForm(SoftValidationMixin, ConditionalModelForm):
class Meta:
model = Wmo
Expand Down
2 changes: 0 additions & 2 deletions proposals/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,6 @@
WmoCreate,
WmoUpdate,
WmoApplication,
WmoCheck,
check_wmo,
WmoCreatePreAssessment,
WmoUpdatePreAssessment,
Expand Down Expand Up @@ -264,7 +263,6 @@
]
),
),
path("wmo/check/", WmoCheck.as_view(), name="wmo_check"),
path("wmo/check_js/", check_wmo, name="check_wmo"),
path(
"compare/",
Expand Down
14 changes: 5 additions & 9 deletions proposals/utils/pdf_diff_logic.py
Original file line number Diff line number Diff line change
Expand Up @@ -1034,8 +1034,7 @@ def create_context_pdf(context, model):
for num, document in enumerate(extra_documents):
sections.append(ExtraDocumentsSection(document, num))

if model.dmp_file:
sections.append(DMPFileSection(model))
sections.append(DMPFileSection(model))

sections.append(EmbargoSection(model))
sections.append(CommentsSection(model))
Expand Down Expand Up @@ -1209,14 +1208,11 @@ def create_context_diff(context, old_proposal, new_proposal):
)
)

if old_proposal.dmp_file or new_proposal.dmp_file:
sections.append(
DiffSection(
*multi_sections(
DMPFileSection, [old_proposal, new_proposal]
)
)
sections.append(
DiffSection(
*multi_sections(DMPFileSection, [old_proposal, new_proposal])
)
)

sections.append(
DiffSection(EmbargoSection(old_proposal), EmbargoSection(new_proposal))
Expand Down
7 changes: 1 addition & 6 deletions proposals/views/wmo_views.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
from proposals.mixins import StepperContextMixin

from ..models import Proposal, Wmo
from ..forms import WmoForm, WmoApplicationForm, WmoCheckForm
from ..forms import WmoForm, WmoApplicationForm


#####################
Expand Down Expand Up @@ -112,11 +112,6 @@ def get_back_url(self):
return reverse("proposals:wmo_update", args=(self.object.pk,))


class WmoCheck(generic.FormView):
form_class = WmoCheckForm
template_name = "proposals/wmo_check.html"


########################
# Preliminary assessment
########################
Expand Down
Loading