docassemble.AssemblyLine 4.3.0__tar.gz → 4.4.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.3.0/docassemble.AssemblyLine.egg-info → docassemble_assemblyline-4.4.0}/PKG-INFO +2 -2
- docassemble_assemblyline-4.4.0/docassemble/AssemblyLine/__init__.py +1 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/al_courts.py +1 -3
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/al_document.py +0 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/al_general.py +8 -7
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/custom_jinja_filters.py +50 -5
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_code.yml +67 -30
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_document.yml +62 -39
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_language.yml +4 -4
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_question_test.yml +7 -7
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_reminders.yml +51 -19
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_saved_sessions.yml +22 -15
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_saved_sessions_store.yml +5 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_settings.yml +20 -14
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_visual.yml +47 -22
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/demo_search_sessions.yml +11 -5
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/feedback.yml +1 -2
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/interview_list.yml +57 -43
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/ql_baseline.yml +83 -47
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/ql_catchall.yml +1 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/ql_namechange.yml +1 -1
- docassemble_assemblyline-4.4.0/docassemble/AssemblyLine/data/questions/reserved_words.yml +94 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_alcourts.yml +5 -5
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_aldocument.yml +3 -3
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_aldocument_background_assembly.yml +1 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_preferred_name.yml +7 -7
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_question_library.yml +12 -9
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/ar-words.yml +1 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/es-words.yml +3 -3
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/fr-words.yml +3 -3
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/ne-words.yml +3 -3
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/sessions.py +1 -5
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/test_al_general.py +1 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0/docassemble.AssemblyLine.egg-info}/PKG-INFO +2 -2
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble.AssemblyLine.egg-info/requires.txt +1 -1
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/pyproject.toml +2 -2
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/setup.py +2 -2
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/__init__.py +0 -1
- docassemble_assemblyline-4.3.0/docassemble/AssemblyLine/data/questions/reserved_words.yml +0 -92
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/LICENSE +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/MANIFEST.in +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/README.md +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_package.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_package_unstyled.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/al_terms_of_use.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/assembly_line.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/assembly_line_unstyled.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_al_table_document.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_aladdendum.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_alexhibit.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_alexhibit_maxsize.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_bundle_parity.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_catchall.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_familiar_disambiguation.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_if_final.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_preferred_formats.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/questions/test_signature.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/README.md +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/languages.yml +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/test_aldocument.feature +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_docx_1.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_jpg_1.jpg +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_pdf_1.pdf +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/test_alexhibit_png_1.png +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/test_question_library.feature +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/translation_es.xlsx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/translation_ht.xlsx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/sources/translation_pt.xlsx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/README.md +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/al_audio.css +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/al_audio.js +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/aldocument.css +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/aldocument.js +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/interview_list.css +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/limit_upload_size.js +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/lt1-pullout-10-getting-organized.pdf +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/ma_logo.png +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/placeholder.png +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/seal.jpg +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/static/styles.css +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/README.md +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/al_basic_addendum.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/exhibit_cover_sheet.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/exhibit_table_of_contents.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/general_cover_sheet.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/sample_word_template.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/test_aldocument_docx_1.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/test_aldocument_pdf_1.pdf +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/test_catchall.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/data/templates/test_if_final.docx +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/language.py +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/py.typed +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/requirements.txt +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/sign.py +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/test_al_document.py +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble/AssemblyLine/test_language.py +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble.AssemblyLine.egg-info/SOURCES.txt +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble.AssemblyLine.egg-info/dependency_links.txt +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble.AssemblyLine.egg-info/not-zip-safe +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/docassemble.AssemblyLine.egg-info/top_level.txt +0 -0
- {docassemble_assemblyline-4.3.0 → docassemble_assemblyline-4.4.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: docassemble.AssemblyLine
|
|
3
|
-
Version: 4.
|
|
3
|
+
Version: 4.4.0
|
|
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
5
|
Home-page: https://courtformsonline.org
|
|
6
6
|
Author: Suffolk Legal Innovation and Technology Lab
|
|
@@ -9,7 +9,7 @@ License-Expression: MIT
|
|
|
9
9
|
Project-URL: Homepage, https://courtformsonline.org
|
|
10
10
|
Description-Content-Type: text/markdown
|
|
11
11
|
License-File: LICENSE
|
|
12
|
-
Requires-Dist: docassemble.ALToolbox>=0.
|
|
12
|
+
Requires-Dist: docassemble.ALToolbox>=0.16.0
|
|
13
13
|
Requires-Dist: docassemble.GitHubFeedbackForm>=0.4.1.1
|
|
14
14
|
Dynamic: author
|
|
15
15
|
Dynamic: home-page
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = '4.4.0'
|
|
@@ -2,13 +2,11 @@
|
|
|
2
2
|
Package for a very simple / MVP list of courts that is mostly signature compatible w/ MACourts for now
|
|
3
3
|
"""
|
|
4
4
|
|
|
5
|
-
import
|
|
6
|
-
from typing import Any, Callable, Dict, List, Mapping, Optional, Union, Set, Tuple
|
|
5
|
+
from typing import Any, Callable, Dict, List, Optional, Union, Set, Tuple
|
|
7
6
|
import pandas as pd
|
|
8
7
|
import docassemble.base.functions
|
|
9
8
|
from docassemble.base.util import (
|
|
10
9
|
path_and_mimetype,
|
|
11
|
-
Address,
|
|
12
10
|
LatitudeLongitude,
|
|
13
11
|
DAObject,
|
|
14
12
|
log,
|
|
@@ -30,13 +30,11 @@ from docassemble.base.util import (
|
|
|
30
30
|
their,
|
|
31
31
|
url_action,
|
|
32
32
|
validation_error,
|
|
33
|
-
value,
|
|
34
33
|
word,
|
|
35
34
|
your,
|
|
36
35
|
log,
|
|
37
36
|
value,
|
|
38
37
|
)
|
|
39
|
-
from docassemble.ALToolbox.misc import fa_icon
|
|
40
38
|
import docassemble.base.functions
|
|
41
39
|
import random
|
|
42
40
|
import re
|
|
@@ -325,7 +323,7 @@ class ALAddress(Address):
|
|
|
325
323
|
if not bare and (
|
|
326
324
|
unit_lower.isnumeric()
|
|
327
325
|
or (
|
|
328
|
-
|
|
326
|
+
" " not in self.unit
|
|
329
327
|
and not any(
|
|
330
328
|
x in unit_lower
|
|
331
329
|
for x in [
|
|
@@ -1660,10 +1658,13 @@ class ALIndividual(Individual):
|
|
|
1660
1658
|
Used to assist with checkbox filling in PDFs with "skip undefined"
|
|
1661
1659
|
turned on.
|
|
1662
1660
|
"""
|
|
1663
|
-
return not
|
|
1664
|
-
|
|
1665
|
-
|
|
1666
|
-
|
|
1661
|
+
return self.gender not in [
|
|
1662
|
+
"prefer-not-to-say",
|
|
1663
|
+
"male",
|
|
1664
|
+
"female",
|
|
1665
|
+
"unknown",
|
|
1666
|
+
"nonbinary",
|
|
1667
|
+
]
|
|
1667
1668
|
|
|
1668
1669
|
def contact_fields(self) -> None:
|
|
1669
1670
|
"""
|
|
@@ -5,9 +5,8 @@
|
|
|
5
5
|
|
|
6
6
|
# See: https://docassemble.org/docs/documents.html#register_jinja_filter
|
|
7
7
|
|
|
8
|
-
import re
|
|
9
8
|
from typing import Any, Dict, List, Optional, Union
|
|
10
|
-
from docassemble.base.util import register_jinja_filter, DACatchAll
|
|
9
|
+
from docassemble.base.util import register_jinja_filter, DACatchAll
|
|
11
10
|
from jinja2 import Undefined, pass_context
|
|
12
11
|
from jinja2.runtime import Context as Jinja2Context
|
|
13
12
|
|
|
@@ -18,6 +17,7 @@ __all__ = [
|
|
|
18
17
|
"catchall_question",
|
|
19
18
|
"catchall_subquestion",
|
|
20
19
|
"catchall_fields_code",
|
|
20
|
+
"catchall_complete",
|
|
21
21
|
]
|
|
22
22
|
|
|
23
23
|
|
|
@@ -29,6 +29,7 @@ def catchall_options(value: Any, *raw_items: Any) -> DACatchAll:
|
|
|
29
29
|
|
|
30
30
|
The items can be in various formats:
|
|
31
31
|
|
|
32
|
+
- String: `"code_is_the_label"`
|
|
32
33
|
- String: `"code: label"`
|
|
33
34
|
- Dictionary: `{"code": "label"}`
|
|
34
35
|
- Tuple: `("code", "label")`
|
|
@@ -66,14 +67,14 @@ def catchall_options(value: Any, *raw_items: Any) -> DACatchAll:
|
|
|
66
67
|
DACatchAll: The modified DACatchAll object with the assigned options.
|
|
67
68
|
"""
|
|
68
69
|
if isinstance(value, DACatchAll):
|
|
69
|
-
pairs = []
|
|
70
|
+
pairs: list[str | tuple[str, str]] = []
|
|
70
71
|
for item in raw_items:
|
|
71
72
|
if isinstance(item, str):
|
|
72
73
|
if ":" in item:
|
|
73
74
|
code, label = item.split(":", 1)
|
|
75
|
+
pairs.append((code.strip(), label.strip()))
|
|
74
76
|
else:
|
|
75
|
-
|
|
76
|
-
pairs.append((code.strip(), label.strip()))
|
|
77
|
+
pairs.append(item.strip())
|
|
77
78
|
elif isinstance(item, dict):
|
|
78
79
|
for code, label in item.items():
|
|
79
80
|
pairs.append((code.strip(), label.strip()))
|
|
@@ -203,6 +204,49 @@ def catchall_subquestion(value: Any, subquestion: str) -> DACatchAll:
|
|
|
203
204
|
return value
|
|
204
205
|
|
|
205
206
|
|
|
207
|
+
def catchall_complete(
|
|
208
|
+
value: DACatchAll,
|
|
209
|
+
question: str = "",
|
|
210
|
+
subquestion: str = "",
|
|
211
|
+
label: str = "",
|
|
212
|
+
datatype: str = "",
|
|
213
|
+
options: Any = "",
|
|
214
|
+
) -> DACatchAll:
|
|
215
|
+
"""
|
|
216
|
+
Jinja2 filter to allow you to define multiple attributes of a DACatchAll field inside a DOCX template.
|
|
217
|
+
|
|
218
|
+
Each argument after `value` corresponds to the similarly named `catchall_` function.
|
|
219
|
+
|
|
220
|
+
Example usage in a DOCX template:
|
|
221
|
+
```
|
|
222
|
+
{{ my_catchall_field | catchall_complete(question="What additional information do you need?", subquestion="Be specific", label="no label") }}
|
|
223
|
+
```
|
|
224
|
+
|
|
225
|
+
Args:
|
|
226
|
+
value (DACatchAll): The DACatchAll object to which the attributes will be assigned.
|
|
227
|
+
question (str, optional): The question text to set on the DACatchAll object.
|
|
228
|
+
subquestion (str, optional): The subquestion text to set on the DACatchAll object.
|
|
229
|
+
label (str, optional): The label to set on the DACatchAll object.
|
|
230
|
+
datatype (str, optional): The datatype to set on the DACatchAll object.
|
|
231
|
+
options (Any, optional): The options to set on the DACatchAll object.
|
|
232
|
+
|
|
233
|
+
Returns:
|
|
234
|
+
DACatchAll: The modified DACatchAll object with the assigned attributes.
|
|
235
|
+
"""
|
|
236
|
+
if isinstance(value, DACatchAll):
|
|
237
|
+
if question:
|
|
238
|
+
catchall_question(value, question)
|
|
239
|
+
if subquestion:
|
|
240
|
+
catchall_subquestion(value, subquestion)
|
|
241
|
+
if label:
|
|
242
|
+
catchall_label(value, label)
|
|
243
|
+
if datatype:
|
|
244
|
+
catchall_datatype(value, datatype)
|
|
245
|
+
if options:
|
|
246
|
+
catchall_options(value, options)
|
|
247
|
+
return value
|
|
248
|
+
|
|
249
|
+
|
|
206
250
|
def _undefined_label(ud: Undefined) -> Union[str, None]:
|
|
207
251
|
"""
|
|
208
252
|
Extract the variable name from a Jinja2 Undefined object for use as a placeholder label.
|
|
@@ -314,6 +358,7 @@ register_jinja_filter("catchall_label", catchall_label)
|
|
|
314
358
|
register_jinja_filter("catchall_datatype", catchall_datatype)
|
|
315
359
|
register_jinja_filter("catchall_question", catchall_question)
|
|
316
360
|
register_jinja_filter("catchall_subquestion", catchall_subquestion)
|
|
361
|
+
register_jinja_filter("catchall_complete", catchall_complete)
|
|
317
362
|
register_jinja_filter("if_final", if_final)
|
|
318
363
|
|
|
319
364
|
|
|
@@ -22,14 +22,14 @@ code: |
|
|
|
22
22
|
form_delivery_complete = True
|
|
23
23
|
---
|
|
24
24
|
code: |
|
|
25
|
-
court_email = court_emails.get(trial_court.name,None)
|
|
25
|
+
court_email = court_emails.get(trial_court.name, None)
|
|
26
26
|
if not court_email:
|
|
27
27
|
found_email = False
|
|
28
28
|
else:
|
|
29
29
|
found_email = True
|
|
30
30
|
---
|
|
31
31
|
code: |
|
|
32
|
-
bcc_failsafe = court_emails.get(
|
|
32
|
+
bcc_failsafe = court_emails.get("Failsafe Address", None)
|
|
33
33
|
---
|
|
34
34
|
comment: |
|
|
35
35
|
You are encouraged to overwrite these emails during testing!
|
|
@@ -51,22 +51,50 @@ code: |
|
|
|
51
51
|
else:
|
|
52
52
|
email_to_use = dev_email_to_use
|
|
53
53
|
bcc_email = dev_bcc_email
|
|
54
|
-
|
|
54
|
+
|
|
55
55
|
# temporary for testing
|
|
56
56
|
# email_to_use = "massaccess@suffolk.edu"
|
|
57
57
|
|
|
58
|
-
if task_not_yet_performed(
|
|
58
|
+
if task_not_yet_performed("send email"):
|
|
59
59
|
log(f"Court email is {court_email}, sending email to {email_to_use}")
|
|
60
60
|
email_success = False
|
|
61
61
|
if should_cc_user:
|
|
62
|
-
log(
|
|
63
|
-
|
|
64
|
-
|
|
62
|
+
log(
|
|
63
|
+
"Sending email to "
|
|
64
|
+
+ email_to_use
|
|
65
|
+
+ " and ccing "
|
|
66
|
+
+ cc_email
|
|
67
|
+
+ " for "
|
|
68
|
+
+ str(users)
|
|
69
|
+
+ " bcc to "
|
|
70
|
+
+ bcc_email
|
|
71
|
+
)
|
|
72
|
+
email_success = send_email(
|
|
73
|
+
to=email_to_use,
|
|
74
|
+
template=email_to_court_template,
|
|
75
|
+
task="send email",
|
|
76
|
+
cc=cc_email,
|
|
77
|
+
bcc=bcc_email,
|
|
78
|
+
attachments=al_final_form_to_file.as_pdf_list(key="final"),
|
|
79
|
+
)
|
|
65
80
|
else:
|
|
66
|
-
log(
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
81
|
+
log(
|
|
82
|
+
"Sending email to "
|
|
83
|
+
+ email_to_use
|
|
84
|
+
+ " and no cc "
|
|
85
|
+
+ " for "
|
|
86
|
+
+ str(users)
|
|
87
|
+
+ " bcc to "
|
|
88
|
+
+ bcc_email
|
|
89
|
+
)
|
|
90
|
+
email_success = send_email(
|
|
91
|
+
to=email_to_use,
|
|
92
|
+
template=email_to_court_template,
|
|
93
|
+
task="send email",
|
|
94
|
+
attachments=al_final_form_to_file.as_pdf_list(key="final"),
|
|
95
|
+
bcc=bcc_email,
|
|
96
|
+
)
|
|
97
|
+
mark_task_as_performed("send email")
|
|
70
98
|
sent_email_to_court = True
|
|
71
99
|
---
|
|
72
100
|
##############################################################
|
|
@@ -90,7 +118,7 @@ code: |
|
|
|
90
118
|
# Gets the number of pages, plus the first cover page
|
|
91
119
|
# TODO(brycew): figure out a better way to estimate the number of pages,
|
|
92
120
|
# including addendum, without generating a full file
|
|
93
|
-
al_num_package_pages = al_court_bundle.as_pdf(key=
|
|
121
|
+
al_num_package_pages = al_court_bundle.as_pdf(key="preview").num_pages() + 1
|
|
94
122
|
---
|
|
95
123
|
code: |
|
|
96
124
|
# You can define this in the interview's code block.
|
|
@@ -101,7 +129,7 @@ code: |
|
|
|
101
129
|
# This is a fallback package title to avoid errors on new forms
|
|
102
130
|
# It defines package_title as the metadata title.
|
|
103
131
|
# You may want a better form title for most interviews
|
|
104
|
-
package_title = all_variables(special=
|
|
132
|
+
package_title = all_variables(special="metadata").get("title", "").rstrip()
|
|
105
133
|
---
|
|
106
134
|
attachment:
|
|
107
135
|
variable name: al_cover_page[i]
|
|
@@ -126,27 +154,36 @@ code: |
|
|
|
126
154
|
elif signature_choice == "typed_signature":
|
|
127
155
|
for signature in signature_fields:
|
|
128
156
|
# Signature fields are strings like "users[0].signature". If the string ends in .signature, remove that and replace with .typed_signature, only at the end of the string
|
|
129
|
-
if signature.endswith(
|
|
130
|
-
typed_signature = signature[:-9] +
|
|
157
|
+
if signature.endswith("signature"):
|
|
158
|
+
typed_signature = signature[:-9] + "typed_signature"
|
|
131
159
|
define(signature, DAFile(signature, filename="signature.png"))
|
|
132
160
|
value(signature).initialize()
|
|
133
|
-
create_signature(
|
|
161
|
+
create_signature(
|
|
162
|
+
value(typed_signature),
|
|
163
|
+
value(signature).path(),
|
|
164
|
+
signature_prefix=al_typed_signature_prefix,
|
|
165
|
+
font_name=al_typed_signature_font,
|
|
166
|
+
)
|
|
134
167
|
else:
|
|
135
|
-
log(
|
|
136
|
-
|
|
168
|
+
log(
|
|
169
|
+
"Signature field "
|
|
170
|
+
+ signature
|
|
171
|
+
+ " does not end with .signature, not creating typed signature"
|
|
172
|
+
)
|
|
173
|
+
elif signature_choice in ["this device", "this_device"]:
|
|
137
174
|
for signature in signature_fields:
|
|
138
|
-
value(signature)
|
|
175
|
+
value(signature)
|
|
139
176
|
# Check for Branch 2 or 3
|
|
140
|
-
elif signature_choice ==
|
|
177
|
+
elif signature_choice == "phone":
|
|
141
178
|
saw_signature_qrcode
|
|
142
179
|
# User will click next. link_cell will only be defined if they chose the texting option
|
|
143
|
-
if showifdef("link_cell") and task_not_yet_performed(
|
|
180
|
+
if showifdef("link_cell") and task_not_yet_performed("send signature link"):
|
|
144
181
|
# They used the text option
|
|
145
|
-
send_sms(task=
|
|
182
|
+
send_sms(task="send signature link", to=link_cell, template=interview_link)
|
|
146
183
|
signature_wait_screen
|
|
147
184
|
for signature in signature_fields:
|
|
148
185
|
value(signature)
|
|
149
|
-
else:
|
|
186
|
+
else: # Branch 3: They used the QR Code. No special screen, just continue
|
|
150
187
|
for signature in signature_fields:
|
|
151
188
|
value(signature)
|
|
152
189
|
# Show the follow-up if they sent the link to their phone by QR or by SMS
|
|
@@ -157,14 +194,14 @@ code: |
|
|
|
157
194
|
code: |
|
|
158
195
|
# Sometimes we have values that can be set from interview_metadata.
|
|
159
196
|
# They don't always work, but interview author can override.
|
|
160
|
-
|
|
197
|
+
|
|
161
198
|
# Some interviews have multiple interview_metadata keys. Look in the 1st one
|
|
162
|
-
first_form_key = next(iter(interview_metadata),
|
|
163
|
-
if isinstance(interview_metadata.get(first_form_key,{}), dict):
|
|
164
|
-
first_form = interview_metadata.get(first_form_key,{})
|
|
199
|
+
first_form_key = next(iter(interview_metadata), "")
|
|
200
|
+
if isinstance(interview_metadata.get(first_form_key, {}), dict):
|
|
201
|
+
first_form = interview_metadata.get(first_form_key, {})
|
|
165
202
|
else:
|
|
166
203
|
first_form = {}
|
|
167
|
-
del
|
|
204
|
+
del first_form_key
|
|
168
205
|
---
|
|
169
206
|
depends on:
|
|
170
207
|
- user_ask_role
|
|
@@ -175,12 +212,12 @@ code: |
|
|
|
175
212
|
# define user_role to be either "defendant" or "plaintiff",
|
|
176
213
|
# either by checking interview_metadata or asking the user.
|
|
177
214
|
# The only valid values for user_role are "plaintiff" and "defendant".
|
|
178
|
-
|
|
215
|
+
|
|
179
216
|
# We will check for the "typical_role" key.
|
|
180
217
|
# Some older wizarded code doesn't define `typical_role`, so fall back
|
|
181
218
|
# to "unknown" if the key is not present.
|
|
182
219
|
# first_form is the first entry in interview_metadata
|
|
183
|
-
if not first_form.get("typical_role",
|
|
220
|
+
if not first_form.get("typical_role", "unknown") == "unknown":
|
|
184
221
|
user_role = first_form.get("typical_role")
|
|
185
222
|
else:
|
|
186
223
|
# If the user role was set to "unknown" at the time wizard run
|
|
@@ -25,21 +25,26 @@ code: |
|
|
|
25
25
|
preferred_formats = ["pdf"]
|
|
26
26
|
|
|
27
27
|
email_success = x.send_email(
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
28
|
+
to=action_argument("email"),
|
|
29
|
+
template=(
|
|
30
|
+
value(action_argument("template_name"))
|
|
31
|
+
if action_argument("template_name")
|
|
32
|
+
else None
|
|
33
|
+
),
|
|
34
|
+
key=action_argument("key"),
|
|
35
|
+
preferred_formats=preferred_formats,
|
|
36
36
|
)
|
|
37
|
+
email_arg = action_argument('email')
|
|
38
|
+
if isinstance(email_arg, list):
|
|
39
|
+
email_str = ', '.join(email_arg)
|
|
40
|
+
else:
|
|
41
|
+
email_str = str(email_arg)
|
|
37
42
|
if email_success:
|
|
38
43
|
# Exact phrase below is in Docassemble's words dictionary
|
|
39
|
-
log(word('E-mail was sent to')
|
|
44
|
+
log(f" {word('E-mail was sent to')} {email_str}", "success")
|
|
40
45
|
else:
|
|
41
46
|
# E-mail failed is not in the default Docassemble words dictionary
|
|
42
|
-
log(word('E-mail failed'),
|
|
47
|
+
log(f" {word('E-mail failed')} to {email_str}", "error")
|
|
43
48
|
---
|
|
44
49
|
generic object: ALDocumentBundle
|
|
45
50
|
event: x.send_email_to_action_event
|
|
@@ -58,33 +63,39 @@ code: |
|
|
|
58
63
|
preferred_formats = ["pdf"]
|
|
59
64
|
|
|
60
65
|
email_success = x.send_email(
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
66
|
+
to=action_argument("email"),
|
|
67
|
+
template=(
|
|
68
|
+
value(action_argument("template_name"))
|
|
69
|
+
if action_argument("template_name")
|
|
70
|
+
else None
|
|
71
|
+
),
|
|
72
|
+
key=action_argument("key"),
|
|
73
|
+
preferred_formats=preferred_formats,
|
|
69
74
|
)
|
|
75
|
+
email_arg = action_argument('email')
|
|
76
|
+
if isinstance(email_arg, list):
|
|
77
|
+
email_str = ', '.join(email_arg)
|
|
78
|
+
else:
|
|
79
|
+
email_str = str(email_arg)
|
|
70
80
|
if email_success:
|
|
71
|
-
log("Email sent to "
|
|
81
|
+
log(f"Email sent to {email_str}") # to log file
|
|
72
82
|
else:
|
|
73
|
-
log(word('E-mail failed to ')
|
|
74
|
-
|
|
75
|
-
json_response({'success': email_success})
|
|
76
|
-
|
|
77
|
-
|
|
83
|
+
log(f" {word('E-mail failed to ')} {email_str}")
|
|
78
84
|
|
|
85
|
+
json_response({"success": email_success})
|
|
79
86
|
---
|
|
80
87
|
generic object: ALDocumentBundle
|
|
81
88
|
code: |
|
|
82
89
|
# Used in the email subject line when email is triggered on download screen.
|
|
83
|
-
# This defaults to the interview title. For example, if the
|
|
90
|
+
# This defaults to the interview title. For example, if the
|
|
84
91
|
# interview title is "Guardianship Helper", the email
|
|
85
92
|
# subject would be "Your Guardianship Helper document from CourtFormsOnline is ready".
|
|
86
93
|
# Customize this if you prefer something like "Your guardianship document is ready"
|
|
87
|
-
x.document_label = str(
|
|
94
|
+
x.document_label = str(
|
|
95
|
+
all_variables(special="titles").get(
|
|
96
|
+
"title", all_variables(special="metadata").get("title", "assembled")
|
|
97
|
+
)
|
|
98
|
+
).strip()
|
|
88
99
|
---
|
|
89
100
|
generic object: ALDocumentBundle
|
|
90
101
|
template: x.send_email_template
|
|
@@ -122,36 +133,46 @@ content: |
|
|
|
122
133
|
id: al exhibit ocr pages bg
|
|
123
134
|
event: al_exhibit_ocr_pages
|
|
124
135
|
code: |
|
|
125
|
-
to_pdf = action_argument(
|
|
126
|
-
from_file = action_argument(
|
|
136
|
+
to_pdf = action_argument("to_pdf")
|
|
137
|
+
from_file = action_argument("from_file")
|
|
127
138
|
background_response(ocrmypdf_task(from_file, to_pdf))
|
|
128
139
|
---
|
|
129
140
|
############## Background document assembly #################
|
|
130
141
|
---
|
|
131
142
|
generic object: ALDocumentBundle
|
|
132
143
|
code: |
|
|
133
|
-
x.generate_downloads_task = background_action(x.attr_name(
|
|
144
|
+
x.generate_downloads_task = background_action(x.attr_name("create_downloads"))
|
|
134
145
|
---
|
|
135
146
|
generic object: ALDocumentBundle
|
|
136
147
|
event: x.create_downloads
|
|
137
148
|
code: |
|
|
138
|
-
download_response = x.get_cacheable_documents(
|
|
139
|
-
|
|
149
|
+
download_response = x.get_cacheable_documents(
|
|
150
|
+
key="final", pdf=True, include_full_pdf=True
|
|
151
|
+
)
|
|
152
|
+
background_response_action(
|
|
153
|
+
x.attr_name("save_downloads"), download_response=download_response
|
|
154
|
+
)
|
|
140
155
|
---
|
|
141
156
|
generic object: ALDocumentBundle
|
|
142
157
|
code: |
|
|
143
|
-
x.generate_downloads_with_docx_task = background_action(
|
|
158
|
+
x.generate_downloads_with_docx_task = background_action(
|
|
159
|
+
x.attr_name("create_downloads_with_docx")
|
|
160
|
+
)
|
|
144
161
|
---
|
|
145
162
|
generic object: ALDocumentBundle
|
|
146
163
|
event: x.create_downloads_with_docx
|
|
147
164
|
code: |
|
|
148
|
-
download_response = x.get_cacheable_documents(
|
|
149
|
-
|
|
165
|
+
download_response = x.get_cacheable_documents(
|
|
166
|
+
key="final", pdf=True, docx=True, include_full_pdf=True
|
|
167
|
+
)
|
|
168
|
+
background_response_action(
|
|
169
|
+
x.attr_name("save_downloads"), download_response=download_response
|
|
170
|
+
)
|
|
150
171
|
---
|
|
151
172
|
generic object: ALDocumentBundle
|
|
152
173
|
event: x.save_downloads
|
|
153
174
|
code: |
|
|
154
|
-
x._downloadable_files = action_argument(
|
|
175
|
+
x._downloadable_files = action_argument("download_response")
|
|
155
176
|
|
|
156
177
|
background_response()
|
|
157
178
|
---
|
|
@@ -171,18 +192,20 @@ reload: True
|
|
|
171
192
|
---
|
|
172
193
|
generic object: ALDocumentBundle
|
|
173
194
|
code: |
|
|
174
|
-
x.generate_preview_task = background_action(x.attr_name(
|
|
195
|
+
x.generate_preview_task = background_action(x.attr_name("generate_preview_event"))
|
|
175
196
|
---
|
|
176
197
|
generic object: ALDocumentBundle
|
|
177
198
|
event: x.generate_preview_event
|
|
178
199
|
code: |
|
|
179
200
|
preview_response = x.as_pdf(key="preview")
|
|
180
|
-
background_response_action(
|
|
201
|
+
background_response_action(
|
|
202
|
+
x.attr_name("save_preview"), preview_response=preview_response
|
|
203
|
+
)
|
|
181
204
|
---
|
|
182
205
|
generic object: ALDocumentBundle
|
|
183
206
|
event: x.save_preview
|
|
184
207
|
code: |
|
|
185
|
-
x._preview_file = action_argument(
|
|
208
|
+
x._preview_file = action_argument("preview_response")
|
|
186
209
|
background_response()
|
|
187
210
|
---
|
|
188
211
|
id: preview waiting screen
|
|
@@ -195,4 +218,4 @@ subquestion: |
|
|
|
195
218
|
<span class="sr-only visually-hidden">Generating preview...</span>
|
|
196
219
|
</div>
|
|
197
220
|
event: al_preview_waiting_screen
|
|
198
|
-
reload: True
|
|
221
|
+
reload: True
|
|
@@ -30,13 +30,13 @@ code: |
|
|
|
30
30
|
---
|
|
31
31
|
code: |
|
|
32
32
|
if enable_al_language:
|
|
33
|
-
if url_args.get(
|
|
34
|
-
al_user_language = url_args.get(
|
|
33
|
+
if url_args.get("lang"):
|
|
34
|
+
al_user_language = url_args.get("lang")
|
|
35
35
|
else:
|
|
36
36
|
al_user_language = al_user_default_language
|
|
37
37
|
---
|
|
38
38
|
event: al_change_language
|
|
39
39
|
code: |
|
|
40
|
-
if
|
|
41
|
-
al_user_language = action_argument(
|
|
40
|
+
if "lang" in action_arguments():
|
|
41
|
+
al_user_language = action_argument("lang")
|
|
42
42
|
set_language(al_user_language)
|
|
@@ -47,12 +47,12 @@ code: |
|
|
|
47
47
|
chiropractors.gather()
|
|
48
48
|
other_parties.gather()
|
|
49
49
|
users.gather()
|
|
50
|
-
users[0].gender
|
|
50
|
+
users[0].gender
|
|
51
51
|
users[0].address.address
|
|
52
52
|
users[0].mailing_address.address
|
|
53
53
|
users[0].phone_number
|
|
54
54
|
trial_court
|
|
55
|
-
big_text_field
|
|
55
|
+
big_text_field
|
|
56
56
|
children.gather()
|
|
57
57
|
preview_screen
|
|
58
58
|
basic_questions_signature_flow
|
|
@@ -73,7 +73,7 @@ continue button field: test_label_functions
|
|
|
73
73
|
code: |
|
|
74
74
|
children[i].name.first
|
|
75
75
|
children[i].birthdate
|
|
76
|
-
children[i].complete=True
|
|
76
|
+
children[i].complete = True
|
|
77
77
|
---
|
|
78
78
|
# Page to test certain features
|
|
79
79
|
# Reduced text for ease of testing custom audio element
|
|
@@ -125,9 +125,9 @@ question: |
|
|
|
125
125
|
yesno: mako_template_enabled
|
|
126
126
|
---
|
|
127
127
|
code: |
|
|
128
|
-
# You must use an intermediate value to set the enabled status, because it is not
|
|
128
|
+
# You must use an intermediate value to set the enabled status, because it is not
|
|
129
129
|
# cached longer than one page load. You do not need to explicitly reconsider it.
|
|
130
|
-
mako_template.enabled = mako_template_enabled
|
|
130
|
+
mako_template.enabled = mako_template_enabled
|
|
131
131
|
---
|
|
132
132
|
objects:
|
|
133
133
|
- al_user_bundle: ALDocumentBundle.using(elements=[mako_template, word_template, static_template, exhibit_attachment], filename="user_bundle.pdf", title="All forms to download for your records")
|
|
@@ -140,8 +140,8 @@ code: |
|
|
|
140
140
|
metadata_title = "AssemblyLine Question Test"
|
|
141
141
|
---
|
|
142
142
|
code: |
|
|
143
|
-
mako_template.overflow_fields[
|
|
144
|
-
mako_template.overflow_fields[
|
|
143
|
+
mako_template.overflow_fields["big_text_field"].overflow_trigger = 200
|
|
144
|
+
mako_template.overflow_fields["children"].overflow_trigger = 2
|
|
145
145
|
mako_template.overflow_fields.gathered = True
|
|
146
146
|
---
|
|
147
147
|
attachment:
|