{% if model_admin.foreign_key_lookups %}
  {% for field_name, search in model_admin.foreign_key_lookups.items() %}
    <div class="modal hide" id="modal-{{ field_name }}">
      <div class="modal-header">
        <a class="close" data-dismiss="modal">x</a>
        <h3>Select a {{ field_name }}</h3>
      </div>
      <div class="modal-body">
        <input class="fk-lookup-input" data-ajax-url="{{ url_for(model_admin.get_url_name('ajax_list')) }}?field={{ field_name }}" type="text" />
        <ul class="result-list">
        </ul>
      </div>
      <div class="modal-footer">
        <a class="btn disabled previous" href="#">Previous</a>
        <a class="btn disabled next" href="#">Next</a>
      </div>
    </div>
  {% endfor %}
{% endif %}
