<!-- Modal HTML -->
<div id="similar_jobs_modal" class="modal fade">
  <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>
        <h3 class="modal-title">Find similar test jobs</h3>
        <p>
          Add query criteria to identify other test jobs similar to this one, e.g. by submitter, actual_device, user, status or metadata generated by this test job.
        </p>
        <p>
          Hint: Please take a look at the metadata of the test job results to find out more about the available metadata fields.
        </p>
        <p>
          Hint: Start typing to search for the available fields depending on the entity.<br>Available fields will appear in a list below.
        </p>
      </div>
      <div class="modal-body">
	<div id="similar_jobs_errors" class="errorlist" style="color: red;"></div>
	<form id="similar_jobs_form" class="well" method="post" action="{% url 'lava.scheduler.job.similar_jobs' job.pk %}">
          <input id="id_condition_choices" type="hidden" value="{{ condition_choices }}"/>
          <input id="id_available_content_types" type="hidden" value="{{ available_content_types }}"/>
          <div class="row">
            <div class="col-xs-4">
              <strong>Match entity</strong>
            </div>
            <div class="col-xs-4">
              <strong>Match field</strong>
            </div>
          </div>
          <br>
          <div id="options_container">
	    {% csrf_token %}
          </div>
          <hr/>
          <a onclick="add_option_row();" class="btn btn-sm btn-primary" href="javascript: void(0);">
            Add new option
          </a>
	</form>
      </div>
      <div class="modal-footer">
        <button type="button" class="btn btn-default" data-dismiss="modal">Close</button>
        <button id="submit_similar_jobs" type="button" class="btn btn-primary">Continue</button>
      </div>
    </div>
  </div>
</div>
