{% extends "base.html" %} {% block scripts %} {{ passing_scripts|safe }} {% endblock %} {% block scriptsready %} $.fn.datepicker.defaults.format = 'dd/mm/yyyy'; $('.input-daterange input').each(function() { $(this).datepicker(); }); {% for field in fields %} {% ifequal field.1 "text" %} $('#{{ field.0 }}').keyup(function(e) { {% if allow_prompt_ajax_search %} get_object_list(); {% else %} if (e.keyCode == 13) { get_object_list(); }; {% endif %} }); {% endifequal %} {% ifequal field.1 "number" %} $('#{{ field.0 }}_gt, #{{ field.0 }}_lt').keyup(function(e) { {% if allow_prompt_ajax_search %} get_object_list(); {% else %} if (e.keyCode == 13) { get_object_list(); }; {% endif %} }); {% endifequal %} {% endfor %} $('#submit_ajax_query').click(function() { get_object_list(); }); {% endblock %} {% block content %}

{{ class_name }}s

{% for field in fields %}
{% ifequal field.1 'text' %} {% endifequal %} {% ifequal field.1 'number' %}
to
{% endifequal %} {% ifequal field.1 'date' %}
to
{% endifequal %} {% ifequal field.1 'boolean' %} {% endifequal %} {% ifequal field.1 'relation' %} {% endifequal %}
{% endfor %} {% include "blocks/find_button_for_ajax_searches.html" %}
{% endblock %}