summaryrefslogtreecommitdiffstats
path: root/app/views/imports/_issues_mapping.html.erb
blob: e1f01881e67670bc97e128e6563ef20af0384ef6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
<fieldset class="box tabular">
  <legend><%= l(:label_fields_mapping) %></legend>
  <div id="fields-mapping">
    <%= render :partial => 'issues_fields_mapping' %>
  </div>
</fieldset>

<fieldset class="box tabular collapsible collapsed">
  <legend onclick="toggleFieldset(this);" class="icon icon-collapsed"><%= l(:label_relations_mapping) %></legend>
  <div id="relations-mapping" style="display: none;">
    <%= render :partial => 'issues_relations_mapping' %>
  </div>
</fieldset>

<%= javascript_tag do %>
  $('#fields-mapping').on('change', '#import_mapping_project_id, #import_mapping_tracker', function(){
    $.ajax({
      url: '<%= import_mapping_path(@import, :format => 'js') %>',
      type: 'post',
      data: $('#import-form').serialize()
    });
  });
<% end %>