diff --git a/docassemble/ALToolbox/data/questions/collapse_template_demo.yml b/docassemble/ALToolbox/data/questions/collapse_template_demo.yml index 97cce555..678d54f8 100644 --- a/docassemble/ALToolbox/data/questions/collapse_template_demo.yml +++ b/docassemble/ALToolbox/data/questions/collapse_template_demo.yml @@ -42,7 +42,7 @@ subquestion: | Don't you have a favorite fruit? - ${ collapse_template(favorite_explanation, container_classname="favorites_container") } + ${ collapse_template(favorite_explanation) } You must have a favorite. fields: diff --git a/docassemble/ALToolbox/data/questions/display_template_demo.yml b/docassemble/ALToolbox/data/questions/display_template_demo.yml index b41d0a6b..da348610 100644 --- a/docassemble/ALToolbox/data/questions/display_template_demo.yml +++ b/docassemble/ALToolbox/data/questions/display_template_demo.yml @@ -33,8 +33,6 @@ subquestion: | - This feature applies the **copy_button_html()** function to template content. See [copy button demo](${interview_url(i=user_info().package + ":copy_button_demo.yml")}). 1. **classname** (default="bg-light") - To style your template content, include a `classname` keyword argument when you call the function and add your css rules either on the screen or to a .css file. - 1. **container_classname** (default=None) - - To style the whole container of your subject and content, include a `content_classname` keyword argument when you call the function and add your css rules either on the screen or to a .css file. You can mix and match these features. The following screens will show you how. @@ -46,7 +44,7 @@ question: | Scrollable examples subquestion: | ##### Srollable only - ${ display_template(my_template1, container_classname="my_class") } + ${ display_template(my_template1) } ##### Style only ${ display_template(my_template2, scrollable=False, classname="my_color") } diff --git a/docassemble/ALToolbox/display_template.py b/docassemble/ALToolbox/display_template.py index 31226b5c..017a5faa 100644 --- a/docassemble/ALToolbox/display_template.py +++ b/docassemble/ALToolbox/display_template.py @@ -9,7 +9,6 @@ def display_template( collapse=False, copy=False, classname="bg-light", - container_classname=None, class_name=None # depricated ) -> str: # 1. Initialize @@ -27,9 +26,7 @@ def display_template( class_name = classname class_name = class_name.strip() - container_classname_plus = "al_display_template" - if container_classname: - container_classname_plus += f" { container_classname }" + container_classname = "al_display_template" container_id = b64encode(str(template.instanceName).encode()).decode().replace('=', '') contents_id = f"{ container_id }_contents" @@ -50,12 +47,12 @@ def display_template( # 2.1 If collapsible, add collapsible elements to the output if collapse: - return f'