<commit_before>h1 Student Application for Rails Girls Summer of Code #{Season.current.name}

p.attention
  | Please read our
    #{link_to "Student Application Guide", "http://railsgirlssummerofcode.org/students/application/"}
    before you fill out this form. Applications must be submitted before <strong>#{l current_season.applications_close_at, format: :precise}</strong>.

= simple_nested_form_for application_draft do |f|
  - if application_draft.errors.any?
    #error_explanation
      h2 = "#{pluralize(application_draft.errors.count, "error")} to go before you can apply:"
      ul
        - application_draft.errors.full_messages.each do |message|
          li = message
  fieldset
    - if application_draft.as_student?
      legend About yourself
      .alert.alert-info 
        strong Info:
        |  You can edit the fields about you in #{link_to 'your user profile', edit_user_path(current_user, anchor: 'application_specific')}, too.
    - else
      legend Student 1
    = render 'student_fields', f: f, student: application_draft.students[0]
  fieldset
    - if application_draft.as_student?
      legend About your pair
    - else
      legend Student 2
    - if application_draft.students.count == 1
      .alert.alert-warning You haven't got a second student on your team.
    - else
      = render 'student_fields', f: f, student: application_draft.students[1]

  fieldset
    legend About the team
    -# = f.input :attended_rg_workshop, as: :text, label: 'Did you ever attend a Rails/Ruby workshop?', hint: ' Please give us a little bit of history about yourself and your pair (if any)', input_html: { rows: '5' }
    -# = f.input :skills, as: :text, label: 'Please give us a summary of your skills', hint: 'Please add a summary for your pair if you have one, too.', input_html: { rows: '5' }
    -# = f.input :learing_summary, as: :text, label: 'Please summarize what you have been doing to learn programming since your first workshop', hint: 'E.g. Study Group, learning rails by doing exercises etc. Please add a summary for your pair if you have one, too.', input_html: { rows: '5' }
    = f.input :project_name, as: :string, label: 'What project are you planning to work on?', placeholder: 'Project Name', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :project_url, as: :url, label: 'What project are you planning to work on?', placeholder: 'https://github.com/rails-girls-summer-of-code/projects/issues/NN', hint: "If the project you want to work on is not listed in #{link_to 'our repository', 'https://github.com/rails-girls-summer-of-code/projects/issues/', target: :blank} yet, ping the mentor to submit it.".html_safe, input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }

  fieldset
    legend Filled in by coach(es)
    -# = f.input :coaches, as: :text, label: 'Coach(es): Who is going to coach you?', hint: 'Please provide contact information. If you have a team of coaches please describe how they are going to team up/split work.', input_html: { rows: '5', disabled: !application_draft.as_coach? }
    = f.input :coaches_hours_per_week, label: 'Coach(es): How much time can your coaches put into (being available for) support, in total?', hint: 'Rough estimate, e.g. x hours per day', input_html: { disabled: !application_draft.as_coach? }
    = f.input :coaches_why_team_successful, label: 'Coach(es): Why do you think this team will be successful with their project?', input_html: { disabled: !application_draft.as_coach? }

  fieldset
    legend Miscellaneous
    -# = f.input :project_period, as: :text, label: 'When do you plan to work on this?', hint: 'We are aiming at July 1st to September 30th for most students, but you can be flexible. Please discuss this with your team.', input_html: { rows: '5' }
    = f.input :voluntary, as: :boolean, label: 'We could join the RGSoC as a voluntary team', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :voluntary_hours_per_week, as: :integer, label: 'As a voluntary team, how many hours per week would you be able to work in the project?', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :heard_about_it, as: :text, label: 'How have you heard about the program?', input_html: { rows: 3, disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :misc_info, as: :text, label: 'Anything else to add?', input_html: { rows: 4 }, hint: 'Address anything that you feel is relevant to your application and was not covered previously.', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }

  .actions
    = f.button :submit, 'Save as draft', class: 'btn'
    - unless application_draft.ready?
      .help-block Your application is not yet ready for submission

- if application_draft.ready?
  = simple_form_for application_draft, url: apply_application_path(application_draft.application), method: :put do |f|
    .actions
      = f.button :submit, 'Apply', class: 'btn btn-success'
- elsif application_draft.persisted?
  = simple_form_for application_draft, url: [:check, application_draft], method: :get do |f|
    .actions
      = f.button :submit, 'Check Validity', class: 'btn btn-info'<commit_msg>Hide actions when draft has been submitted<commit_after>h1 Student Application for Rails Girls Summer of Code #{Season.current.name}

p.attention
  | Please read our
    #{link_to "Student Application Guide", "http://railsgirlssummerofcode.org/students/application/"}
    before you fill out this form. Applications must be submitted before <strong>#{l current_season.applications_close_at, format: :precise}</strong>.

