<%= provide(:title, "CCLA Invitations for #{@organization.name}") %>

<div class="page withspace contribute">
  <h1><%= @organization.name %> Organization Management</h1>

  <%= render "ccla_signatures/organization_tabs", ccla_signature: @organization.latest_ccla_signature %>

  <div class="tabs-content">
    <div class="content active">
      <p>As an admin you may combine an organization with another in the event that a duplicate organization was created in error. Note that all contributors will be transferred to the selected organization and this organization will be deleted. Alternatively you can simply delete this organization.</p>

      <%= form_for @organization, url: { action: 'combine' }, method: :put do |f| %>
        <div class="row collapse">
          <div class="small-10 columns">
            <%= f.hidden_field :combine_with_id, class: 'transfer-ccla-organization', 'data-url' => organizations_path(exclude_id: @organization) %>
          </div>
          <div class="small-2 columns">
            <%= f.submit 'Combine', class: 'button postfix radius' %>
          </div>
        </div>
      <% end %>

      <%= link_to 'Delete this Organization', organization_path(@organization), method: :delete, data: { confirm: 'This will permanently delete this organization and all of its signatures. Are you sure?' }, class: 'button alert radius small' %>
    </div>
</div>

<%= provide(:title, "CCLA Invitations for #{@organization.name}") %>

<div class="page withspace contribute">
  <h1><%= @organization.name %> Organization Management</h1>

  <%= render "ccla_signatures/organization_tabs", ccla_signature: @organization.latest_ccla_signature %>

  <div class="tabs-content">
    <div class="content active">
      <p>Select an organization that you would like to merge into this organization. All contributors will be transferred to this organization. Admins of the merged organization will be stripped of their admin role. Alternatively, you can delete this organization.</p>

      <%= form_for @organization, url: { action: 'combine' }, method: :put do |f| %>
        <div class="row collapse">
          <div class="small-10 columns">
            <%= f.hidden_field :combine_with_id, class: 'transfer-ccla-organization', 'data-url' => organizations_path(exclude_id: @organization) %>
          </div>
          <div class="small-2 columns">
            <%= f.submit 'Combine', class: 'button postfix radius' %>
          </div>
        </div>
      <% end %>

      <%= link_to 'Delete this Organization', organization_path(@organization), method: :delete, data: { confirm: 'This will permanently delete this organization and all of its signatures. Are you sure?' }, class: 'button alert radius small' %>
    </div>
</div>

Update the org merge copy to be more accurate.
Update the org merge copy to be more accurate.

The selected org gets merged into the one that the admin is viewing.
