{% load i18n %}

<form action="{{ form_action }}" method="post">
    {% csrf_token %}
    <div class="modal fade" id="save-dialog">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal" aria-hidden="true">&times;</button>
                    <h4 class="modal-title">{% trans "Save This Search" %}</h4>
                </div>
                <div class="modal-body">
                    <div class="form-group">
                        <label for="search-name">{% trans "Name" %}</label>
                        <input type="text" name="name" id="search-name" class="form-control" />
                    </div>
                    <div class="form-group">
                        <label class="checkbox-inline">
                            <input type="checkbox" name="default" value="1" />
                            {% trans "Make this your default search for this page" %}
                        </label>
                    </div>
                </div>
                <div class="modal-footer">
                    <input type="hidden" name="querystring" value="{{ querystring }}" id="querystring" />
                    <button type="button" class="btn btn-default" data-dismiss="modal">{% trans "Cancel" %}</button>
                    <button type="submit" name="_save" class="btn btn-primary">{% trans "Save Search" %}</button>
                </div>
            </div>
        </div>
    </div>
</form>
