{% 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 ns = namespace(current_idx=0) -%} {%- for page in flat_page_list -%} {%- if page['path'] == current_path -%}{% 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 %}