{% load helpers %}
{% load form_helpers %}

<div class="modal fade" tabindex="-1" id="saved_view_modal">
    <div class="modal-dialog modal-lg">
        <div class="modal-content">
            <div class="modal-header">
                <button type="button" class="close" data-dismiss="modal" aria-label="Close"><span aria-hidden="true">&times;</span></button>
                <h4 class="modal-title">New Saved View</h4>
            </div>
            <form action="{% url 'extras:savedview_add' %}" method="post">
                <div class="modal-body">
                    {% csrf_token %}
                    <div class="form-group">
                        {% render_field form.name %}
                        <div class="form-group">
                            <label class="col-md-3 control-label" for="id_config">New Changes</label>
                            <div class="col-md-9">
                                <pre><code class="language-json">{{ param_dict }}</code></pre>
                            </div>
                        </div>
                        {% render_field form.is_shared %}
                        <input type="hidden" id="view" name="view" value="{{view}}">
                        <input type="hidden" id="params" name="params" value="{{params}}">
                    </div>
                </div>
                <div class="modal-footer">
                    <button type="submit" class="btn btn-primary">
                        <span class="mdi mdi-content-save-plus-outline" aria-hidden="true"></span> Save
                    </button>
                    <button class="btn btn-default" data-dismiss="modal">
                        <span class="mdi mdi-close-thick" aria-hidden="true"></span> Cancel
                    </button>
                </div>
            </form>
        </div>
    </div>
</div>
