{# Reusable capture widget — used by /capture (saves to /api/notes) and by the comment form on every entity detail page (saves to /comments). Usage: {% from '_capture_widget.html' import capture_widget %} {{ capture_widget('comment-area-1') }} The `prefix` arg becomes the id-suffix for every interactive element so multiple widgets can coexist on the same page. The `data-capture-root` attribute lets capture.js auto-discover and initialize each widget. The wiring (where to POST, what fields to attach) is handled by capture.js reading data-* attributes on the root element. #} {% macro capture_widget(prefix, mode='capture', target_type='', target_id='', save_label='Save note', placeholder="What's going on?") %}
{% endmacro %}