= simple_nested_form_for application_draft do |f|
  - if application_draft.errors.any?
    #error_explanation
      h2 = "#{pluralize(application_draft.errors.count, "error")} to go before you can apply:"
      ul
        - application_draft.errors.full_messages.each do |message|
          li = message
  fieldset
    - if application_draft.as_student?
      legend About yourself
      .alert.alert-info 
        strong Info:
        |  You can edit the fields about you in #{link_to 'your user profile', edit_user_path(current_user, anchor: 'application_specific')}, too.
    - else
      legend Student 1
    = render 'student_fields', f: f, student: application_draft.students[0]
  fieldset
    - if application_draft.as_student?
      legend About your pair
    - else
      legend Student 2
    - if application_draft.students.count == 1
      .alert.alert-warning You haven't got a second student on your team.
    - else
      = render 'student_fields', f: f, student: application_draft.students[1]

  fieldset
    legend About the team
    -# = f.input :attended_rg_workshop, as: :text, label: 'Did you ever attend a Rails/Ruby workshop?', hint: ' Please give us a little bit of history about yourself and your pair (if any)', input_html: { rows: '5' }
    -# = f.input :skills, as: :text, label: 'Please give us a summary of your skills', hint: 'Please add a summary for your pair if you have one, too.', input_html: { rows: '5' }
    -# = f.input :learing_summary, as: :text, label: 'Please summarize what you have been doing to learn programming since your first workshop', hint: 'E.g. Study Group, learning rails by doing exercises etc. Please add a summary for your pair if you have one, too.', input_html: { rows: '5' }
    = f.input :project_name, as: :string, label: 'What project are you planning to work on?', placeholder: 'Project Name', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :project_url, as: :url, label: 'What project are you planning to work on?', placeholder: 'https://github.com/rails-girls-summer-of-code/projects/issues/NN', hint: "If the project you want to work on is not listed in #{link_to 'our repository', 'https://github.com/rails-girls-summer-of-code/projects/issues/', target: :blank} yet, ping the mentor to submit it.".html_safe, input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }

  fieldset
    legend Filled in by coach(es)
    -# = f.input :coaches, as: :text, label: 'Coach(es): Who is going to coach you?', hint: 'Please provide contact information. If you have a team of coaches please describe how they are going to team up/split work.', input_html: { rows: '5', disabled: !application_draft.as_coach? }
    = f.input :coaches_hours_per_week, label: 'Coach(es): How much time can your coaches put into (being available for) support, in total?', hint: 'Rough estimate, e.g. x hours per day', input_html: { disabled: !application_draft.as_coach? }
    = f.input :coaches_why_team_successful, label: 'Coach(es): Why do you think this team will be successful with their project?', input_html: { disabled: !application_draft.as_coach? }

  fieldset
    legend Miscellaneous
    -# = f.input :project_period, as: :text, label: 'When do you plan to work on this?', hint: 'We are aiming at July 1st to September 30th for most students, but you can be flexible. Please discuss this with your team.', input_html: { rows: '5' }
    = f.input :voluntary, as: :boolean, label: 'We could join the RGSoC as a voluntary team', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :voluntary_hours_per_week, as: :integer, label: 'As a voluntary team, how many hours per week would you be able to work in the project?', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :heard_about_it, as: :text, label: 'How have you heard about the program?', input_html: { rows: 3, disabled: !application_draft.as_student? || application_draft.state.applied? }
    = f.input :misc_info, as: :text, label: 'Anything else to add?', input_html: { rows: 4 }, hint: 'Address anything that you feel is relevant to your application and was not covered previously.', input_html: { disabled: !application_draft.as_student? || application_draft.state.applied? }

  - if application_draft.state.draft?
    .actions
      = f.button :submit, 'Save as draft', class: 'btn'
      - unless application_draft.ready?
        .help-block Your application is not yet ready for submission

- if application_draft.state.draft?
  - if application_draft.ready?
    = simple_form_for application_draft, url: apply_application_path(application_draft.application), method: :put do |f|
      .actions
        = f.button :submit, 'Apply', class: 'btn btn-success'
  - elsif application_draft.persisted?
    = simple_form_for application_draft, url: [:check, application_draft], method: :get do |f|
      .actions
        = f.button :submit, 'Check Validity', class: 'btn btn-info'
{'fraction_non_alphanumeric': 0.10977512620468105, 'fraction_numerical': 0.0031206975676916016, 'mean_word_length': 4.084461035930938, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, 'https://': 4, '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': '7308845', 'n_tokens_mistral': 3288, 'n_tokens_neox': 3197, 'n_words': 1173}