{% extends "admin/admin_extended.html" %}
{% load i18n %}
{% block content %}

<div class="editable pdbadmin" id="org-merge-tool">
<div class="editable loading-shim" style="display:none"></div>

<div class="editable popin info">
<h4>{% trans "Please proceed with caution, if you no one has explained this tool to you please obtain instructions from someone before proceeding" %}</h4>
{% trans "You may undo merges" %} <a href="{{ undo_url }}">{% trans "here" %}</a>
</div>

<table style="width:100%">
  <tr>
    <td style="width:300px">
      <h4>{% trans "Selected Organizations" %}</h4>
      <div>
        <input id="org-autocomplete-search-src" placeholder="{% trans "Search" %}" type="text" data-merge-type="source"/>
        <p class="help">{% trans "Organizations in this column will be merged into the organization in the right column. Click entries to remove from selection." %}<p>
      </div>

      <div class="listing" id="listing-selected">

      </div>
    </td>
    <td style="vertical-align: baseline">
      <h4>{% trans "Merge Into Organization" %}</h4>
      <div>
        <input id="org-autocomplete-search-trg" placeholder="{% trans "Search" %}" type="text" data-merge-type="target" />
        <p class="help">{% trans "Organizations in the left column will be merged into this organization" %}<p>
      </div>

      <div class="finalize" style="display:none">
        <div id="target-org" data-edit-type="number" data-edit-value="0"></div>
        <a class="grp-button" id="btn-submit">{% trans "Merge Organizations" %}</a>
      </div>

      <div class="error-message" style="display:none;">Some error</div>

      <div class="merge-results">
        <h4>{% trans "Merge Results" %}</h4>
        <div id="stats">
        </div>
      </div>
    </td>
  </tr>
</table>
</div>


{% endblock %}
