<div id="add-tags">

  <ul class="nav nav-pills">
    <li class="active"><a href=".set_new" data-toggle="tab"><%= t(:create_) %></a></li>
    <li><a href=".select_default" data-toggle="tab"><%= t(:use_default) %></a></li>
  </ul>
  <div class="tab-content">

    <div class="set_new tab-pane fade active in">
      <%= form_for @tag, url: admin_module_tags_path(module_app_id: @module_app_id), remote: true, id: 'create_new_tags' do |f| %>
        <fieldset>
          <%= render partial: "admin/tags/form", :locals => { :f => f } %>
          <div class="form-actions">
            <a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
            <%= f.submit t(:create_), class: 'btn btn-primary btn-small' %>
          </div>
        </fieldset>
      <% end %>
    </div>

    <div class="select_default tags tab-pane fade">
      <input id="filter-default-tag" class="search-query" type="text" placeholder="Search Tags" value="">
      <%= form_tag update_included_default_admin_module_tags_path(module_app_id: @module_app_id), id: "filter-default-tag", method: :post, remote: true do  %>
        <fieldset>
          <ul class="add-default-tags-list tags-groups checkbox-card">
            <% @default_tags.each do |module_tag| %>
              <li class="filter-item default">
                <p class="card pull-left">
                  <input type="checkbox">
                  <%= check_box_tag "ids[]", module_tag.id, false, class: "tag_id" %>
                </p>
                <a>
                  <span class="amount"><%= get_tagging_count(module_tag) %></span>
                  <%= show_names_slash(module_tag) %>
                </a>
              </li>
            <% end %>
          </ul>
          <div class="form-actions">
            <a href="javascript:$.pageslide.close()" class="btn btn-small"><%= t(:cancel) %></a>
            <%= submit_tag t(:add), class: 'btn btn-primary btn-small' %>
          </div>
        </fieldset>
      <% end %>
    </div>
  </div>

</div>
