anchor.diff:            },
           },
         });
  -      $creator_types_clone.select2({
  -        width: "250px",
  -        matcher: function(term, text, opt) {
  -          return text.toUpperCase().indexOf(term.toUpperCase())==0
  -              || opt.attr("alt").toUpperCase().indexOf(term.toUpperCase())==0;
  -        }
  -      });
  +
  +      <% if SystemConfiguration.get("use_agent_type") %>
  +        $creator_types_clone.select2({
  +          width: "250px",
  +          matcher: function(term, text, opt) {
  +            return text.toUpperCase().indexOf(term.toUpperCase())==0
  +                || opt.attr("alt").toUpperCase().indexOf(term.toUpperCase())==0;
  +          }
  +        });
  +      <% end %>
  +
       },
       remove : function (div_num) {
         var field = document.getElementById('CF' + div_num);
  
positive.code:       $clone[0].id = 'select2_creator';
        $clone.show();
        $clone.attr('name','creator_ids[' + this.currentNumber + ']');
        var $creator_types_clone = $("#select2_creator_types_hidden").clone();
        $creator_types_clone[0].id = 'select2_creator_types';
        $creator_types_clone.show();
        $creator_types_clone.attr('name', 'creator_type_ids[' + this.currentNumber + ']');
        var $new_field = $("<tr/>").attr("id", "CF" + this.currentNumber);
        var newItem = this.itemTemplate.replace(/__count__/mg, this.currentNumber);
        var $clone_field = $("<td/>");
        $clone_field.append($clone);
        var $creator_types_clone_field = $("<td/>");
        $creator_types_clone_field.append($creator_types_clone);
        $new_field.append($clone_field);
        $new_field.append($creator_types_clone_field);
        $new_field.append(newItem);
        $("#creator_field > table > tbody").append($new_field);
        this.currentNumber += 1;
  
negative.code:   var ItemField_publisher = {
      currentNumber : <%= raw (@add_publishers.blank? ? 1 : @add_publishers.size).to_json %>,
      itemTemplate : ''
        + '<td><input type="button" value="+" onClick="ItemField_publisher.add();" /></td>'
        + '<td><input type="button" value="-" onClick="ItemField_publisher.remove(__count__);" /></td>',
      add : function () {
        var $new_field = $("<tr/>").attr("id", "CF" + this.currentNumber);
  
        var $clone = $('input[name="publisher_agent_ids[0]"]').clone();
        $clone.attr('name','publisher_agent_ids[' + this.currentNumber + ']');
        $clone.val('');
  
        var $publisher_ids_clone = $("#publisher_ids_0").clone();
        $publisher_ids_clone.attr('id', 'publisher_ids_' + this.currentNumber);
        $publisher_ids_clone.attr('name', 'publisher_ids[' + this.currentNumber + ']');
        $publisher_ids_clone.attr('value', "");
  
        var $publisher_full_names_clone = $("#publisher_full_names_0").clone();
        $publisher_full_names_clone.attr('id', 'publisher_full_names_' + this.currentNumber);
        $publisher_full_names_clone.attr('name', 'publisher_full_names[' + this.currentNumber + ']');
        $publisher_full_names_clone.attr('value', "");
        
        var $clone_field = $("<td/>");
        $clone_field.append($clone);
        $clone.select2(newAgentSlect2options);
        $clone_field.append($publisher_ids_clone);
        $clone_field.append($publisher_full_names_clone);
        $new_field.append($clone_field);
  
        var $publisher_full_name_transcriptions_clone = $("#publisher_full_name_transcriptions_0").clone();
        $publisher_full_name_transcriptions_clone.attr('id', 'publisher_full_name_transcriptions_' + this.currentNumber);
        $publisher_full_name_transcriptions_clone.attr('name', 'publisher_full_name_transcriptions[' + this.currentNumber + ']');
        $publisher_full_name_transcriptions_clone.val("");
        var $publisher_full_name_transcriptions_clone_field = $("<td/>");
        $publisher_full_name_transcriptions_clone_field.append($publisher_full_name_transcriptions_clone);
        $new_field.append($publisher_full_name_transcriptions_clone_field);
  
        <% if SystemConfiguration.get("use_agent_type") %>
          var $publisher_types_clone = $("#publisher_type_ids_0").clone();
          $publisher_types_clone.attr('id', 'publisher_type_ids_' + this.currentNumber);
          $publisher_types_clone.attr('name', 'publisher_type_ids[' + this.currentNumber + ']');
          var $publisher_types_clone_field = $("<td/>");
          $publisher_types_clone_field.append($publisher_types_clone);
          $publisher_types_clone.select2(agentTypeSlect2options);
          $new_field.append($publisher_types_clone_field);
        <% end %>
        
        var newItem = this.itemTemplate.replace(/__count__/mg, this.currentNumber);
        $new_field.append(newItem);
        $("#publisher_field > table > tbody").append($new_field);
        this.currentNumber += 1;
      },
      remove : function (div_num) {
        var field = document.getElementById('CF' + div_num);
        if(field != null){ field.parentNode.removeChild(field); }
      }
    }
  