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

- unless application_draft.team.coaches_confirmed?
  p.alert.alert-warning Please note: Not all of your coaches have confirmed their membership. You won't be able to submit your application unless they've all confirmed!

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>. Need #{link_to "help", page_path('help'), target: '_blank'}?

= simple_nested_form_for application_draft do |f|
  ul.nav.nav-tabs
    li.active
      - if application_draft.as_student?
        a role="tab" href="#student-one-tab" data-toggle="tab" = "About yourself #{student0_tab_errors(application_draft)}"
      - else
        a role="tab" href="#student-one-tab" data-toggle="tab" = "About your pair #{student0_tab_errors(application_draft)}"
    li
      - if application_draft.as_student?
        a role="tab" href="#student-two-tab" data-toggle="tab"  = "About your pair #{student1_tab_errors(application_draft)}"
      - else
        a role="tab" href="#student-two-tab" data-toggle="tab" = "About yourself #{student1_tab_errors(application_draft)}"
    li
      a role="tab" href="#project-tab" data-toggle="tab" = "About your project #{projects_tab_errors(application_draft)}"
    li
      a role="tab" href="#team-tab" data-toggle="tab" = "About your team #{team_tab_errors(application_draft)}"
    - if application_draft.draft?
      li
        a role="tab" href="#review-tab" data-toggle="tab" Review and Submit

  .tab-content
    #student-one-tab.tab-pane.active
      .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.
      fieldset
        = render 'student_fields', f: f, student: application_draft.students[0], index: 0, application_draft: f.object
      = render 'save_draft_button', f: f if application_draft.draft?

    #student-two-tab.tab-pane
      fieldset
        - 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], index: 1, application_draft: f.object
          = render 'save_draft_button', f: f if application_draft.draft?

    #project-tab.tab-pane
      .alert.alert-info
        strong Note:
        |  Please fill this information together as a team.

      h2 Your project choice
      = f.association :project1, collection: Project.accepted.order(:name), input_html: { disabled: !application_draft.as_student? || application_draft.applied? }
      = f.association :project2, collection: Project.accepted.order(:name), input_html: { disabled: !application_draft.as_student? || application_draft.applied?, allow_blank: true }, hint: "Note: this serves as your secondary choice in case we cannot select your team with your first project."

      h2 Your project goals

      = f.input :why_selected_project, label: 'Why did you select this project?', input_html: { rows: 4, disabled: !application_draft.as_student? || application_draft.applied? }
      = f.input :project_plan, label: 'Which features are you planning to work on?', hint: "Please describe some issues and features that you want to work on this summer.".html_safe, input_html: { rows: 6, disabled: !application_draft.as_student? || application_draft.applied? }

      = render 'save_draft_button', f: f if application_draft.draft?

    #team-tab.tab-pane
      .alert.alert-info
        strong Note:
        |  Please fill this information together as a team.

      h2 Working together
      = f.input :working_together, label: 'Since this is a self-guided program, how are you planning to work together?', input_html: { rows: 5, disabled: !application_draft.as_student? || application_draft.applied? }

      h2 Only to be filled if you can apply as a volunteer (non-sponsored) team
      p You can read up on volunteer teams in the #{link_to 'application guide', 'http://railsgirlssummerofcode.org/students/application/#volunteer-teams', target: :blank}.
      = f.input :voluntary, as: :boolean, hint: 'This will not exclude you from being in the running for a sponsored seat.', label: 'We could join the RGSoC as a voluntary team', input_html: { disabled: !application_draft.as_student? || application_draft.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 on the project?', hint: 'Please only enter a full number, e.g. 15', input_html: { disabled: !application_draft.as_student? || application_draft.applied? }

      h2 Miscellaneous
      = 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.applied? }
      = f.input :misc_info, as: :text, label: 'Anything else to add?', hint: 'Address anything that you feel is relevant to your application and was not covered previously.', input_html: { rows: 4, disabled: !application_draft.as_student? || application_draft.applied? }

      = render 'save_draft_button', f: f if application_draft.draft?

    #review-tab.tab-pane
      = render 'save_draft_button', f: f if application_draft.draft?

      - if application_draft.draft?
        - if application_draft.ready? && application_draft.as_student?
          .actions
            = link_to 'Apply', apply_application_draft_path(application_draft), class: 'btn btn-success', id: 'apply_application_draft', method: :put
            .hidden.unsaved_application_changes_notice.help-block
              p You have unsaved changes in your application form. Please save before applying.

        - elsif application_draft.persisted?
          .actions
            = link_to 'Check Validity',  [:check, application_draft], class: 'btn btn-info', id: 'verify_application_draft'
            .hidden.unsaved_application_changes_notice.help-block
              p You have unsaved changes in your application form. Please save before validating.

        - else
          Please save your application first.
<commit_msg>add hint about remote coaches or coaching companies to misc field in application form<commit_after>h1 Student Application for Rails Girls Summer of Code #{Season.current.name}

