docassemble.AssemblyLine 4.1.0__tar.gz → 4.3.0__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.1.0/docassemble.AssemblyLine.egg-info → docassemble_assemblyline-4.3.0}/PKG-INFO +8 -10
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/README.md +2 -1
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/__init__.py +1 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/al_courts.py +12 -11
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/al_document.py +52 -32
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/al_general.py +87 -67
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_document.yml +2 -2
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_language.yml +1 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/ql_baseline.yml +45 -4
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_aldocument.yml +4 -1
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_alexhibit_maxsize.yml +1 -1
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/data/questions/test_preferred_name.yml +132 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_question_library.yml +3 -0
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/data/sources/ar-words.yml +753 -0
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/data/sources/es-words.yml +863 -0
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/data/sources/fr-words.yml +878 -0
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/data/sources/ne-words.yml +841 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/aldocument.js +24 -3
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/sessions.py +77 -81
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/test_al_document.py +2 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/test_al_general.py +282 -1
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/test_language.py +2 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0/docassemble.AssemblyLine.egg-info}/PKG-INFO +8 -10
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble.AssemblyLine.egg-info/SOURCES.txt +4 -1
- docassemble_assemblyline-4.3.0/docassemble.AssemblyLine.egg-info/requires.txt +2 -0
- docassemble_assemblyline-4.3.0/pyproject.toml +64 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/setup.py +1 -1
- docassemble_assemblyline-4.1.0/docassemble/AssemblyLine/__init__.py +0 -1
- docassemble_assemblyline-4.1.0/docassemble/AssemblyLine/data/sources/es-words.yml +0 -687
- docassemble_assemblyline-4.1.0/docassemble/__init__.py +0 -1
- docassemble_assemblyline-4.1.0/docassemble.AssemblyLine.egg-info/requires.txt +0 -2
- docassemble_assemblyline-4.1.0/pyproject.toml +0 -30
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/LICENSE +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/MANIFEST.in +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/custom_jinja_filters.py +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_code.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_package.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_package_unstyled.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_question_test.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_reminders.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_saved_sessions.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_saved_sessions_store.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_settings.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_terms_of_use.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/al_visual.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/assembly_line.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/assembly_line_unstyled.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/demo_search_sessions.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/feedback.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/interview_list.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/ql_catchall.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/ql_namechange.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/reserved_words.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_al_table_document.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_aladdendum.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_alcourts.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_aldocument_background_assembly.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_alexhibit.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_bundle_parity.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_catchall.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_familiar_disambiguation.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_if_final.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_preferred_formats.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/questions/test_signature.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/README.md +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/languages.yml +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/test_aldocument.feature +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_docx_1.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_jpg_1.jpg +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_pdf_1.pdf +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_png_1.png +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/test_question_library.feature +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/translation_es.xlsx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/translation_ht.xlsx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/sources/translation_pt.xlsx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/README.md +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/al_audio.css +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/al_audio.js +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/aldocument.css +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/interview_list.css +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/limit_upload_size.js +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/lt1-pullout-10-getting-organized.pdf +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/ma_logo.png +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/placeholder.png +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/seal.jpg +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/static/styles.css +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/README.md +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/al_basic_addendum.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/exhibit_cover_sheet.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/exhibit_table_of_contents.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/general_cover_sheet.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/sample_word_template.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/test_aldocument_docx_1.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/test_aldocument_pdf_1.pdf +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/test_catchall.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/data/templates/test_if_final.docx +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/language.py +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/py.typed +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/requirements.txt +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble/AssemblyLine/sign.py +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble.AssemblyLine.egg-info/dependency_links.txt +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble.AssemblyLine.egg-info/not-zip-safe +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/docassemble.AssemblyLine.egg-info/top_level.txt +0 -0
- {docassemble_assemblyline-4.1.0 → docassemble_assemblyline-4.3.0}/setup.cfg +0 -0
|
@@ -1,22 +1,19 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docassemble.AssemblyLine
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.3.0
|
|
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.
|
|
4
5
|
Home-page: https://courtformsonline.org
|
|
5
6
|
Author: Suffolk Legal Innovation and Technology Lab
|
|
6
|
-
Author-email:
|
|
7
|
-
License:
|
|
7
|
+
Author-email: Suffolk Legal Innovation and Technology Lab <litlab@suffolk.edu>
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
Project-URL: Homepage, https://courtformsonline.org
|
|
8
10
|
Description-Content-Type: text/markdown
|
|
9
11
|
License-File: LICENSE
|
|
10
12
|
Requires-Dist: docassemble.ALToolbox>=0.12.0
|
|
11
|
-
Requires-Dist: docassemble.
|
|
13
|
+
Requires-Dist: docassemble.GitHubFeedbackForm>=0.4.1.1
|
|
12
14
|
Dynamic: author
|
|
13
|
-
Dynamic: author-email
|
|
14
|
-
Dynamic: description
|
|
15
|
-
Dynamic: description-content-type
|
|
16
15
|
Dynamic: home-page
|
|
17
|
-
Dynamic: license
|
|
18
16
|
Dynamic: license-file
|
|
19
|
-
Dynamic: requires-dist
|
|
20
17
|
|
|
21
18
|
# Suffolk LIT Lab Document Assembly Line
|
|
22
19
|
|
|
@@ -55,7 +52,7 @@ https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
|
|
|
55
52
|
|
|
56
53
|
## Menu-driven installation
|
|
57
54
|
|
|
58
|
-
The recommended installation method is with the [guided installation script](https://suffolklitlab.org/
|
|
55
|
+
The recommended installation method is with the [guided installation script](https://assemblyline.suffolklitlab.org/docs/get_started/installation).
|
|
59
56
|
|
|
60
57
|
## Manual installation
|
|
61
58
|
|
|
@@ -155,3 +152,4 @@ code: |
|
|
|
155
152
|
# Changelog
|
|
156
153
|
|
|
157
154
|
See [CHANGELOG.MD](https://github.com/SuffolkLITLab/docassemble-AssemblyLine/blob/main/CHANGELOG.md)
|
|
155
|
+
|
|
@@ -35,7 +35,7 @@ https://suffolklitlab.org/docassemble-AssemblyLine-documentation/
|
|
|
35
35
|
|
|
36
36
|
## Menu-driven installation
|
|
37
37
|
|
|
38
|
-
The recommended installation method is with the [guided installation script](https://suffolklitlab.org/
|
|
38
|
+
The recommended installation method is with the [guided installation script](https://assemblyline.suffolklitlab.org/docs/get_started/installation).
|
|
39
39
|
|
|
40
40
|
## Manual installation
|
|
41
41
|
|
|
@@ -135,3 +135,4 @@ code: |
|
|
|
135
135
|
# Changelog
|
|
136
136
|
|
|
137
137
|
See [CHANGELOG.MD](https://github.com/SuffolkLITLab/docassemble-AssemblyLine/blob/main/CHANGELOG.md)
|
|
138
|
+
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '4.3.0'
|
|
@@ -3,7 +3,7 @@ Package for a very simple / MVP list of courts that is mostly signature compatib
|
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
5
|
import os
|
|
6
|
-
from typing import Any, Callable, Dict, List, Mapping, Optional, Union, Set
|
|
6
|
+
from typing import Any, Callable, Dict, List, Mapping, Optional, Union, Set, Tuple
|
|
7
7
|
import pandas as pd
|
|
8
8
|
import docassemble.base.functions
|
|
9
9
|
from docassemble.base.util import (
|
|
@@ -238,12 +238,12 @@ class ALCourtLoader(DAObject):
|
|
|
238
238
|
# Only solution I can think of would require court database owners to assign each court a unique ID
|
|
239
239
|
# and something that triggers recalculating the court address/etc info.
|
|
240
240
|
|
|
241
|
-
def all_courts(self) -> List[
|
|
241
|
+
def all_courts(self) -> List[Tuple[int, str]]:
|
|
242
242
|
"""
|
|
243
243
|
Return a list of all courts in the spreadsheet.
|
|
244
244
|
|
|
245
245
|
Returns:
|
|
246
|
-
List[
|
|
246
|
+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
|
|
247
247
|
"""
|
|
248
248
|
return self.filter_courts(None)
|
|
249
249
|
|
|
@@ -329,13 +329,14 @@ class ALCourtLoader(DAObject):
|
|
|
329
329
|
display_column: str = "name",
|
|
330
330
|
search_string: Optional[str] = None,
|
|
331
331
|
search_columns: Optional[Union[List[str], str]] = None,
|
|
332
|
-
) -> List[
|
|
332
|
+
) -> List[Tuple[int, str]]:
|
|
333
333
|
"""
|
|
334
334
|
Retrieve a list of all courts in the specified county.
|
|
335
335
|
|
|
336
336
|
This function fetches courts suitable for displaying as a drop-down or radio button list
|
|
337
|
-
in Docassemble. The results are
|
|
338
|
-
useful for retrieving the court's full details later using the as_court() method
|
|
337
|
+
in Docassemble. The results are tuples where the first element is the dataframe index
|
|
338
|
+
(useful for retrieving the court's full details later using the as_court() method) and
|
|
339
|
+
the second element is the display value from the specified display_column.
|
|
339
340
|
|
|
340
341
|
Args:
|
|
341
342
|
county_name (str): Name of the county.
|
|
@@ -346,7 +347,7 @@ class ALCourtLoader(DAObject):
|
|
|
346
347
|
the search_string in a case-insensitive manner. Defaults to None.
|
|
347
348
|
|
|
348
349
|
Returns:
|
|
349
|
-
List[
|
|
350
|
+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
|
|
350
351
|
"""
|
|
351
352
|
return self.filter_courts(
|
|
352
353
|
court_types=county_name,
|
|
@@ -363,11 +364,11 @@ class ALCourtLoader(DAObject):
|
|
|
363
364
|
display_column: str = "name",
|
|
364
365
|
search_string: Optional[str] = None,
|
|
365
366
|
search_columns: Optional[Union[List[str], str]] = None,
|
|
366
|
-
) -> List[
|
|
367
|
+
) -> List[Tuple[int, str]]:
|
|
367
368
|
"""
|
|
368
|
-
Return a filtered subset of courts represented as a list of
|
|
369
|
+
Return a filtered subset of courts represented as a list of tuples.
|
|
369
370
|
|
|
370
|
-
Each
|
|
371
|
+
Each tuple has the format (index, display_value), where "index" refers to the dataframe index and "display_value"
|
|
371
372
|
is determined by the `display_column`.
|
|
372
373
|
|
|
373
374
|
Args:
|
|
@@ -380,7 +381,7 @@ class ALCourtLoader(DAObject):
|
|
|
380
381
|
the search_string in a case-insensitive manner. Defaults to None.
|
|
381
382
|
|
|
382
383
|
Returns:
|
|
383
|
-
List[
|
|
384
|
+
List[Tuple[int, str]]: List of tuples where each tuple contains (dataframe_index, display_value). The dataframe_index (int) can be used with as_court() to retrieve the full court object. The display_value (str) is the court's name or other display column value.
|
|
384
385
|
"""
|
|
385
386
|
df = self._load_courts()
|
|
386
387
|
if court_types:
|
|
@@ -12,6 +12,7 @@ from docassemble.base.util import (
|
|
|
12
12
|
DAFile,
|
|
13
13
|
DAFileCollection,
|
|
14
14
|
DAFileList,
|
|
15
|
+
DALazyTemplate,
|
|
15
16
|
defined,
|
|
16
17
|
pdf_concatenate,
|
|
17
18
|
zip_file,
|
|
@@ -28,6 +29,7 @@ from docassemble.base.util import (
|
|
|
28
29
|
DAStaticFile,
|
|
29
30
|
alpha,
|
|
30
31
|
showifdef,
|
|
32
|
+
word,
|
|
31
33
|
)
|
|
32
34
|
from docassemble.base.pdfa import pdf_to_pdfa
|
|
33
35
|
from textwrap import wrap
|
|
@@ -39,7 +41,6 @@ from typing import Tuple
|
|
|
39
41
|
import secrets
|
|
40
42
|
import string
|
|
41
43
|
|
|
42
|
-
|
|
43
44
|
__all__ = [
|
|
44
45
|
"ALAddendumField",
|
|
45
46
|
"ALAddendumFieldDict",
|
|
@@ -315,6 +316,9 @@ class ALAddendumField(DAObject):
|
|
|
315
316
|
|
|
316
317
|
# If trigger is not a boolean value, overflow value is the value that starts at the end of the safe value.
|
|
317
318
|
original_value = self.value_if_defined()
|
|
319
|
+
# Ensure a DALazyTemplate is rendered to a string for downstream string ops
|
|
320
|
+
if isinstance(original_value, DALazyTemplate):
|
|
321
|
+
original_value = str(original_value)
|
|
318
322
|
safe_text = self.safe_value(
|
|
319
323
|
overflow_message=overflow_message,
|
|
320
324
|
input_width=input_width,
|
|
@@ -409,6 +413,9 @@ class ALAddendumField(DAObject):
|
|
|
409
413
|
val = _original_value
|
|
410
414
|
else:
|
|
411
415
|
val = self.value_if_defined()
|
|
416
|
+
# If this is a template block, render it now so comparisons work correctly
|
|
417
|
+
if isinstance(val, DALazyTemplate):
|
|
418
|
+
val = str(val)
|
|
412
419
|
|
|
413
420
|
return (
|
|
414
421
|
self.safe_value(
|
|
@@ -508,6 +515,11 @@ class ALAddendumField(DAObject):
|
|
|
508
515
|
value = _original_value
|
|
509
516
|
else:
|
|
510
517
|
value = self.value_if_defined()
|
|
518
|
+
|
|
519
|
+
# Convert template blocks to strings for purposes of evaluating overflow
|
|
520
|
+
if isinstance(value, DALazyTemplate):
|
|
521
|
+
value = str(value)
|
|
522
|
+
|
|
511
523
|
if (
|
|
512
524
|
isinstance(value, str)
|
|
513
525
|
and len(value) <= self.overflow_trigger
|
|
@@ -1996,11 +2008,11 @@ class ALDocumentBundle(DAList):
|
|
|
1996
2008
|
refresh: bool = True,
|
|
1997
2009
|
pdfa: bool = False,
|
|
1998
2010
|
include_zip: bool = True,
|
|
1999
|
-
view_label=
|
|
2011
|
+
view_label: Optional[str] = None,
|
|
2000
2012
|
view_icon: str = "eye",
|
|
2001
|
-
download_label: str =
|
|
2013
|
+
download_label: Optional[str] = None,
|
|
2002
2014
|
download_icon: str = "download",
|
|
2003
|
-
send_label: str =
|
|
2015
|
+
send_label: Optional[str] = None,
|
|
2004
2016
|
send_icon: str = "envelope",
|
|
2005
2017
|
zip_label: Optional[str] = None,
|
|
2006
2018
|
zip_icon: str = "file-archive",
|
|
@@ -2023,11 +2035,11 @@ class ALDocumentBundle(DAList):
|
|
|
2023
2035
|
refresh (bool): Flag to reconsider the 'enabled' attribute, default is True.
|
|
2024
2036
|
pdfa (bool): Flag to return documents in PDF/A format, default is False.
|
|
2025
2037
|
include_zip (bool): Flag to include a zip option, default is True.
|
|
2026
|
-
view_label (str): Label for the 'view' button, default is "View".
|
|
2038
|
+
view_label (str): Label for the 'view' button, default is self.view_label or "View".
|
|
2027
2039
|
view_icon (str): Icon for the 'view' button, default is "eye".
|
|
2028
|
-
download_label (str): Label for the 'download' button, default is "Download".
|
|
2040
|
+
download_label (str): Label for the 'download' button, default is self.download_label or "Download".
|
|
2029
2041
|
download_icon (str): Icon for the 'download' button, default is "download".
|
|
2030
|
-
send_label (str): Label for the 'send' button. Default is "Send".
|
|
2042
|
+
send_label (str): Label for the 'send' button. Default is self.send_label or "Send".
|
|
2031
2043
|
send_icon (str): Fontawesome icon for the 'send' button. Default is "envelope".
|
|
2032
2044
|
zip_label (Optional[str]): Label for the zip option. If not provided, uses the generic template for `self.zip_label` ("Download all").
|
|
2033
2045
|
zip_icon (str): Icon for the zip option, default is "file-archive".
|
|
@@ -2044,11 +2056,14 @@ class ALDocumentBundle(DAList):
|
|
|
2044
2056
|
Returns:
|
|
2045
2057
|
str: HTML representation of a table with documents and their associated actions.
|
|
2046
2058
|
"""
|
|
2047
|
-
if not
|
|
2048
|
-
|
|
2059
|
+
if not view_label:
|
|
2060
|
+
view_label = str(self.view_label) or word("View")
|
|
2049
2061
|
|
|
2050
|
-
if not
|
|
2051
|
-
|
|
2062
|
+
if not download_label:
|
|
2063
|
+
download_label = str(self.download_label) or word("Download")
|
|
2064
|
+
|
|
2065
|
+
if not send_label:
|
|
2066
|
+
send_label = str(self.send_label) or word("Send")
|
|
2052
2067
|
|
|
2053
2068
|
if zip_format is None:
|
|
2054
2069
|
zip_format = format
|
|
@@ -2123,7 +2138,7 @@ class ALDocumentBundle(DAList):
|
|
|
2123
2138
|
# Add a zip file row if included
|
|
2124
2139
|
if include_zip and bundled_zip:
|
|
2125
2140
|
if not zip_label:
|
|
2126
|
-
zip_label = self.
|
|
2141
|
+
zip_label = str(self.zip_label)
|
|
2127
2142
|
filename_root = os.path.splitext(str(self.filename))[0]
|
|
2128
2143
|
zip_button = action_button_html(
|
|
2129
2144
|
bundled_zip.url_for(
|
|
@@ -2142,7 +2157,7 @@ class ALDocumentBundle(DAList):
|
|
|
2142
2157
|
|
|
2143
2158
|
if include_full_pdf and bundled_pdf:
|
|
2144
2159
|
if not full_pdf_label:
|
|
2145
|
-
full_pdf_label = self.
|
|
2160
|
+
full_pdf_label = str(self.full_pdf_label)
|
|
2146
2161
|
filename_root = os.path.splitext(str(self.filename))[0]
|
|
2147
2162
|
full_pdf_button = action_button_html(
|
|
2148
2163
|
bundled_pdf.url_for(
|
|
@@ -2239,12 +2254,17 @@ class ALDocumentBundle(DAList):
|
|
|
2239
2254
|
return html
|
|
2240
2255
|
|
|
2241
2256
|
def send_email_table_row(
|
|
2242
|
-
self,
|
|
2257
|
+
self,
|
|
2258
|
+
key: str = "final",
|
|
2259
|
+
send_label: Optional[str] = None,
|
|
2260
|
+
send_icon: str = "envelope",
|
|
2243
2261
|
) -> str:
|
|
2244
2262
|
"""
|
|
2245
2263
|
Generate HTML doc table row for an input box and button that allows
|
|
2246
2264
|
someone to send the bundle to the specified email address.
|
|
2247
2265
|
|
|
2266
|
+
This should normally only be called by download_list_html.
|
|
2267
|
+
|
|
2248
2268
|
Args:
|
|
2249
2269
|
key (str): A key used to identify which version of the ALDocument to send. Defaults to "final".
|
|
2250
2270
|
send_label (str): Label for the 'send' button. Default is "Send".
|
|
@@ -2253,14 +2273,12 @@ class ALDocumentBundle(DAList):
|
|
|
2253
2273
|
Returns:
|
|
2254
2274
|
str: The generated HTML string for the table row.
|
|
2255
2275
|
"""
|
|
2276
|
+
if not send_label:
|
|
2277
|
+
send_label = str(self.send_label) or word("Send")
|
|
2278
|
+
|
|
2256
2279
|
if not self.has_enabled_documents():
|
|
2257
2280
|
return "" # Don't let people email an empty set of documents
|
|
2258
|
-
|
|
2259
|
-
self._cached_get_email_copy = str(self.get_email_copy)
|
|
2260
|
-
if not hasattr(self, "_cached_include_editable_documents"):
|
|
2261
|
-
self._cached_include_editable_documents = str(
|
|
2262
|
-
self.include_editable_documents
|
|
2263
|
-
)
|
|
2281
|
+
|
|
2264
2282
|
name = html_safe_str(self.instanceName) + random_suffix()
|
|
2265
2283
|
al_wants_editable_input_id = "_ignore_al_wants_editable_" + name
|
|
2266
2284
|
al_email_input_id = "_ignore_al_doc_email_" + name
|
|
@@ -2298,7 +2316,7 @@ class ALDocumentBundle(DAList):
|
|
|
2298
2316
|
email: str,
|
|
2299
2317
|
editable: Optional[bool] = None,
|
|
2300
2318
|
template_name: str = "",
|
|
2301
|
-
label: str =
|
|
2319
|
+
label: Optional[str] = None,
|
|
2302
2320
|
icon: str = "envelope",
|
|
2303
2321
|
color: str = "primary",
|
|
2304
2322
|
key: str = "final",
|
|
@@ -2322,10 +2340,11 @@ class ALDocumentBundle(DAList):
|
|
|
2322
2340
|
Returns:
|
|
2323
2341
|
str: The generated HTML string for the button.
|
|
2324
2342
|
"""
|
|
2343
|
+
if label is None:
|
|
2344
|
+
label = str(self.send_label) or word("Send")
|
|
2345
|
+
|
|
2325
2346
|
if not self.has_enabled_documents():
|
|
2326
2347
|
return "" # Don't let people email an empty set of documents
|
|
2327
|
-
if not hasattr(self, "_cached_get_email_copy"):
|
|
2328
|
-
self._cached_get_email_copy = str(self.get_email_copy)
|
|
2329
2348
|
name = html_safe_str(self.instanceName) + random_suffix()
|
|
2330
2349
|
al_send_button_id = "al_send_email_to_button_" + name
|
|
2331
2350
|
|
|
@@ -2392,12 +2411,6 @@ class ALDocumentBundle(DAList):
|
|
|
2392
2411
|
"""
|
|
2393
2412
|
if not self.has_enabled_documents():
|
|
2394
2413
|
return "" # Don't let people email an empty set of documents
|
|
2395
|
-
if not hasattr(self, "_cached_get_email_copy"):
|
|
2396
|
-
self._cached_get_email_copy = str(self.get_email_copy)
|
|
2397
|
-
if not hasattr(self, "_cached_include_editable_documents"):
|
|
2398
|
-
self._cached_include_editable_documents = str(
|
|
2399
|
-
self.include_editable_documents
|
|
2400
|
-
)
|
|
2401
2414
|
|
|
2402
2415
|
if isinstance(preferred_formats, str):
|
|
2403
2416
|
preferred_formats = [preferred_formats]
|
|
@@ -2431,7 +2444,7 @@ class ALDocumentBundle(DAList):
|
|
|
2431
2444
|
# Container of whole email section with header
|
|
2432
2445
|
return_str = f"""
|
|
2433
2446
|
<fieldset class="al_send_bundle al_send_section_alone {html_safe_str(self.instanceName)}" id="al_send_bundle_{name}" name="al_send_bundle_{name}">
|
|
2434
|
-
<legend class="h4 al_doc_email_header">{self.
|
|
2447
|
+
<legend class="h4 al_doc_email_header">{str(self.get_email_copy)}</legend>
|
|
2435
2448
|
"""
|
|
2436
2449
|
# "Editable" checkbox
|
|
2437
2450
|
if (
|
|
@@ -2444,7 +2457,7 @@ class ALDocumentBundle(DAList):
|
|
|
2444
2457
|
<div class="form-check-container">
|
|
2445
2458
|
<div class="form-check">
|
|
2446
2459
|
<input class="form-check-input al_wants_editable" type="checkbox" id="{al_wants_editable_input_id}">
|
|
2447
|
-
<label class="al_wants_editable form-check-label" for="{al_wants_editable_input_id}">{self.
|
|
2460
|
+
<label class="al_wants_editable form-check-label" for="{al_wants_editable_input_id}">{str(self.include_editable_documents)}
|
|
2448
2461
|
</label>
|
|
2449
2462
|
</div>
|
|
2450
2463
|
</div>
|
|
@@ -2863,10 +2876,11 @@ class ALExhibitList(DAList):
|
|
|
2863
2876
|
|
|
2864
2877
|
Attributes:
|
|
2865
2878
|
maximum_size (int): The maximum allowed size in bytes of the entire document.
|
|
2879
|
+
maximum_size_per_doc (int): The maximum allowed size in bytes per document in the list
|
|
2866
2880
|
auto_label (bool): If True, automatically numbers exhibits for cover page and table of contents. Defaults to True.
|
|
2867
2881
|
auto_labeler (Callable): An optional function or lambda to transform the exhibit's index to a label.
|
|
2868
2882
|
Uses A..Z labels by default.
|
|
2869
|
-
auto_ocr (bool): If True, automatically starts OCR processing for uploaded exhibits. Defaults to
|
|
2883
|
+
auto_ocr (bool): If True, automatically starts OCR processing for uploaded exhibits. Defaults to False.
|
|
2870
2884
|
"""
|
|
2871
2885
|
|
|
2872
2886
|
def init(self, *pargs, **kwargs) -> None:
|
|
@@ -3061,6 +3075,7 @@ class ALExhibitDocument(ALDocument):
|
|
|
3061
3075
|
auto_ocr: bool
|
|
3062
3076
|
bates_prefix: str
|
|
3063
3077
|
maximum_size: int
|
|
3078
|
+
maximum_size_per_doc: int
|
|
3064
3079
|
suffix_to_append: str
|
|
3065
3080
|
exhibits: ALExhibitList
|
|
3066
3081
|
table_of_contents: DAFile
|
|
@@ -3085,8 +3100,13 @@ class ALExhibitDocument(ALDocument):
|
|
|
3085
3100
|
else:
|
|
3086
3101
|
self.include_exhibit_cover_pages = True
|
|
3087
3102
|
self.exhibits.include_exhibit_cover_pages = True
|
|
3103
|
+
if hasattr(self, "maximum_size_per_doc"):
|
|
3104
|
+
self.exhibits.maximum_size_per_doc = self.maximum_size_per_doc
|
|
3088
3105
|
if hasattr(self, "maximum_size"):
|
|
3089
3106
|
self.exhibits.maximum_size = self.maximum_size
|
|
3107
|
+
if not hasattr(self, "maximum_size_per_doc"):
|
|
3108
|
+
self.maximum_size_per_doc = self.maximum_size
|
|
3109
|
+
self.exhibits.maximum_size_per_doc = self.maximum_size
|
|
3090
3110
|
if hasattr(self, "include_table_of_contents"):
|
|
3091
3111
|
self.exhibits.include_table_of_contents = self.include_table_of_contents
|
|
3092
3112
|
else:
|