Skip to content

Commit 39dc9aa

Browse files
committed
Merge branch 'release/1.0.0' into main
2 parents a93e8ad + 171dc07 commit 39dc9aa

File tree

5 files changed

+15
-12
lines changed

5 files changed

+15
-12
lines changed

edc_consent/field_mixins/personal_fields_mixin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,9 +31,9 @@ class BaseFieldsMixin(models.Model):
3131
blank=True,
3232
null=True,
3333
help_text=format_html(
34-
"Required only if participant is a minor.<BR>"
35-
"Format is 'LASTNAME, FIRSTNAME'. "
36-
"All uppercase separated by a comma."
34+
"{}.<BR>{}",
35+
"Required only if participant is a minor",
36+
"Format is 'LASTNAME, FIRSTNAME'. All uppercase separated by a comma.",
3737
),
3838
)
3939

edc_consent/field_mixins/vulnerability_fields_mixin.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -34,9 +34,9 @@ class VulnerabilityFieldsMixin(CryptoMixin, models.Model):
3434
blank=True,
3535
null=True,
3636
help_text=format_html(
37-
"Required only if participant is illiterate.<br>"
38-
"Format is 'LASTNAME, FIRSTNAME'. "
39-
"All uppercase separated by a comma."
37+
"{}.<br>{}",
38+
"Required only if participant is illiterate",
39+
"Format is 'LASTNAME, FIRSTNAME'. All uppercase separated by a comma.",
4040
),
4141
)
4242

edc_consent/modeladmin_mixins/consent_model_admin_mixin.py

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
from django.core.exceptions import MultipleObjectsReturned, ObjectDoesNotExist
77
from django.urls import reverse
88
from django.utils.html import format_html
9+
from django.utils.safestring import mark_safe
910
from edc_identifier import SubjectIdentifierError, is_subject_identifier_or_raise
1011

1112
from ..actions import flag_as_verified_against_paper, unflag_as_verified_against_paper
@@ -179,13 +180,16 @@ def queries(self, obj=None) -> str:
179180
)
180181
if links:
181182
formatted_html = format_html(
182-
"<BR>".join(links) + f'<BR><A title="New query" '
183-
f'href="{new_url}">Add query</A>'
183+
'<BR>{links}<BR><A title="New query" href="{new_url}">Add query</A>',
184+
links=mark_safe("<BR>".join(links)), # nosec B703 B308
185+
new_url=new_url,
184186
)
185187
else:
186188
formatted_html = format_html(
187-
f'<A title="New query" href="{new_url}?"'
188-
f'subject_identifier={obj.subject_identifier}">Add query</A>'
189+
'<A title="New query" href="{new_url}?"'
190+
'subject_identifier={subject_identifier}">Add query</A>',
191+
new_url=new_url,
192+
subject_identifier=obj.subject_identifier,
189193
)
190194
return formatted_html
191195

File renamed without changes.

edc_consent/views/home_view.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
from typing import Any
22

33
from django.views.generic.base import TemplateView
4-
from edc_dashboard.utils import get_bootstrap_version
54
from edc_dashboard.view_mixins import EdcViewMixin
65
from edc_navbar import NavbarViewMixin
76

@@ -10,7 +9,7 @@
109

1110

1211
class HomeView(EdcViewMixin, NavbarViewMixin, TemplateView):
13-
template_name = f"edc_consent/bootstrap{get_bootstrap_version()}/home.html"
12+
template_name = "edc_consent/home.html"
1413
navbar_name = "edc_consent"
1514
navbar_selected_item = "consent"
1615

0 commit comments

Comments
 (0)