{#
Reusable form field macros for CRUD forms.
Adapted for Bootstrap 5.
#}
{# Internal helper for help text #}
{% macro _help(text) %}{% if text %}
{{ text }}
{% endif %}{% endmacro %}
{% macro text_input(name, label, value='', help='', readonly=false, required=false, type='text', maxlength=none) %}
{#- `readonly` greys itself here, sharing `readonly_field`'s class: the attribute
already blocks typing, but Bootstrap 5 dropped the `[readonly]` styling
Bootstrap 4 had, so the control still read as editable. Not `disabled`,
which would leave the tab order and put the value out of a keyboard user's
reach -- `test_unit_detail_page_is_keyboard_reachable` holds that. -#}