{% from "components/icons.html" import search_icon, close_icon %} {# Shared compact search control for record toolbars and management lists. The clear control shows whenever the field has text. With clear_url it is a link that resets the applied criteria (and works without JavaScript); otherwise it only empties the field and repeats the live list filter. #} {% macro search_field(id, label, placeholder, name=none, value='', maxlength=none, list_search=false, clear_url=none) -%}
{{ search_icon() }} {%- if clear_url %}{{ close_icon() }} {%- else %}{% endif %}
{%- endmacro %}