From e1275280c35023d4c0608cf604cf68c4b60b05b1 Mon Sep 17 00:00:00 2001 From: Bryce Willey Date: Fri, 5 Dec 2025 10:10:38 -0500 Subject: [PATCH] Actually use `.view_label` and `.download_label` `action_button_html` expects a string for the label, and if it doesn't get it, it just shows the default of "Edit". We started passing `DALazyTemplates` in #992, and hadn't done enough testing to ensure that the labels shown there are correct. This patch fixes the issue by running the `DALazyTemplate` through `str()` before passing to `action_button_html`. --- docassemble/AssemblyLine/al_document.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/docassemble/AssemblyLine/al_document.py b/docassemble/AssemblyLine/al_document.py index 82ce1e7c..6cf647a8 100644 --- a/docassemble/AssemblyLine/al_document.py +++ b/docassemble/AssemblyLine/al_document.py @@ -2058,13 +2058,13 @@ def download_list_html( str: HTML representation of a table with documents and their associated actions. """ if not view_label: - view_label = self.view_label or word("View") + view_label = str(self.view_label) or word("View") if not download_label: - download_label = self.download_label or word("Download") + download_label = str(self.download_label) or word("Download") if not send_label: - send_label = self.send_label or word("Send") + send_label = str(self.send_label) or word("Send") if zip_format is None: zip_format = format @@ -2275,7 +2275,7 @@ def send_email_table_row( str: The generated HTML string for the table row. """ if not send_label: - send_label = self.send_label or word("Send") + send_label = str(self.send_label) or word("Send") if not self.has_enabled_documents(): return "" # Don't let people email an empty set of documents @@ -2342,7 +2342,7 @@ def send_button_to_html( str: The generated HTML string for the button. """ if label is None: - label = self.send_label or word("Send") + label = str(self.send_label) or word("Send") if not self.has_enabled_documents(): return "" # Don't let people email an empty set of documents