{# A filter bar (components/filter_bar.py): a GET form of schema fields, so a filtered view is a URL and the bar works without JavaScript. The text-like fields are the CRUD field macro's, so labels, help and controls match the forms. Enum, Boolean and Related are selects with an "All" choice drawn here: as filters they need a "not filtered" value the form widgets lack. With autosubmit, Unpoly submits on change and the button is visually hidden until focused (it stays for the keyboard and the no-JS page). #} {% from "crud/_macros.html" import render_field, field_help, error_attrs, field_error %} {% macro own_select(row) -%} {%- set name = row.name -%} {%- set type = row.type -%} {%- set help_id = name ~ '-help' if type.has_help() else none -%} {%- set error = errors.get(name) -%} {%- set error_id = name ~ '-error' -%} {%- set current = data[name] -%}