{# See $.selective in content.js for the necessary plumbing #} {# moreOptions is merged with options. This makes it easier to #} {# pass some default options and then customize a few #} {%- macro formSelective(name, label, options = {}, moreOptions = {}) -%} {%- set _options = aposMerge(options, moreOptions) -%} {%- if _options.inline -%}
{%- else -%}
{%- endif -%} {{ __('Limit Reached!') }}
    {# This is a template for creating the real items, #} {# it will be cloned as needed #}
  • {{ __(Title) }}
    {%- if _options.extras or _options.relationship -%} {# TODO: extend our support for different types of extra fields, #} {# style them meaningfully. Usually on same row with item #} {%- for extra in (_options.extras or _options.relationship) -%} {%- if (extra.type == 'checkbox') or (extra.type == 'boolean') -%} {%- elif (extra.type == 'string') or (extra.type == 'text') -%} {%- elif (extra.type == 'radio') -%} {%- for choice in extra.choices -%} {{ choice.label | e }} {%- endfor -%} {%- elif (extra.type == 'select') -%}
    {{ formSelectStandalone(extra.name, extra.choices, { 'data-extras': '' }) }}
    {%- elif (extra.type == 'tags') -%} {{ formTags(extra.name, label, { inline: true }) }} {%- else -%} {{ aposLog("WARNING: unrecognized type for relationship field: ") }} {{ aposLog(extra) }} {%- endif -%} {%- endfor -%}
    {% endif %} {% if _options.propagate %} {% endif %}
{%- if _options.inline -%}
{%- else -%}
{%- endif -%} {%- endmacro -%}