Skip to content

Commit

Permalink
Moved ALKiln HTML to a template in al_code
Browse files Browse the repository at this point in the history
Makes it easier to be reused in unstyled interviews, while keeping all styled
and unstyled interviews the same.

Fixes #355.
  • Loading branch information
BryceStevenWilley committed Aug 22, 2023
1 parent d750431 commit 25cd60f
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
6 changes: 6 additions & 0 deletions docassemble/AssemblyLine/data/questions/al_code.yml
Original file line number Diff line number Diff line change
Expand Up @@ -185,3 +185,9 @@ code: |
else:
# If the user role was set to "unknown" at the time wizard run
user_role = user_ask_role
---
# A bit of HTML required for ALKiln to be used in interviews.
# To add to your unstyled alkiln interviews, include it in your `default screen parts: post`
template: alkiln_trigger_html
content: |
<div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
3 changes: 2 additions & 1 deletion docassemble/AssemblyLine/data/questions/al_visual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,9 @@ default screen parts:
<div data-variable="${ encode_name(str( user_info().variable )) }" id="sought_variable" aria-hidden="true" style="display: none;"></div>
% endif
# We need both pre and post until old interviews are updated to v2 of the testing framework or v1 of the testing framework is updated. In future, we will need this in `post` so that it will work on signature pages.
# Uses `alkiln_trigger_html` template in al_code.yml
post: |
<div data-variable="${ encode_name(str( user_info().variable )) }" id="trigger" aria-hidden="true" style="display: none;"></div>
${ alkiln_trigger_html }
---
features:
small screen navigation: dropdown
Expand Down

0 comments on commit 25cd60f

Please sign in to comment.