{% extends 'django_modals/modal_base.html' %}

{% block javascript %}
<script>
    $(function () {
        $('#id_report_type').on('change', function (e) {
            $('#id_field').val('').trigger('change');
            $('#id_date_field').val('').trigger('change');
        });
    });

    function save_modal_{{ form.form_id }}() {
        id_query_data.save_query_builder();
        django_modal.process_commands_lock([{'function': 'post_modal'}]);
    }

</script>
{% endblock %}