<commit_before>
consumers_coop = {

  add_payment_method: function(e) {
    var i = e.target.options.selectedIndex
    var value = e.target.options[i].value
    e.target.options.selectedIndex = 0
    if ($('.payment_method_id-'+value))
      return
    var text = e.target.options[i].text
    $('<span data="'+value+'">').append(text).append($('<span class=remove>').append('x')).appendTo('.chosen_payment_methods')

    $('<input name="profile_data[payment_method_ids][]" multiple="multiple" type="hidden" class="payment_method_id-'+value+'" value="'+value+'">').appendTo('.chosen_payment_methods')


  },
  remove_payment_method: function(e) {
    var slug = $(e.target).parent().attr('data')
    $('.payment_method_id-'+slug).remove()
    $(e.target).parent().remove()
  },

  set_payment_options: function() {<commit_msg>consumers_coop: fix payment method adding<commit_after>
consumers_coop = {

  add_payment_method: function(e) {
    var i = e.target.options.selectedIndex
    var value = e.target.options[i].value
    e.target.options.selectedIndex = 0
    if ($('.payment_method_id-'+value).length > 0)
      return
    var text = e.target.options[i].text
    console.log(text)
    $('<span data="'+value+'">').append(text).append($('<span class=remove>').append('x')).appendTo('.chosen_payment_methods')
    console.log($('<span data="'+value+'">').append(text).append($('<span class=remove>').append('x')))

    $('<input name="profile_data[payment_method_ids][]" multiple="multiple" type="hidden" class="payment_method_id-'+value+'" value="'+value+'">').appendTo('.chosen_payment_methods')


  },
  remove_payment_method: function(e) {
    var slug = $(e.target).parent().attr('data')
    $('.payment_method_id-'+slug).remove()
    $(e.target).parent().remove()
  },

  set_payment_options: function() {
{'fraction_non_alphanumeric': 0.2049586776859504, 'fraction_numerical': 0.001652892561983471, 'mean_word_length': 4.993399339933993, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 12, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3869842', 'n_tokens_mistral': 602, 'n_tokens_neox': 590, 'n_words': 81}