<commit_before>= simple_form_for @goal do |f|
  - if current_user.admin?
    = f.association :category, include_blank: false
  = f.input :title, input_html: { size: 50 }
  = f.input :description, input_html: { rows: 7, cols: 37 }

  -# At least one motivation needed
  = f.simple_fields_for :motivations, @goal.motivations.build do |m|
    %p ----------------------------------------------------
    = m.input :title, required: true, label: 'Motivation title', input_html: { size: 50 }
    = m.input :description, required: true, label: 'Motivation description', |
    input_html: { rows: 7, cols: 37 }
    = m.input :source, required: true, label: 'Motivation source', input_html: { size: 50 }
    %p ----------------------------------------------------

  = f.simple_fields_for :motivations do |m|
    %p ----------------------------------------------------
    = m.input :title, required: false, label: 'Motivation title', input_html: { size: 50 }
    = m.input :description, required: false, label: 'Motivation description', |
    input_html: { rows: 7, cols: 37 }
    = m.input :source, required: false, label: 'Motivation source', input_html: { size: 50 }
    %p ----------------------------------------------------

  = f.input :shared, label: 'Check to share in <Shared> category'

  = f.button :submit
<commit_msg>More human friend form in goals/new.<commit_after>= simple_form_for @goal do |f|
  - if current_user.admin?
    = f.association :category, include_blank: false
  = f.input :title, input_html: { size: 50 }
  = f.input :description, input_html: { rows: 7, cols: 37 }

  -# At least one motivation needed

  = f.simple_fields_for :motivations, @goal.motivations.build do |m|
    %p ----------------------------------------------------
    = m.input :title, required: true, label: 'Motivation title', input_html: { size: 50 }
    = m.input :description, required: true, label: 'Motivation description', |
    input_html: { rows: 7, cols: 37 }
    = m.input :source, required: true, label: 'Motivation source', input_html: { size: 50 }
    %p ----------------------------------------------------

  = link_to "Add more motivations", '#', id: 'show-other-motivations'
  #other-motivations{style: 'display: none;'}
    = f.simple_fields_for :motivations do |m|
      %p ----------------------------------------------------
      = m.input :title, required: false, label: 'Motivation title', input_html: { size: 50 }
      = m.input :description, required: false, label: 'Motivation description', |
      input_html: { rows: 7, cols: 37 }
      = m.input :source, required: false, label: 'Motivation source', input_html: { size: 50 }
      %p ----------------------------------------------------
  = f.input :shared, label: 'Check to share in <Shared> category'
  = f.button :submit

:javascript
  $(function() {
    $('#show-other-motivations').click(function () {
      $("#other-motivations").toggle();
      $('#show-other-motivations').toggle();
    })
  })



{'fraction_non_alphanumeric': 0.26711409395973157, 'fraction_numerical': 0.012751677852348993, 'mean_word_length': 2.0233265720081137, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 5, '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': '339222', 'n_tokens_mistral': 939, 'n_tokens_neox': 865, 'n_words': 251}