- unless application_draft.team.coaches_confirmed?
  p.alert.alert-warning Please note: Not all of your coaches have confirmed their membership. You won't be able to submit your application unless they've all confirmed!

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>. Need #{link_to "help", page_path('help'), target: '_blank'}?

= simple_nested_form_for application_draft do |f|
  ul.nav.nav-tabs
    li.active
      - if application_draft.as_student?
        a role="tab" href="#student-one-tab" data-toggle="tab" = "About yourself #{student0_tab_errors(application_draft)}"
      - else
        a role="tab" href="#student-one-tab" data-toggle="tab" = "About your pair #{student0_tab_errors(application_draft)}"
    li
      - if application_draft.as_student?
        a role="tab" href="#student-two-tab" data-toggle="tab"  = "About your pair #{student1_tab_errors(application_draft)}"
      - else
        a role="tab" href="#student-two-tab" data-toggle="tab" = "About yourself #{student1_tab_errors(application_draft)}"
    li
      a role="tab" href="#project-tab" data-toggle="tab" = "About your project #{projects_tab_errors(application_draft)}"
    li
      a role="tab" href="#team-tab" data-toggle="tab" = "About your team #{team_tab_errors(application_draft)}"
    - if application_draft.draft?
      li
        a role="tab" href="#review-tab" data-toggle="tab" Review and Submit

  .tab-content
    #student-one-tab.tab-pane.active
      .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.
      fieldset
        = render 'student_fields', f: f, student: application_draft.students[0], index: 0, application_draft: f.object
      = render 'save_draft_button', f: f if application_draft.draft?

    #student-two-tab.tab-pane
      fieldset
        - 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], index: 1, application_draft: f.object
          = render 'save_draft_button', f: f if application_draft.draft?

    #project-tab.tab-pane
      .alert.alert-info
        strong Note:
        |  Please fill this information together as a team.

      h2 Your project choice
      = f.association :project1, collection: Project.accepted.order(:name), input_html: { disabled: !application_draft.as_student? || application_draft.applied? }
      = f.association :project2, collection: Project.accepted.order(:name), input_html: { disabled: !application_draft.as_student? || application_draft.applied?, allow_blank: true }, hint: "Note: this serves as your secondary choice in case we cannot select your team with your first project."

      h2 Your project goals

      = f.input :why_selected_project, label: 'Why did you select this project?', input_html: { rows: 4, disabled: !application_draft.as_student? || application_draft.applied? }
      = f.input :project_plan, label: 'Which features are you planning to work on?', hint: "Please describe some issues and features that you want to work on this summer.".html_safe, input_html: { rows: 6, disabled: !application_draft.as_student? || application_draft.applied? }

      = render 'save_draft_button', f: f if application_draft.draft?

    #team-tab.tab-pane
      .alert.alert-info
        strong Note:
        |  Please fill this information together as a team.

      h2 Working together
      = f.input :working_together, label: 'Since this is a self-guided program, how are you planning to work together?', input_html: { rows: 5, disabled: !application_draft.as_student? || application_draft.applied? }

      h2 Only to be filled if you can apply as a volunteer (non-sponsored) team
      p You can read up on volunteer teams in the #{link_to 'application guide', 'http://railsgirlssummerofcode.org/students/application/#volunteer-teams', target: :blank}.
      = f.input :voluntary, as: :boolean, hint: 'This will not exclude you from being in the running for a sponsored seat.', label: 'We could join the RGSoC as a voluntary team', input_html: { disabled: !application_draft.as_student? || application_draft.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 on the project?', hint: 'Please only enter a full number, e.g. 15', input_html: { disabled: !application_draft.as_student? || application_draft.applied? }

      h2 Miscellaneous
      = 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.applied? }
      = f.input :misc_info, as: :text, label: 'Anything else to add?', hint: 'Address anything that you feel is relevant to your application and was not covered previously. For example: Do you have a coaching company? Do you have extra remote coaches on board? etc..', input_html: { rows: 4, disabled: !application_draft.as_student? || application_draft.applied? }

      = render 'save_draft_button', f: f if application_draft.draft?

    #review-tab.tab-pane
      = render 'save_draft_button', f: f if application_draft.draft?

      - if application_draft.draft?
        - if application_draft.ready? && application_draft.as_student?
          .actions
            = link_to 'Apply', apply_application_draft_path(application_draft), class: 'btn btn-success', id: 'apply_application_draft', method: :put
            .hidden.unsaved_application_changes_notice.help-block
              p You have unsaved changes in your application form. Please save before applying.

        - elsif application_draft.persisted?
          .actions
            = link_to 'Check Validity',  [:check, application_draft], class: 'btn btn-info', id: 'verify_application_draft'
            .hidden.unsaved_application_changes_notice.help-block
              p You have unsaved changes in your application form. Please save before validating.

        - else
          Please save your application first.

{'fraction_non_alphanumeric': 0.10463688008598188, 'fraction_numerical': 0.0036849378166743437, 'mean_word_length': 3.711392405063291, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '3860283', 'n_tokens_mistral': 3773, 'n_tokens_neox': 3655, 'n_words': 1192}