diff --git a/src/openforms/registrations/contrib/email/tests/test_backend.py b/src/openforms/registrations/contrib/email/tests/test_backend.py
index d23c1142ce..ec6dcf0293 100644
--- a/src/openforms/registrations/contrib/email/tests/test_backend.py
+++ b/src/openforms/registrations/contrib/email/tests/test_backend.py
@@ -217,7 +217,9 @@ def test_submission_with_email_backend(self):
self.assertTagWithTextIn("td", "foo", message_html)
self.assertTagWithTextIn("td", "bar", message_html)
self.assertTagWithTextIn("td", "some_list", message_html)
- self.assertTagWithTextIn("td", "value1; value2", message_html)
+ self.assertTagWithTextIn(
+ "td", "
", message_html
+ )
cosigner_line = f"{_('Co-signed by')}: Demo Person"
@@ -777,7 +779,7 @@ def test_regression_nested_components_columns(self):
message = mail.outbox[0]
message_html = message.alternatives[0][0]
- self.assertIn("Backend; Frontend", message_html)
+ self.assertInHTML("
", message_html)
@patch("openforms.registrations.contrib.email.plugin.EmailConfig.get_solo")
def test_with_global_config_attach_files(self, mock_get_solo):
diff --git a/src/openforms/submissions/templates/report/submission_report.html b/src/openforms/submissions/templates/report/submission_report.html
index 5b51d10f1f..774db1eee7 100644
--- a/src/openforms/submissions/templates/report/submission_report.html
+++ b/src/openforms/submissions/templates/report/submission_report.html
@@ -25,13 +25,21 @@
{% include 'includes/design-tokens.html' with skip_csp=True %}
+ {% if config.organization_name %}
+ {% blocktranslate with name=config.organization_name asvar logo_alt trimmed %}
+ Logo {{ name }}
+ {% endblocktranslate %}
+ {% else %}
+ {% trans "Logo" as logo_alt %}
+ {% endif %}
+
diff --git a/src/openforms/submissions/tests/test_submission_report.py b/src/openforms/submissions/tests/test_submission_report.py
index 2a80608246..6c53b56368 100644
--- a/src/openforms/submissions/tests/test_submission_report.py
+++ b/src/openforms/submissions/tests/test_submission_report.py
@@ -138,7 +138,7 @@ def test_report_is_generated_in_same_language_as_submission(self):
("postcode", "3744 AA"),
("radio", "Radio number one"),
("select", "A fine selection"),
- ("selectboxes", "This; That; The Other"),
+ ("selectboxes", ""),
("signature", SIGNATURE),
("textarea", "Largish predetermined ASCII"),
("textfield", "Short predetermined ASCII"),
diff --git a/src/openforms/submissions/tests/test_tasks_pdf.py b/src/openforms/submissions/tests/test_tasks_pdf.py
index c0f8eb7f49..5ae5d4ce9c 100644
--- a/src/openforms/submissions/tests/test_tasks_pdf.py
+++ b/src/openforms/submissions/tests/test_tasks_pdf.py
@@ -262,6 +262,201 @@ def test_timestamp_included(self):
self.assertEqual(reference_node.text, "Report created on: Jan. 1, 2024, 1 a.m.")
+ def test_textfield_component_with_multiple_is_rendered_as_html(self):
+ submission = SubmissionFactory.from_components(
+ [
+ {
+ "type": "textfield",
+ "key": "textfield-single",
+ "label": "Textfield single",
+ "multiple": False,
+ },
+ {
+ "type": "textfield",
+ "key": "textfield-multiple",
+ "label": "Textfield multiple",
+ "multiple": True,
+ },
+ ],
+ submitted_data={
+ "textfield-single": "foo",
+ "textfield-multiple": ["foo", "bar"],
+ },
+ with_report=True,
+ )
+ html = submission.report.generate_submission_report_pdf()
+
+ expected = format_html(
+ """
+
+
Textfield single
+
+ foo
+
+
+
+ """,
+ )
+ self.assertInHTML(expected, html, count=1)
+
+ def test_select_component_with_multiple_is_rendered_as_html(self):
+ submission = SubmissionFactory.from_components(
+ [
+ {
+ "type": "select",
+ "key": "select-single",
+ "label": "Select single",
+ "multiple": False,
+ "openForms": {
+ "dataSrc": "manual",
+ },
+ "data": {
+ "values": [
+ {"label": "Single select Option 1", "value": "option1"},
+ {"label": "Single select Option 2", "value": "option2"},
+ ]
+ },
+ },
+ {
+ "type": "select",
+ "key": "select-multiple",
+ "label": "Select multiple",
+ "multiple": True,
+ "openForms": {
+ "dataSrc": "manual",
+ },
+ "data": {
+ "values": [
+ {
+ "label": "Multiple select Option 1",
+ "value": "option1",
+ },
+ {
+ "label": "Multiple select Option 2",
+ "value": "option2",
+ },
+ {
+ "label": "Multiple select Option 3",
+ "value": "option3",
+ },
+ ]
+ },
+ },
+ ],
+ submitted_data={
+ "select-single": "option1",
+ "select-multiple": ["option1", "option3"],
+ },
+ with_report=True,
+ )
+ html = submission.report.generate_submission_report_pdf()
+
+ expected = format_html(
+ """
+
+
Select single
+
+ Single select Option 1
+
+
+
+
Select multiple
+
+
- Multiple select Option 1
- Multiple select Option 3
+
+
+ """,
+ )
+ self.assertInHTML(expected, html, count=1)
+
+ def test_selectboxes_component_is_rendered_as_html(self):
+ submission = SubmissionFactory.from_components(
+ [
+ {
+ "type": "selectboxes",
+ "key": "selectboxes",
+ "label": "Selectboxes",
+ "values": [
+ {
+ "value": "option1",
+ "label": "Selectbox Option 1",
+ },
+ {
+ "value": "option2",
+ "label": "Selectbox Option 2",
+ },
+ {
+ "value": "option3",
+ "label": "Selectbox Option 3",
+ },
+ ],
+ },
+ ],
+ submitted_data={
+ "selectboxes": {
+ "option1": True,
+ "option3": True,
+ },
+ },
+ with_report=True,
+ )
+ html = submission.report.generate_submission_report_pdf()
+
+ expected = format_html(
+ """
+
+
Selectboxes
+
+
- Selectbox Option 1
- Selectbox Option 3
+
+
+ """,
+ )
+ self.assertInHTML(expected, html, count=1)
+
+ def test_radio_component_is_rendered_as_plain_text(self):
+ submission = SubmissionFactory.from_components(
+ [
+ {
+ "type": "radio",
+ "key": "radio",
+ "label": "Radio",
+ "values": [
+ {
+ "value": "firstradiooption",
+ "label": "First radio option",
+ },
+ {
+ "value": "secondradiooption",
+ "label": "Second radio option",
+ },
+ ],
+ },
+ ],
+ submitted_data={
+ "radio": "secondradiooption",
+ },
+ with_report=True,
+ )
+ html = submission.report.generate_submission_report_pdf()
+
+ expected = format_html(
+ """
+
+
Radio
+
+ Second radio option
+
+
+ """,
+ )
+ self.assertInHTML(expected, html, count=1)
+
@temp_private_root()
class SubmissionReportCoSignTests(TestCase):
diff --git a/src/openforms/templates/includes/page-header.html b/src/openforms/templates/includes/page-header.html
index b55218212d..992cb9e3af 100644
--- a/src/openforms/templates/includes/page-header.html
+++ b/src/openforms/templates/includes/page-header.html
@@ -8,9 +8,13 @@
{% get_solo 'config.GlobalConfiguration' as config %}
{% get_theme as theme %}
-{% blocktranslate with name=config.organization_name asvar logo_alt trimmed %}
-Back to website of {{ name }}
-{% endblocktranslate %}
+{% if config.organization_name %}
+ {% blocktranslate with name=config.organization_name asvar logo_alt trimmed %}
+ Back to website of {{ name }}
+ {% endblocktranslate %}
+{% else %}
+ {% trans "Back to website" as logo_alt %}
+{% endif %}
diff --git a/src/openforms/utils/pdf.py b/src/openforms/utils/pdf.py
index bc9324d251..a92aca08c3 100644
--- a/src/openforms/utils/pdf.py
+++ b/src/openforms/utils/pdf.py
@@ -106,5 +106,5 @@ def render_to_pdf(template_name: str, context: dict) -> tuple[str, bytes]:
url_fetcher=UrlFetcher(),
base_url=settings.BASE_URL,
)
- pdf: bytes = html_object.write_pdf()
+ pdf: bytes = html_object.write_pdf(pdf_variant="pdf/ua-1")
return rendered_html, pdf