docassemble.AssemblyLine 4.4.0__tar.gz → 4.5.1__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- docassemble_assemblyline-4.5.1/MANIFEST.in +17 -0
- {docassemble_assemblyline-4.4.0/docassemble.AssemblyLine.egg-info → docassemble_assemblyline-4.5.1}/PKG-INFO +1 -5
- docassemble_assemblyline-4.5.1/docassemble/AssemblyLine/__init__.py +1 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/al_document.py +222 -18
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/al_general.py +2 -2
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_language.yml +13 -2
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_visual.yml +12 -5
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/assembly_line.yml +2 -2
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/interview_list.yml +2 -2
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_aldocument.yml +4 -4
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/language.py +1 -1
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/sessions.py +9 -9
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/test_al_document.py +69 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/test_al_general.py +13 -0
- docassemble_assemblyline-4.5.1/docassemble/AssemblyLine/test_all_imports.py +12 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1/docassemble.AssemblyLine.egg-info}/PKG-INFO +1 -5
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble.AssemblyLine.egg-info/SOURCES.txt +1 -4
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/pyproject.toml +15 -1
- docassemble_assemblyline-4.5.1/setup.cfg +4 -0
- docassemble_assemblyline-4.4.0/MANIFEST.in +0 -1
- docassemble_assemblyline-4.4.0/docassemble/AssemblyLine/__init__.py +0 -1
- docassemble_assemblyline-4.4.0/docassemble/AssemblyLine/requirements.txt +0 -9
- docassemble_assemblyline-4.4.0/docassemble.AssemblyLine.egg-info/not-zip-safe +0 -1
- docassemble_assemblyline-4.4.0/setup.cfg +0 -7
- docassemble_assemblyline-4.4.0/setup.py +0 -60
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/LICENSE +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/README.md +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/al_courts.py +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/custom_jinja_filters.py +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_code.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_document.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_package.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_package_unstyled.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_question_test.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_reminders.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_saved_sessions.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_saved_sessions_store.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_settings.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/al_terms_of_use.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/assembly_line_unstyled.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/demo_search_sessions.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/feedback.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/ql_baseline.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/ql_catchall.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/ql_namechange.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/reserved_words.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_al_table_document.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_aladdendum.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_alcourts.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_aldocument_background_assembly.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_alexhibit.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_alexhibit_maxsize.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_bundle_parity.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_catchall.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_familiar_disambiguation.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_if_final.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_preferred_formats.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_preferred_name.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_question_library.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/questions/test_signature.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/README.md +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/ar-words.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/es-words.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/fr-words.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/languages.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/ne-words.yml +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/test_aldocument.feature +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/test_alexhibit_docx_1.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/test_alexhibit_jpg_1.jpg +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/test_alexhibit_pdf_1.pdf +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/test_alexhibit_png_1.png +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/test_question_library.feature +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/translation_es.xlsx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/translation_ht.xlsx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/sources/translation_pt.xlsx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/README.md +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/al_audio.css +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/al_audio.js +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/aldocument.css +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/aldocument.js +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/interview_list.css +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/limit_upload_size.js +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/lt1-pullout-10-getting-organized.pdf +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/ma_logo.png +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/placeholder.png +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/seal.jpg +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/static/styles.css +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/README.md +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/al_basic_addendum.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/exhibit_cover_sheet.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/exhibit_table_of_contents.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/general_cover_sheet.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/sample_word_template.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/test_aldocument_docx_1.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/test_aldocument_pdf_1.pdf +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/test_catchall.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/data/templates/test_if_final.docx +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/py.typed +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/sign.py +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble/AssemblyLine/test_language.py +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble.AssemblyLine.egg-info/dependency_links.txt +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble.AssemblyLine.egg-info/requires.txt +0 -0
- {docassemble_assemblyline-4.4.0 → docassemble_assemblyline-4.5.1}/docassemble.AssemblyLine.egg-info/top_level.txt +0 -0
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
include README.md
|
|
2
|
+
graft docassemble/AssemblyLine/data
|
|
3
|
+
recursive-exclude * *.egg-info
|
|
4
|
+
recursive-exclude .git *
|
|
5
|
+
recursive-exclude venv *
|
|
6
|
+
recursive-exclude .github *
|
|
7
|
+
recursive-exclude .pytest_cache *
|
|
8
|
+
recursive-exclude .vscode *
|
|
9
|
+
recursive-exclude build *
|
|
10
|
+
recursive-exclude dist *
|
|
11
|
+
recursive-exclude * __pycache__
|
|
12
|
+
recursive-exclude * *.pyc
|
|
13
|
+
recursive-exclude * *.pyo
|
|
14
|
+
recursive-exclude * *.orig
|
|
15
|
+
recursive-exclude * *~
|
|
16
|
+
recursive-exclude * *.bak
|
|
17
|
+
recursive-exclude * *.swp
|
|
@@ -1,9 +1,7 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docassemble.AssemblyLine
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.5.1
|
|
4
4
|
Summary: Quickly go from a paper court form to a runnable, guided, step-by-step web application powered by Docassemble. Swap out branding and pre-built questions to meet your needs.
|
|
5
|
-
Home-page: https://courtformsonline.org
|
|
6
|
-
Author: Suffolk Legal Innovation and Technology Lab
|
|
7
5
|
Author-email: Suffolk Legal Innovation and Technology Lab <litlab@suffolk.edu>
|
|
8
6
|
License-Expression: MIT
|
|
9
7
|
Project-URL: Homepage, https://courtformsonline.org
|
|
@@ -11,8 +9,6 @@ Description-Content-Type: text/markdown
|
|
|
11
9
|
License-File: LICENSE
|
|
12
10
|
Requires-Dist: docassemble.ALToolbox>=0.16.0
|
|
13
11
|
Requires-Dist: docassemble.GitHubFeedbackForm>=0.4.1.1
|
|
14
|
-
Dynamic: author
|
|
15
|
-
Dynamic: home-page
|
|
16
12
|
Dynamic: license-file
|
|
17
13
|
|
|
18
14
|
# Suffolk LIT Lab Document Assembly Line
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '4.5.1'
|
|
@@ -945,6 +945,15 @@ class ALDocument(DADict):
|
|
|
945
945
|
instance. These values will be used to detect and handle overflow.
|
|
946
946
|
has_addendum (bool): (optional) Defaults to False. Set to True if the
|
|
947
947
|
document could have overflow, like for a PDF template.
|
|
948
|
+
default_overflow_message (str): The message appended to truncated text when it overflows
|
|
949
|
+
to the addendum. Defaults to `"..."`. This is used as the fallback whenever
|
|
950
|
+
`overflow_message=None` is passed to :meth:`safe_value`,
|
|
951
|
+
:meth:`overflow_value`, or :meth:`original_or_overflow_message`.
|
|
952
|
+
Override per-document by setting `my_doc.default_overflow_message`.
|
|
953
|
+
suffix_to_append (str): When the document key matches this value, it is appended to
|
|
954
|
+
the output filename to distinguish it from other versions. Defaults to `"preview"`
|
|
955
|
+
so the preview version is saved as e.g. `myDoc_preview.pdf` while the final
|
|
956
|
+
version is saved as `myDoc.pdf`.
|
|
948
957
|
|
|
949
958
|
Note:
|
|
950
959
|
The `enabled` attribute should always be defined by a code block or the
|
|
@@ -1099,6 +1108,7 @@ class ALDocument(DADict):
|
|
|
1099
1108
|
|
|
1100
1109
|
if isinstance(main_doc, DAFileCollection):
|
|
1101
1110
|
main_doc = main_doc.pdf
|
|
1111
|
+
if isinstance(main_doc, DAFile):
|
|
1102
1112
|
main_doc.title = self.title
|
|
1103
1113
|
main_doc.filename = filename
|
|
1104
1114
|
try:
|
|
@@ -1254,6 +1264,8 @@ class ALDocument(DADict):
|
|
|
1254
1264
|
Args:
|
|
1255
1265
|
field_name (str): The name of the field to check.
|
|
1256
1266
|
overflow_message (str): A short message to go on the page where text is cutoff.
|
|
1267
|
+
If `None`, falls back to `self.default_overflow_message`
|
|
1268
|
+
(`"..."` by default).
|
|
1257
1269
|
input_width (int): The width, in characters, of the input box. Defaults to 80.
|
|
1258
1270
|
preserve_newlines (bool): Determines whether newlines are preserved in the "safe" text.
|
|
1259
1271
|
Defaults to False, which means all newlines are removed. This allows more text to appear
|
|
@@ -1292,7 +1304,9 @@ class ALDocument(DADict):
|
|
|
1292
1304
|
|
|
1293
1305
|
Args:
|
|
1294
1306
|
field_name (str): The name of the field to retrieve the safe value from.
|
|
1295
|
-
overflow_message (Optional[str]): Message
|
|
1307
|
+
overflow_message (Optional[str]): Message appended when the field value is truncated.
|
|
1308
|
+
If `None`, falls back to `self.default_overflow_message`
|
|
1309
|
+
(`"..."` by default).
|
|
1296
1310
|
preserve_newlines (bool): Whether to maintain newlines in the output. Defaults to False.
|
|
1297
1311
|
input_width (int): The expected input width, used for formatting. Defaults to 80.
|
|
1298
1312
|
preserve_words (bool): Whether to avoid splitting words during formatting. Defaults to True.
|
|
@@ -1322,7 +1336,9 @@ class ALDocument(DADict):
|
|
|
1322
1336
|
|
|
1323
1337
|
Args:
|
|
1324
1338
|
field_name (str): The name of the field to retrieve the overflow value from.
|
|
1325
|
-
overflow_message (Optional[str]): Message
|
|
1339
|
+
overflow_message (Optional[str]): Message appended when the safe portion of the field
|
|
1340
|
+
value is truncated. If `None`, falls back to `self.default_overflow_message`
|
|
1341
|
+
(`"..."` by default).
|
|
1326
1342
|
preserve_newlines (bool): Whether to maintain newlines in the output. Defaults to False.
|
|
1327
1343
|
input_width (int): The expected input width, used for formatting. Defaults to 80.
|
|
1328
1344
|
preserve_words (bool): Whether to avoid splitting words during formatting. Defaults to True.
|
|
@@ -1548,7 +1564,62 @@ class ALDocumentBundle(DAList):
|
|
|
1548
1564
|
enabled (bool, optional): Determines if the bundle is active. Defaults to True.
|
|
1549
1565
|
auto_gather (bool, optional): Automatically gathers attributes. Defaults to False.
|
|
1550
1566
|
gathered (bool, optional): Specifies if attributes have been gathered. Defaults to True.
|
|
1551
|
-
default_parity (Optional[Literal["even", "odd"]]): Default parity to enforce on the PDF.
|
|
1567
|
+
default_parity (Optional[Literal["even", "odd"]]): Default parity to enforce on the PDF.
|
|
1568
|
+
When set, :meth:`as_pdf` will append a blank page if necessary to reach the desired
|
|
1569
|
+
parity. Defaults to `None` (no enforcement).
|
|
1570
|
+
suffix_to_append (str): When the document key matches this value, it is appended to the
|
|
1571
|
+
output filename to distinguish it from other versions. Defaults to `"preview"`
|
|
1572
|
+
so the preview bundle is saved as e.g. `bundle_preview.pdf` while the final is
|
|
1573
|
+
saved as `bundle.pdf`.
|
|
1574
|
+
view_label (DALazyTemplate): Template providing the label for "View" buttons in
|
|
1575
|
+
:meth:`download_list_html`. Defined generically in `ql_baseline.yml`; resolves to
|
|
1576
|
+
`"View"` (or its translation). Override by assigning a new template to
|
|
1577
|
+
`your_bundle.view_label` in your interview YAML.
|
|
1578
|
+
download_label (DALazyTemplate): Template providing the label for "Download" buttons in
|
|
1579
|
+
:meth:`download_list_html`. Defined generically in `ql_baseline.yml`; resolves to
|
|
1580
|
+
`"Download"` (or its translation).
|
|
1581
|
+
send_label (DALazyTemplate): Template providing the label for "Send" buttons in
|
|
1582
|
+
:meth:`download_list_html`, :meth:`send_email_table_row`, and
|
|
1583
|
+
:meth:`send_button_to_html`. Defined generically in `ql_baseline.yml`; resolves to
|
|
1584
|
+
`"Send"` (or its translation).
|
|
1585
|
+
zip_label (DALazyTemplate): Template providing the label for the "Download all" zip
|
|
1586
|
+
button in :meth:`download_list_html`. Defined generically in `al_document.yml`;
|
|
1587
|
+
resolves to `"Download all"` (or its translation).
|
|
1588
|
+
full_pdf_label (DALazyTemplate): Template providing the label for the "Download as one
|
|
1589
|
+
PDF" button in :meth:`download_list_html`. Defined generically in
|
|
1590
|
+
`al_document.yml`; resolves to `"Download as one PDF"` (or its translation).
|
|
1591
|
+
send_email_template (DALazyTemplate): Template used as the default email subject and
|
|
1592
|
+
body in :meth:`send_email` when `template=None`. Defined generically in
|
|
1593
|
+
`al_document.yml`. The subject defaults to
|
|
1594
|
+
`"Your <document> document from <app> is ready"` and the body to
|
|
1595
|
+
`"Your document is attached. Visit <homepage> to learn more."`
|
|
1596
|
+
Override by assigning a new template block to `your_bundle.send_email_template`
|
|
1597
|
+
in your interview YAML.
|
|
1598
|
+
get_email_copy (DALazyTemplate): Template providing the header text for the email input
|
|
1599
|
+
section rendered by :meth:`send_button_html`. Defined generically in
|
|
1600
|
+
`al_document.yml`; resolves to `"Get a copy of the documents in email"`
|
|
1601
|
+
(or its translation).
|
|
1602
|
+
include_editable_documents (DALazyTemplate): Template providing the label for the
|
|
1603
|
+
"include editable copy" checkbox in :meth:`send_button_html`. Defined generically
|
|
1604
|
+
in `al_document.yml`; resolves to `"Include an editable copy"`
|
|
1605
|
+
(or its translation).
|
|
1606
|
+
add_page_numbers (bool): If `True`, Bates-style page numbers are stamped onto the
|
|
1607
|
+
merged PDF produced by :meth:`as_pdf`. Defaults to `False`.
|
|
1608
|
+
page_number_prefix (str): Text prepended to each stamped page number (e.g. `"EX-"`).
|
|
1609
|
+
Defaults to `""`.
|
|
1610
|
+
page_number_start (int): The first page number used when stamping page numbers.
|
|
1611
|
+
Defaults to `1`.
|
|
1612
|
+
page_number_digits (int): Minimum number of digits in each stamped page number;
|
|
1613
|
+
shorter numbers are left-padded with zeros. Defaults to `5`.
|
|
1614
|
+
page_number_area (Optional[str]): Location on the page where numbers are stamped.
|
|
1615
|
+
Accepted values: `"TOP_LEFT"`, `"TOP_RIGHT"`, `"BOTTOM_LEFT"`,
|
|
1616
|
+
`"BOTTOM_RIGHT"`. Defaults to `None` (bottom-right).
|
|
1617
|
+
page_number_font_size (float): Font size in points for stamped page numbers.
|
|
1618
|
+
Defaults to `10`.
|
|
1619
|
+
page_number_offset_horizontal (float): Horizontal inset in pixels from the nearest
|
|
1620
|
+
page edge for stamped page numbers. Defaults to `15`.
|
|
1621
|
+
page_number_offset_vertical (float): Vertical inset in pixels from the nearest page
|
|
1622
|
+
edge for stamped page numbers. Defaults to `15`.
|
|
1552
1623
|
|
|
1553
1624
|
Examples:
|
|
1554
1625
|
Given three documents: `Cover page`, `Main motion form`, and `Notice of Interpreter Request`,
|
|
@@ -1581,6 +1652,7 @@ class ALDocumentBundle(DAList):
|
|
|
1581
1652
|
self.auto_gather = False
|
|
1582
1653
|
if "gathered" not in kwargs:
|
|
1583
1654
|
self.gathered = True
|
|
1655
|
+
self._set_default_attributes()
|
|
1584
1656
|
self.initializeAttribute("cache", DALazyAttribute)
|
|
1585
1657
|
self.always_enabled = hasattr(self, "enabled") and self.enabled
|
|
1586
1658
|
# Pre-cache some DALazyTemplates we set up to aid translation that won't
|
|
@@ -1589,6 +1661,24 @@ class ALDocumentBundle(DAList):
|
|
|
1589
1661
|
# When the key is "preview", append it to the file name
|
|
1590
1662
|
self.suffix_to_append = "preview"
|
|
1591
1663
|
|
|
1664
|
+
def _set_default_attributes(self) -> None:
|
|
1665
|
+
if not hasattr(self, "add_page_numbers"):
|
|
1666
|
+
self.add_page_numbers = False
|
|
1667
|
+
if not hasattr(self, "page_number_prefix"):
|
|
1668
|
+
self.page_number_prefix = ""
|
|
1669
|
+
if not hasattr(self, "page_number_start"):
|
|
1670
|
+
self.page_number_start = 1
|
|
1671
|
+
if not hasattr(self, "page_number_digits"):
|
|
1672
|
+
self.page_number_digits = 5
|
|
1673
|
+
if not hasattr(self, "page_number_area"):
|
|
1674
|
+
self.page_number_area = None
|
|
1675
|
+
if not hasattr(self, "page_number_font_size"):
|
|
1676
|
+
self.page_number_font_size = 10
|
|
1677
|
+
if not hasattr(self, "page_number_offset_horizontal"):
|
|
1678
|
+
self.page_number_offset_horizontal = 15
|
|
1679
|
+
if not hasattr(self, "page_number_offset_vertical"):
|
|
1680
|
+
self.page_number_offset_vertical = 15
|
|
1681
|
+
|
|
1592
1682
|
def as_pdf(
|
|
1593
1683
|
self,
|
|
1594
1684
|
key: str = "final",
|
|
@@ -1641,13 +1731,31 @@ class ALDocumentBundle(DAList):
|
|
|
1641
1731
|
pdfa=pdfa,
|
|
1642
1732
|
append_matching_suffix=append_matching_suffix,
|
|
1643
1733
|
)
|
|
1734
|
+
bundle_filename = f"{base_name(self.filename)}{append_suffix}.pdf"
|
|
1644
1735
|
pdf.title = self.title
|
|
1736
|
+
pdf.filename = bundle_filename
|
|
1737
|
+
try:
|
|
1738
|
+
pdf.set_attributes(filename=bundle_filename)
|
|
1739
|
+
pdf.set_mimetype("application/pdf")
|
|
1740
|
+
except:
|
|
1741
|
+
pass
|
|
1645
1742
|
else:
|
|
1646
1743
|
pdf = pdf_concatenate(
|
|
1647
1744
|
[document.as_pdf(key=key, refresh=refresh) for document in files],
|
|
1648
1745
|
filename=f"{base_name(self.filename)}{append_suffix}.pdf",
|
|
1649
1746
|
pdfa=pdfa,
|
|
1650
1747
|
)
|
|
1748
|
+
if hasattr(self, "add_page_numbers") and self.add_page_numbers:
|
|
1749
|
+
self._set_default_attributes()
|
|
1750
|
+
pdf.bates_number(
|
|
1751
|
+
prefix=self.page_number_prefix,
|
|
1752
|
+
start=self.page_number_start,
|
|
1753
|
+
digits=self.page_number_digits,
|
|
1754
|
+
area=self.page_number_area,
|
|
1755
|
+
font_size=self.page_number_font_size,
|
|
1756
|
+
offset_horizontal=self.page_number_offset_horizontal,
|
|
1757
|
+
offset_vertical=self.page_number_offset_vertical,
|
|
1758
|
+
)
|
|
1651
1759
|
pdf.title = self.title
|
|
1652
1760
|
setattr(self.cache, safe_key, pdf)
|
|
1653
1761
|
|
|
@@ -2034,13 +2142,21 @@ class ALDocumentBundle(DAList):
|
|
|
2034
2142
|
refresh (bool): Flag to reconsider the 'enabled' attribute, default is True.
|
|
2035
2143
|
pdfa (bool): Flag to return documents in PDF/A format, default is False.
|
|
2036
2144
|
include_zip (bool): Flag to include a zip option, default is True.
|
|
2037
|
-
view_label (str): Label for the 'view' button
|
|
2145
|
+
view_label (str): Label for the 'view' button. If `None`, falls back to
|
|
2146
|
+
`self.view_label` (a translatable template defined in `ql_baseline.yml`,
|
|
2147
|
+
defaulting to `"View"`).
|
|
2038
2148
|
view_icon (str): Icon for the 'view' button, default is "eye".
|
|
2039
|
-
download_label (str): Label for the 'download' button
|
|
2149
|
+
download_label (str): Label for the 'download' button. If `None`, falls back to
|
|
2150
|
+
`self.download_label` (a translatable template defined in `ql_baseline.yml`,
|
|
2151
|
+
defaulting to `"Download"`).
|
|
2040
2152
|
download_icon (str): Icon for the 'download' button, default is "download".
|
|
2041
|
-
send_label (str): Label for the 'send' button.
|
|
2153
|
+
send_label (str): Label for the 'send' button. If `None`, falls back to
|
|
2154
|
+
`self.send_label` (a translatable template defined in `ql_baseline.yml`,
|
|
2155
|
+
defaulting to `"Send"`).
|
|
2042
2156
|
send_icon (str): Fontawesome icon for the 'send' button. Default is "envelope".
|
|
2043
|
-
zip_label (Optional[str]): Label for the zip
|
|
2157
|
+
zip_label (Optional[str]): Label for the zip button. If `None`, falls back to
|
|
2158
|
+
`self.zip_label` (a translatable template defined in `al_document.yml`,
|
|
2159
|
+
defaulting to `"Download all"`).
|
|
2044
2160
|
zip_icon (str): Icon for the zip option, default is "file-archive".
|
|
2045
2161
|
zip_row_label (str, optional): Text to go in the left-most column
|
|
2046
2162
|
of the table's zip row. Will default to the value of `self.title`.
|
|
@@ -2266,7 +2382,9 @@ class ALDocumentBundle(DAList):
|
|
|
2266
2382
|
|
|
2267
2383
|
Args:
|
|
2268
2384
|
key (str): A key used to identify which version of the ALDocument to send. Defaults to "final".
|
|
2269
|
-
send_label (str): Label for the 'send' button.
|
|
2385
|
+
send_label (str): Label for the 'send' button. If `None`, falls back to
|
|
2386
|
+
`self.send_label` (a translatable template defined in `ql_baseline.yml`,
|
|
2387
|
+
defaulting to `"Send"`).
|
|
2270
2388
|
send_icon (str): Icon for the 'send' button. Default is "envelope".
|
|
2271
2389
|
|
|
2272
2390
|
Returns:
|
|
@@ -2330,7 +2448,9 @@ class ALDocumentBundle(DAList):
|
|
|
2330
2448
|
email (str): The recipient's email address.
|
|
2331
2449
|
editable (bool, optional): Flag indicating if the bundle is editable. Defaults to False. (deprecated; use preferred_formats instead)
|
|
2332
2450
|
template_name (str, optional): The name of the template to be used. Defaults to an empty string.
|
|
2333
|
-
label (str, optional): The label for the button.
|
|
2451
|
+
label (str, optional): The label for the button. If `None`, falls back to
|
|
2452
|
+
`self.send_label` (a translatable template defined in `ql_baseline.yml`,
|
|
2453
|
+
defaulting to `"Send"`).
|
|
2334
2454
|
icon (str, optional): The Fontawesome icon for the button. Defaults to "envelope".
|
|
2335
2455
|
color (str, optional): The Bootstrap color of the button. Defaults to "primary".
|
|
2336
2456
|
key (str, optional): A key used to identify which version of the ALDocument to send. Defaults to "final".
|
|
@@ -2385,6 +2505,7 @@ class ALDocumentBundle(DAList):
|
|
|
2385
2505
|
label: str = "Send",
|
|
2386
2506
|
icon: str = "envelope",
|
|
2387
2507
|
preferred_formats: Optional[Union[str, List[str]]] = None,
|
|
2508
|
+
email_legend_class: str = "h4",
|
|
2388
2509
|
) -> str:
|
|
2389
2510
|
"""
|
|
2390
2511
|
Generate HTML for an input box and button that allows someone to send the bundle
|
|
@@ -2404,6 +2525,8 @@ class ALDocumentBundle(DAList):
|
|
|
2404
2525
|
icon (str, optional): The Fontawesome icon for the button. Defaults
|
|
2405
2526
|
to "envelope".
|
|
2406
2527
|
preferred_formats (Optional[Union[str,List[str]]], optional): A list of allowed formats for the document. Defaults to "pdf" if not specified.
|
|
2528
|
+
email_legend_class (str, optional): CSS class applied to the email
|
|
2529
|
+
section legend. Defaults to "h4".
|
|
2407
2530
|
|
|
2408
2531
|
Returns:
|
|
2409
2532
|
str: The generated HTML string for the input box and button.
|
|
@@ -2443,7 +2566,7 @@ class ALDocumentBundle(DAList):
|
|
|
2443
2566
|
# Container of whole email section with header
|
|
2444
2567
|
return_str = f"""
|
|
2445
2568
|
<fieldset class="al_send_bundle al_send_section_alone {html_safe_str(self.instanceName)}" id="al_send_bundle_{name}" name="al_send_bundle_{name}">
|
|
2446
|
-
<legend class="
|
|
2569
|
+
<legend class="{email_legend_class} al_doc_email_header">{str(self.get_email_copy)}</legend>
|
|
2447
2570
|
"""
|
|
2448
2571
|
# "Editable" checkbox
|
|
2449
2572
|
if (
|
|
@@ -2495,7 +2618,14 @@ class ALDocumentBundle(DAList):
|
|
|
2495
2618
|
to (Any): The email address, list of email addresses, or list of Individuals with a .email attribute to send to.
|
|
2496
2619
|
key (str, optional): Specifies which version of the document to send. Defaults to "final".
|
|
2497
2620
|
editable (bool, optional): If True, sends the editable documents. Defaults to False. (Deprecated)
|
|
2498
|
-
template (Any): The template variable for the subject and body of the email,
|
|
2621
|
+
template (Any, optional): The template variable for the subject and body of the email,
|
|
2622
|
+
similar to the `template` parameter of docassemble's `send_email` function.
|
|
2623
|
+
If `None`, falls back to `self.send_email_template`, a template defined
|
|
2624
|
+
generically in `al_document.yml`. Its subject defaults to
|
|
2625
|
+
`"Your <document> document from <app> is ready"` and its body to
|
|
2626
|
+
`"Your document is attached. Visit <homepage> to learn more."`
|
|
2627
|
+
Override it by assigning a new template block to `your_bundle.send_email_template`
|
|
2628
|
+
in your interview YAML.
|
|
2499
2629
|
preferred_formats (str): Specifies the format of the files to send. Can be "pdf" or "docx", or a list of these formats. Overrides deprecated `editable` keyword.
|
|
2500
2630
|
**kwargs: Additional parameters to pass to the da `send_email` function.
|
|
2501
2631
|
|
|
@@ -2735,9 +2865,14 @@ class ALExhibit(DAObject):
|
|
|
2735
2865
|
self,
|
|
2736
2866
|
*,
|
|
2737
2867
|
refresh: bool = False,
|
|
2738
|
-
prefix: str = "",
|
|
2739
2868
|
pdfa: bool = False,
|
|
2740
2869
|
add_page_numbers: bool = True,
|
|
2870
|
+
page_number_prefix: str = "",
|
|
2871
|
+
page_number_digits: int = 5,
|
|
2872
|
+
page_number_area=None,
|
|
2873
|
+
page_number_font_size: float = 10,
|
|
2874
|
+
page_number_offset_horizontal: float = 15,
|
|
2875
|
+
page_number_offset_vertical: float = 15,
|
|
2741
2876
|
add_cover_page: bool = True,
|
|
2742
2877
|
filename: Optional[str] = None,
|
|
2743
2878
|
append_matching_suffix: bool = True,
|
|
@@ -2749,9 +2884,14 @@ class ALExhibit(DAObject):
|
|
|
2749
2884
|
|
|
2750
2885
|
Args:
|
|
2751
2886
|
refresh (bool): If True, forces the exhibit to refresh before generating the PDF. (unused, provided for signature compatibility)
|
|
2752
|
-
prefix (str): Prefix for Bates numbering if 'add_page_numbers' is True.
|
|
2753
2887
|
pdfa (bool): If True, the generated PDF will be in PDF/A format.
|
|
2754
2888
|
add_page_numbers (bool): If True, apply Bates numbering starting from 'self.start_page'.
|
|
2889
|
+
page_number_prefix (str): If add_page_numbers is True, this gets added to the beginning on the bates number each page (e.g. `EX-`).
|
|
2890
|
+
page_number_digits (int): How many digits (i.e. leading 0s) that the bates number will have
|
|
2891
|
+
page_number_area (str): Where on the page the bates number will go ("TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT" (default))
|
|
2892
|
+
page_number_font_size (float): How big the bates page number will be in points (default is 10).
|
|
2893
|
+
page_number_offset_horizontal (float): The number of pixels that the bates page number is offset from the left / right of the page.
|
|
2894
|
+
page_number_offset_vertical (float): The number of pixels that the bates page number is offset from the top / bottom of the page.
|
|
2755
2895
|
add_cover_page (bool): If True, prepend the exhibit with a cover page.
|
|
2756
2896
|
filename (Optional[str]): Custom filename for the generated PDF. Default is "exhibits.pdf".
|
|
2757
2897
|
append_matching_suffix (bool): If True, appends a suffix to the filename based on certain matching criteria.
|
|
@@ -2779,7 +2919,15 @@ class ALExhibit(DAObject):
|
|
|
2779
2919
|
)
|
|
2780
2920
|
|
|
2781
2921
|
if add_page_numbers:
|
|
2782
|
-
concatenated_pages.bates_number(
|
|
2922
|
+
concatenated_pages.bates_number(
|
|
2923
|
+
start=self.start_page,
|
|
2924
|
+
prefix=page_number_prefix,
|
|
2925
|
+
digits=page_number_digits,
|
|
2926
|
+
area=page_number_area,
|
|
2927
|
+
font_size=page_number_font_size,
|
|
2928
|
+
offset_horizontal=page_number_offset_horizontal,
|
|
2929
|
+
offset_vertical=page_number_offset_vertical,
|
|
2930
|
+
)
|
|
2783
2931
|
|
|
2784
2932
|
setattr(self._cache, safe_key, concatenated_pages)
|
|
2785
2933
|
return getattr(self._cache, safe_key)
|
|
@@ -2913,6 +3061,12 @@ class ALExhibitList(DAList):
|
|
|
2913
3061
|
filename="file.pdf",
|
|
2914
3062
|
pdfa: bool = False,
|
|
2915
3063
|
add_page_numbers: bool = False,
|
|
3064
|
+
page_number_prefix: str = "",
|
|
3065
|
+
page_number_digits: int = 5,
|
|
3066
|
+
page_number_area=None,
|
|
3067
|
+
page_number_font_size: float = 10,
|
|
3068
|
+
page_number_offset_horizontal: float = 15,
|
|
3069
|
+
page_number_offset_vertical: float = 15,
|
|
2916
3070
|
toc_pages: int = 0,
|
|
2917
3071
|
append_matching_suffix: bool = True,
|
|
2918
3072
|
) -> DAFile:
|
|
@@ -2923,6 +3077,12 @@ class ALExhibitList(DAList):
|
|
|
2923
3077
|
filename (str): Desired filename for the generated PDF.
|
|
2924
3078
|
pdfa (bool): If True, generates the PDF in PDF/A format.
|
|
2925
3079
|
add_page_numbers (bool): If True, adds page numbers to the generated PDF.
|
|
3080
|
+
page_number_prefix (str): What the bates number added to each page should start with (e.g. `EX-`).
|
|
3081
|
+
page_number_digits (int): How many digits (i.e. leading 0s) that the bates number will have
|
|
3082
|
+
page_number_area (str): Where on the page the bates number will go ("TOP_LEFT", "TOP_RIGHT", "BOTTOM_LEFT", "BOTTOM_RIGHT" (default))
|
|
3083
|
+
page_number_font_size (float): How big the bates page number will be in points (default is 10).
|
|
3084
|
+
page_number_offset_horizontal (float): The number of pixels that the bates page number is offset from the left / right of the page.
|
|
3085
|
+
page_number_offset_vertical (float): The number of pixels that the bates page number is offset from the top / bottom of the page.
|
|
2926
3086
|
toc_pages (int): Expected number of pages in the table of contents.
|
|
2927
3087
|
append_matching_suffix (bool): If True, appends matching suffix to the filename.
|
|
2928
3088
|
|
|
@@ -2934,12 +3094,19 @@ class ALExhibitList(DAList):
|
|
|
2934
3094
|
exhibit.cover_page
|
|
2935
3095
|
if self.include_table_of_contents and toc_pages != 1:
|
|
2936
3096
|
self._update_page_numbers(toc_guess_pages=toc_pages)
|
|
3097
|
+
if not page_number_prefix and self.bates_prefix:
|
|
3098
|
+
page_number_prefix = self.bates_prefix
|
|
2937
3099
|
return pdf_concatenate(
|
|
2938
3100
|
[
|
|
2939
3101
|
exhibit.as_pdf(
|
|
2940
3102
|
add_cover_page=self.include_exhibit_cover_pages,
|
|
2941
3103
|
add_page_numbers=add_page_numbers,
|
|
2942
|
-
|
|
3104
|
+
page_number_prefix=page_number_prefix,
|
|
3105
|
+
page_number_digits=page_number_digits,
|
|
3106
|
+
page_number_area=page_number_area,
|
|
3107
|
+
page_number_font_size=page_number_font_size,
|
|
3108
|
+
page_number_offset_horizontal=page_number_offset_horizontal,
|
|
3109
|
+
page_number_offset_vertical=page_number_offset_vertical,
|
|
2943
3110
|
)
|
|
2944
3111
|
for exhibit in self
|
|
2945
3112
|
],
|
|
@@ -3072,12 +3239,19 @@ class ALExhibitDocument(ALDocument):
|
|
|
3072
3239
|
has_addendum: bool
|
|
3073
3240
|
auto_labeler: Callable
|
|
3074
3241
|
auto_ocr: bool
|
|
3242
|
+
# Deprecated
|
|
3075
3243
|
bates_prefix: str
|
|
3076
3244
|
maximum_size: int
|
|
3077
3245
|
maximum_size_per_doc: int
|
|
3078
3246
|
suffix_to_append: str
|
|
3079
3247
|
exhibits: ALExhibitList
|
|
3080
3248
|
table_of_contents: DAFile
|
|
3249
|
+
page_number_prefix: str
|
|
3250
|
+
page_number_digits: int
|
|
3251
|
+
page_number_area: str | None
|
|
3252
|
+
page_number_font_size: float
|
|
3253
|
+
page_number_offset_horizontal: float
|
|
3254
|
+
page_number_offset_vertical: float
|
|
3081
3255
|
|
|
3082
3256
|
def init(self, *pargs, **kwargs) -> None:
|
|
3083
3257
|
"""Standard DAObject init method.
|
|
@@ -3092,8 +3266,6 @@ class ALExhibitDocument(ALDocument):
|
|
|
3092
3266
|
self.exhibits.auto_labeler = self.auto_labeler
|
|
3093
3267
|
if hasattr(self, "auto_ocr"):
|
|
3094
3268
|
self.exhibits.auto_ocr = self.auto_ocr
|
|
3095
|
-
if hasattr(self, "bates_prefix"):
|
|
3096
|
-
self.exhibits.bates_prefix = self.bates_prefix
|
|
3097
3269
|
if hasattr(self, "include_exhibit_cover_pages"):
|
|
3098
3270
|
self.exhibits.include_exhibit_cover_pages = self.include_exhibit_cover_pages
|
|
3099
3271
|
else:
|
|
@@ -3111,13 +3283,30 @@ class ALExhibitDocument(ALDocument):
|
|
|
3111
3283
|
else:
|
|
3112
3284
|
self.include_table_of_contents = True
|
|
3113
3285
|
self.exhibits.include_table_of_contents = True
|
|
3286
|
+
if hasattr(self, "bates_prefix"):
|
|
3287
|
+
self.exhibits.bates_prefix = self.bates_prefix
|
|
3114
3288
|
if not hasattr(self, "add_page_numbers"):
|
|
3115
3289
|
self.add_page_numbers = False
|
|
3290
|
+
self._set_default_attributes()
|
|
3116
3291
|
self.has_addendum = False
|
|
3117
3292
|
if not hasattr(self, "suffix_to_append"):
|
|
3118
3293
|
# When the key is "preview", append it to the file name
|
|
3119
3294
|
self.suffix_to_append = "preview"
|
|
3120
3295
|
|
|
3296
|
+
def _set_default_attributes(self) -> None:
|
|
3297
|
+
if not hasattr(self, "page_number_prefix"):
|
|
3298
|
+
self.page_number_prefix = ""
|
|
3299
|
+
if not hasattr(self, "page_number_digits"):
|
|
3300
|
+
self.page_number_digits = 5
|
|
3301
|
+
if not hasattr(self, "page_number_area"):
|
|
3302
|
+
self.page_number_area = None
|
|
3303
|
+
if not hasattr(self, "page_number_font_size"):
|
|
3304
|
+
self.page_number_font_size = 10
|
|
3305
|
+
if not hasattr(self, "page_number_offset_horizontal"):
|
|
3306
|
+
self.page_number_offset_horizontal = 15
|
|
3307
|
+
if not hasattr(self, "page_number_offset_vertical"):
|
|
3308
|
+
self.page_number_offset_vertical = 15
|
|
3309
|
+
|
|
3121
3310
|
def has_overflow(self) -> bool:
|
|
3122
3311
|
"""
|
|
3123
3312
|
Check if there is any overflow in the document.
|
|
@@ -3192,12 +3381,21 @@ class ALExhibitDocument(ALDocument):
|
|
|
3192
3381
|
filename = base_name(self.filename) + ".pdf"
|
|
3193
3382
|
|
|
3194
3383
|
if len(self.exhibits):
|
|
3384
|
+
self._set_default_attributes()
|
|
3195
3385
|
if self.include_table_of_contents:
|
|
3196
3386
|
toc_pages = self.table_of_contents.num_pages()
|
|
3197
3387
|
return pdf_concatenate(
|
|
3198
3388
|
self.table_of_contents,
|
|
3199
3389
|
self.exhibits.as_pdf(
|
|
3200
|
-
add_page_numbers=self.add_page_numbers,
|
|
3390
|
+
add_page_numbers=self.add_page_numbers,
|
|
3391
|
+
page_number_prefix=self.page_number_prefix,
|
|
3392
|
+
page_number_digits=self.page_number_digits,
|
|
3393
|
+
page_number_area=self.page_number_area,
|
|
3394
|
+
page_number_font_size=self.page_number_font_size,
|
|
3395
|
+
page_number_offset_horizontal=self.page_number_offset_horizontal,
|
|
3396
|
+
page_number_offset_vertical=self.page_number_offset_vertical,
|
|
3397
|
+
toc_pages=toc_pages,
|
|
3398
|
+
pdfa=pdfa,
|
|
3201
3399
|
),
|
|
3202
3400
|
filename=filename,
|
|
3203
3401
|
pdfa=pdfa,
|
|
@@ -3205,6 +3403,12 @@ class ALExhibitDocument(ALDocument):
|
|
|
3205
3403
|
else:
|
|
3206
3404
|
return self.exhibits.as_pdf(
|
|
3207
3405
|
add_page_numbers=self.add_page_numbers,
|
|
3406
|
+
page_number_prefix=self.page_number_prefix,
|
|
3407
|
+
page_number_digits=self.page_number_digits,
|
|
3408
|
+
page_number_area=self.page_number_area,
|
|
3409
|
+
page_number_font_size=self.page_number_font_size,
|
|
3410
|
+
page_number_offset_horizontal=self.page_number_offset_horizontal,
|
|
3411
|
+
page_number_offset_vertical=self.page_number_offset_vertical,
|
|
3208
3412
|
filename=filename,
|
|
3209
3413
|
pdfa=pdfa,
|
|
3210
3414
|
)
|
|
@@ -1914,7 +1914,7 @@ class ALIndividual(Individual):
|
|
|
1914
1914
|
if len(pronouns_to_use) > 0:
|
|
1915
1915
|
output = "/".join(pronouns_to_use)
|
|
1916
1916
|
else:
|
|
1917
|
-
output = default
|
|
1917
|
+
output = f"{default}'s {target}"
|
|
1918
1918
|
elif hasattr(self, "person_type") and self.person_type in [
|
|
1919
1919
|
"business",
|
|
1920
1920
|
"organization",
|
|
@@ -1928,7 +1928,7 @@ class ALIndividual(Individual):
|
|
|
1928
1928
|
else:
|
|
1929
1929
|
output = their(target, **kwargs)
|
|
1930
1930
|
else:
|
|
1931
|
-
output = default
|
|
1931
|
+
output = f"{default}'s {target}"
|
|
1932
1932
|
|
|
1933
1933
|
if "capitalize" in kwargs and kwargs["capitalize"]:
|
|
1934
1934
|
return capitalize(output)
|
|
@@ -19,13 +19,16 @@ code: |
|
|
|
19
19
|
default screen parts:
|
|
20
20
|
navigation bar html: |
|
|
21
21
|
% if enable_al_language and len(al_interview_languages) > 1:
|
|
22
|
-
${ get_language_list_dropdown(al_interview_languages,current=al_user_language ) }
|
|
22
|
+
${ get_language_list_dropdown(al_interview_languages, current=session_local.attr("al_user_language") or al_user_language ) }
|
|
23
23
|
% endif
|
|
24
24
|
---
|
|
25
25
|
initial: True
|
|
26
26
|
code: |
|
|
27
27
|
if enable_al_language:
|
|
28
|
-
|
|
28
|
+
if session_local.attr("al_user_language"):
|
|
29
|
+
set_language(session_local.attr("al_user_language"))
|
|
30
|
+
else:
|
|
31
|
+
set_language(al_user_language)
|
|
29
32
|
process_action()
|
|
30
33
|
---
|
|
31
34
|
code: |
|
|
@@ -37,6 +40,14 @@ code: |
|
|
|
37
40
|
---
|
|
38
41
|
event: al_change_language
|
|
39
42
|
code: |
|
|
43
|
+
# Set browser-specific language for this interview session
|
|
44
|
+
if "lang" in action_arguments():
|
|
45
|
+
session_local.al_user_language = action_argument("lang")
|
|
46
|
+
set_language(session_local.al_user_language)
|
|
47
|
+
---
|
|
48
|
+
event: al_get_language_list_change_language
|
|
49
|
+
code: |
|
|
50
|
+
# Set "global" language for this interview session instead of user-specific
|
|
40
51
|
if "lang" in action_arguments():
|
|
41
52
|
al_user_language = action_argument("lang")
|
|
42
53
|
set_language(al_user_language)
|
|
@@ -110,9 +110,16 @@ data from code:
|
|
|
110
110
|
label: str(al_load_answer_set_string)
|
|
111
111
|
hidden: not get_config('assembly line',{}).get('enable answer sets')
|
|
112
112
|
- url: |
|
|
113
|
-
|
|
114
|
-
label: str(
|
|
115
|
-
hidden:
|
|
113
|
+
url_ask(["al_sessions_json_file", {"recompute": ["al_sessions_import_json"]}, "al_sessions_load_status"])
|
|
114
|
+
label: str(al_import_answer_set_string)
|
|
115
|
+
hidden: |
|
|
116
|
+
not (
|
|
117
|
+
(
|
|
118
|
+
get_config('assembly line',{}).get('enable answer sets')
|
|
119
|
+
and get_config('assembly line',{}).get('enable answer set imports')
|
|
120
|
+
)
|
|
121
|
+
or (user_logged_in() and user_has_privilege('admin'))
|
|
122
|
+
)
|
|
116
123
|
---
|
|
117
124
|
template: al_start_over_string
|
|
118
125
|
content: >-
|
|
@@ -134,9 +141,9 @@ template: al_load_answer_set_string
|
|
|
134
141
|
content: >-
|
|
135
142
|
Load answer set
|
|
136
143
|
---
|
|
137
|
-
template:
|
|
144
|
+
template: al_import_answer_set_string
|
|
138
145
|
content: >-
|
|
139
|
-
|
|
146
|
+
Import answer set
|
|
140
147
|
---
|
|
141
148
|
event: al_exit_logout
|
|
142
149
|
code: |
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
# For usage, see https://suffolklitlab.org/
|
|
1
|
+
# For usage, see https://assemblyline.suffolklitlab.org/docs/components/AssemblyLine/magic_variables
|
|
2
2
|
---
|
|
3
3
|
include:
|
|
4
4
|
- al_language.yml
|
|
@@ -19,4 +19,4 @@ modules:
|
|
|
19
19
|
- .al_document
|
|
20
20
|
- .al_courts
|
|
21
21
|
- docassemble.GithubFeedbackForm.github_issue
|
|
22
|
-
|
|
22
|
+
|
|
@@ -18,7 +18,7 @@ comment: |
|
|
|
18
18
|
new form label: Start a new form
|
|
19
19
|
new form url: https://courtformsonline.org
|
|
20
20
|
logo url: null # Defaults to `app homepage`
|
|
21
|
-
logo image url: https://app.
|
|
21
|
+
logo image url: https://app.example.org/packagestatic/docassemble.AssemblyLine/ma_logo.png
|
|
22
22
|
logo image alt: Logo
|
|
23
23
|
answer sets title: Answer sets
|
|
24
24
|
logo title row 1: null # Defaults to `interview page title`
|
|
@@ -490,4 +490,4 @@ code: |
|
|
|
490
490
|
event: delete_results_action
|
|
491
491
|
code: |
|
|
492
492
|
undefine("limit_filename")
|
|
493
|
-
undefine("search_keyword")
|
|
493
|
+
undefine("search_keyword")
|
|
@@ -31,7 +31,7 @@ code: |
|
|
|
31
31
|
---
|
|
32
32
|
objects:
|
|
33
33
|
# No addenda, all start enabled
|
|
34
|
-
- multi_bundle_1: ALDocumentBundle.using(elements=[pdf_1, docx_1, notice_to_quit], title="Multiple docs 1", filename="multi_bundle_1" )
|
|
34
|
+
- multi_bundle_1: ALDocumentBundle.using(elements=[pdf_1, docx_1, notice_to_quit], title="Multiple docs 1", filename="multi_bundle_1", add_page_numbers=True, page_numbers_font_size=20 )
|
|
35
35
|
- single_pdf_bundle_1: ALDocumentBundle.using(elements=[pdf_1], title="One pdf", filename="single_pdf_1" )
|
|
36
36
|
- single_docx_bundle_1: ALDocumentBundle.using(elements=[docx_1], title="One docx", filename="single_docx_1" )
|
|
37
37
|
---
|
|
@@ -341,9 +341,9 @@ subquestion: |
|
|
|
341
341
|
|
|
342
342
|
Send button which allows the user to edit the email address.
|
|
343
343
|
|
|
344
|
-
multi_bundle_1.send_button_html( key="test_key", show_editable_checkbox=False, label="Custom send label", icon="search" )
|
|
344
|
+
multi_bundle_1.send_button_html( key="test_key", show_editable_checkbox=False, label="Custom send label", icon="search", email_legend_class="h5" )
|
|
345
345
|
|
|
346
|
-
${ multi_bundle_1.send_button_html( key="test_key", show_editable_checkbox=False, label="Custom send label", icon="search" ) }
|
|
346
|
+
${ multi_bundle_1.send_button_html( key="test_key", show_editable_checkbox=False, label="Custom send label", icon="search", email_legend_class="h5" ) }
|
|
347
347
|
|
|
348
348
|
---
|
|
349
349
|
single_pdf_bundle_1.send_button_html( key="test_key", show_editable_checkbox=False, label="Custom send label", icon="search" )
|
|
@@ -380,4 +380,4 @@ subquestion: |
|
|
|
380
380
|
id: end aldocument tests
|
|
381
381
|
event: end_aldocument_tests
|
|
382
382
|
question: The end of ALDocument tests
|
|
383
|
-
---
|
|
383
|
+
---
|
|
@@ -173,7 +173,7 @@ def get_language_list(
|
|
|
173
173
|
current="",
|
|
174
174
|
lang_codes: Optional[List[str]] = None,
|
|
175
175
|
languages_path: Optional[str] = None,
|
|
176
|
-
event_name="
|
|
176
|
+
event_name="al_get_language_list_change_language",
|
|
177
177
|
) -> str:
|
|
178
178
|
"""
|
|
179
179
|
Given a list of language codes, returns
|