Skip to content

Commit 5b7c52f

Browse files
Merge pull request #965 from SuffolkLITLab/964-signature-choice-slash-s
In signature flow choice screen, use the actual signer's name in the example for /s/, not just `users[0]`
2 parents 037113d + 2a998e8 commit 5b7c52f

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

docassemble/AssemblyLine/data/questions/ql_baseline.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1464,6 +1464,17 @@ code: |
14641464
code: |
14651465
signature_fields = ['users[0].signature']
14661466
---
1467+
code: |
1468+
if len(signature_fields):
1469+
if next(iter(signature_fields)).endswith(".signature"):
1470+
# the id: signature choice question has to assume the object exists, so we don't guard against that here
1471+
# note: this does not need to be an ALIndividual, so just use str() instead of .full_name()
1472+
slash_s_example_name = str(value( next(iter(signature_fields))[:-len(".signature")] ))
1473+
else:
1474+
slash_s_example_name = "Signer's Name"
1475+
else:
1476+
slash_s_example_name = "Signer's Name"
1477+
---
14671478
id: signature choice
14681479
decoration: file-signature
14691480
question: |
@@ -1482,7 +1493,7 @@ fields:
14821493
We can share a link with your phone on the next screen
14831494
% endif
14841495
- On this device: this_device
1485-
- With a typed signature, like "${ al_typed_signature_prefix }${ users[0] }": typed_signature
1496+
- With a typed signature, like "${ al_typed_signature_prefix }${ slash_s_example_name }": typed_signature
14861497
show if:
14871498
code: |
14881499
al_form_requires_digital_signature and not (device() and (device().is_mobile or device().is_touch_capable))
@@ -1491,7 +1502,7 @@ fields:
14911502
input type: radio
14921503
choices:
14931504
- On this device: this_device
1494-
- With a typed signature, like "${ al_typed_signature_prefix }${ users[0] }": typed_signature
1505+
- With a typed signature, like "${ al_typed_signature_prefix }${ slash_s_example_name }": typed_signature
14951506
show if:
14961507
code: |
14971508
al_form_requires_digital_signature and (device() and (device().is_mobile or device().is_touch_capable))
@@ -1507,7 +1518,7 @@ fields:
15071518
We can share a link with your phone on the next screen
15081519
% endif
15091520
- On this device: this_device
1510-
- With a typed signature, like "${ al_typed_signature_prefix }${ users[0] }": typed_signature
1521+
- With a typed signature, like "${ al_typed_signature_prefix }${ slash_s_example_name }": typed_signature
15111522
- On the paper with a pen after I print the documents: sign_after_printing
15121523
show if:
15131524
code: |
@@ -1517,7 +1528,7 @@ fields:
15171528
input type: radio
15181529
choices:
15191530
- On this device: this_device
1520-
- With a typed signature, like "${ al_typed_signature_prefix }${ users[0] }": typed_signature
1531+
- With a typed signature, like "${ al_typed_signature_prefix }${ slash_s_example_name }": typed_signature
15211532
- On the paper with a pen after I print the documents: sign_after_printing
15221533
show if:
15231534
code: |

0 commit comments

Comments
 (0)