{% macro btnContinue(includeDiv=true) -%} {% if includeDiv %}
{% endif %} {%- endmacro %} {% macro conditionLabel(condition) -%} {%- if config['CONDITIONS'] and condition and condition > 0 and condition <= (config['CONDITIONS']|length) -%} {{ config['CONDITIONS'][condition - 1]['label'] }} {%- elif condition -%} {{ condition }} {%- endif -%} {%- endmacro %} {% macro adminControls() -%} {% if (session.get('loggedIn', False) or debug) and request.blueprint != 'admin' %} {%- set current_path = request.path.lstrip('/') -%} {%- set current_occ = current_occurrence|default(0) -%} {%- set ns = namespace(current_idx=0) -%} {%- for page in flat_page_list -%} {%- set occ = flat_page_list[:loop.index0]|map(attribute='path')|select('equalto', page['path'])|list|length -%} {%- if page['path'] == current_path and occ == current_occ -%}{% set ns.current_idx = loop.index %}{%- endif -%} {%- endfor -%} {%- set total_pages = flat_page_list|length -%} {%- set pid = session.get('participantID') -%} {%- set condition = session.get('condition') -%} {%- set condition_label = conditionLabel(condition)|trim -%} {% endif %} {%- endmacro %} {% macro checkUserActive() %} {%- endmacro %}