{# Standard form markup, for convenience and consistency #} {% macro formText(name, label) %}
{% endmacro %} {% macro formTags(name, label) %} {# Later this will be customized with autocomplete and such #} {{ formText(name, label) }} {% endmacro %} {% macro formTextarea(name, label) %}
{% endmacro %} {% macro formSelect(name, label, choices) %}
{% endmacro %} {# Less ambiguous to work with than a checkbox #} {% macro formBoolean(name, label) %} {{ formSelect(name, label, [ { name: '1', label: 'Yes' }, { name: '0', label: 'No' }]) }} {% endmacro %} {# See enableSingleton in snippets' main.js for the necessary plumbing, including #} {# specifying the type we want for the singleton #} {% macro formSingleton(name, label) %}
{# js adds this singleton to the dialog #}
{% endmacro %} {# See enableArea in snippets' main.js for the necessary plumbing #} {% macro formArea(name, label) %}
{# js adds this area to the dialog #}
{% endmacro %} {# A pill button with several mutually exclusive choices (a nicer radio button basically). #} {# Designed to be plumbed with javascript, note the data attributes #} {% macro formPill(name, options) %} {%- for pill in options -%} {{ pill.label }} {%- endfor -%} {% endmacro %}