<div id="add-case-form" class="p-2 border rounded">
    <p class="mb-2">Add an existing case to this collection. You can also use the case overview view to add multiple cases at once: <a href="{% url 'atlas:case_view' %}">case overview</a>.</p>

    {% load case_widgets %}
    {% url 'atlas:add_case_to_collection' collection.pk as add_case_url %}
    {% case_search_widget collection=collection cases=cases recent_cases=recent_cases selection_mode='multiple' action_url=add_case_url input_id='case-search-input-collection-'|add:collection.pk|stringformat:'s' target_id='case-search-results-collection-'|add:collection.pk|stringformat:'s' %}

    <div class="mt-2">
        <button class="btn btn-sm btn-secondary" _="on click remove #add-case-form">Close</button>
    </div>
</div>