{# Shared template components. #} {# CSRF token of every POST form. #} {% macro csrf_field() -%}{%- endmacro %} {# Date and time: UTC text without JS, converted to the browser's local time otherwise. #} {% macro when(value, kind="full") -%} {%- if value -%}{%- endif -%} {%- endmacro %} {# One-click action button, with confirmation if `confirm` is given. #} {% macro action(url, label, confirm="", kind="", small=true) -%}
{%- endmacro %} {# Copyable value (address, command, secret). #} {% macro copyable(id, value, block=false) -%}{{ value }}
{%- endmacro %}
{# Secret shown only once. #}
{% macro reveal_notice(value, message) -%}
{{ message }}
{{ copyable('revealed-value', value) }}
{{ text }}
{% if disabled_reason %}{{ disabled_reason }}
{% else %} {% endif %}{{ _("You belong to several organizations: only the spaces of {org} are checked. Otherwise, malicious content in one organization could lead the assistant to read another organization and copy what it finds there. Check other spaces, or choose “All my spaces”, if you need them.", org=spaces[0].organization.name) }}
{% endif %} {%- endmacro %} {# After a refusal for a likely secret: confirm it is not one. #} {% macro secret_confirm(error) -%} {% if error and error.code == 'secret_detected' %}{% endif %} {%- endmacro %} {# Translated file field (the native button follows the browser language, not the page's). #} {# File field. Several files: each selection adds to the list above the button (preferences.js), each file can be removed; without JS, a plain multiple field. #} {% macro file_input(id, name, multiple=false, required=false) -%} {% if multiple %}