<commit_before><%# locals: form, plan %>

<%
project_title_tooltip =  _('If applying for funding, state the name exactly as in the grant proposal.')
project_abstract_tooltip = _("Briefly summarise your research project to help others understand the purposes for which the data are being collected or created.")
id_tooltip = _('A unique number that a federal agency assigns to a grant announcement.')
ethics_tooltip = _("Whether there are any potential ethical issues related to data that this DMP describes")
ethics_description_tooltip = _("Description of the ethical issues")
ethics_report_tooltip = _("Link to a protocol from a meeting with an ethics commitee")
%>

<div class="form-group"><!-- title -->
  <div class="col-md-12">
    <%= form.label(:title, _('Project title'), class: 'control-label') %>
  </div>
  <div class="col-md-8">
    <em class="sr-only"><%= project_title_tooltip %></em>
    <%= form.text_field(:title, class: "form-control", "aria-required": true,
                                'data-toggle': 'tooltip', spellcheck: true,
                                title: project_title_tooltip) %>
  </div>
  <div class="col-md-8">
    <div class="checkbox">
      <%= form.hidden_field :visibility %>
      <%= form.label(:is_test, class: 'control-label') do %>
        <%= check_box_tag(:is_test, 1, plan.is_test?, "aria-label": "is_test") %>
        <%= _('mock project for testing, practice, or educational purposes') %>
      <% end %>
    </div>
  </div>
</div>

<div class="form-group"><!-- description -->
  <div class="col-md-12">
    <%= form.label(:description, _('Project abstract'), class: 'control-label') %>
  </div>
  <div class="col-md-8" data-toggle="tooltip" title="<%= project_abstract_tooltip %>">
    <em class="sr-only"><%= project_abstract_tooltip %></em>
    <%= form.text_area :description, rows: 6, class: 'form-control tinymce',
                                     "aria-required": false %>
  </div>
</div>

<div class="form-group">
  <div class="col-md-12">
    <%= form.label(:fos_id, _("Research domain"), class: "control-label") %>
  </div>
  <div class="col-md-8">
    <% fos_categories = FieldOfScience.all.order(:label).map { |fos| [fos.label, fos.id] } %>
    <%= form.select :fos_id, options_for_select(fos_categories, form.object.fos_id),
                             { include_blank: _("- Please select one -"), selected: form.object.fos_id },
                             { class: "form-control" } %>
  </div>
</div>

<div class="form-group"><!-- start / end dates -->
  <div class="col-md-4">
    <%= form.label(:start_date, _("Project Start"), class: "control-label") %>
    <%= form.date_field :start_date, class: "form-control",
                                     data: { toggle: "tooltip" },
                                     title: _("The estimated date on which you will begin this project.") %>
  </div>
  <div class="col-md-4">
    <%= form.label(:end_date, _("Project End"), class: "control-label") %>
    <%= form.date_field :end_date, class: "form-control",
                                   data: { toggle: "tooltip" },
                                   title: _("The estimated date on which you will complete this project.") %>
  </div>
</div>

<%# if DOI minting is enabled %>
<% landing_page = plan.landing_page %>
<% if Rails.configuration.x.dmproadmap.doi_minting && landing_page.present? %>
  <div class="form-group"><!-- identifier -->
    <div class="col-md-12">
      <%= form.label(:doi, _('Landing page'), class: 'control-label') %>
    </div>
    <div class="col-md-8">
      <% if landing_page.value.starts_with?("http") %>
        <%= link_to landing_page.value, landing_page.value %>
      <% else %>
        <%= landing_page.value %>
      <% end %>
    </div>
  </div>
<% end %>

<% if form.object.related_identifiers.any? %>
  <div class="form-group">
    <div class="col-md-12">
      <%= form.label(:identifier, _('Related identifiers'), class: 'control-label') %>
    </div>
    <div class="col-md-8">
      <ul>
        <% form.object.related_identifiers.each do |id| %>
          <li>
            <%= id.relation_type %> - <%= link_to id.value, id.value, target: "_blank",
                                                  class: "has-new-window-popup-info" %>
          </li>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>

<conditional>
  <div class="form-group">
    <div class="col-md-8">
      <div class="checkbox">
        <%= form.label(:ethical_issues, class: 'control-label', title: ethics_tooltip) do %>
          <%= form.check_box(:ethical_issues) %>
          <%= _('Research outputs may have ethical concerns') %>
        <% end %>
      </div>
    </div>
  </div>
  <div class="form-group toggleable-field">
    <div class="col-md-12">
      <%= form.label(:ethical_issues_description, _('Describe any ethical concerns'), class: 'control-label') %>
    </div>
    <div class="col-md-8" data-toggle="tooltip" title="<%= ethics_description_tooltip %>">
      <em class="sr-only"><%= ethics_description_tooltip %></em>
      <%= form.text_area :ethical_issues_description, rows: 6, class: 'form-control tinymce',
                                      "aria-required": false %>
    </div>
  </div>
  <div class="form-group toggleable-field">
    <div class="col-md-12">
      <%= form.label(:ethical_issues_report, _('Ethical protocols'), class: 'control-label') %>
    </div>
    <div class="col-md-8">
      <em class="sr-only"><%= ethics_report_tooltip %></em>
      <%= form.url_field(:ethical_issues_report, class: "form-control", "aria-required": false,
                                  'data-toggle': 'tooltip',
                                  title: ethics_report_tooltip) %>
    </div>
  </div>
</conditional>

<conditional>
  <div id="funder-org-controls" class="form-group">
    <div class="col-md-8">
      <%= fields_for :funder, plan.funder do |funder_fields| %>
        <%= render partial: "shared/org_selectors/combined",
            locals: {
              form: form,
              funder_only: true,
              label: _("Funder"),
              default_org: plan.funder,
              required: false
            } %>
      <% end %>
    </div>
  </div>

  <div class="form-group toggleable-field">
    <div class="col-md-12">
      <%= form.label(:funding_status, _("Research domain"), class: "control-label") %>
    </div>
    <div class="col-md-8">
      <% funding_statuses = Plan.funding_statuses.map { |status| [status[0].capitalize, status[0]] } %>
      <%= form.select :funding_status, options_for_select(funding_statuses, form.object.funding_status),
                                      {<commit_msg>fixed label of Funding Status<commit_after><%# locals: form, plan %>

<%
project_title_tooltip =  _('If applying for funding, state the name exactly as in the grant proposal.')
project_abstract_tooltip = _("Briefly summarise your research project to help others understand the purposes for which the data are being collected or created.")
id_tooltip = _('A unique number that a federal agency assigns to a grant announcement.')
ethics_tooltip = _("Whether there are any potential ethical issues related to data that this DMP describes")
ethics_description_tooltip = _("Description of the ethical issues")
ethics_report_tooltip = _("Link to a protocol from a meeting with an ethics commitee")
%>

<div class="form-group"><!-- title -->
  <div class="col-md-12">
    <%= form.label(:title, _('Project title'), class: 'control-label') %>
  </div>
  <div class="col-md-8">
    <em class="sr-only"><%= project_title_tooltip %></em>
    <%= form.text_field(:title, class: "form-control", "aria-required": true,
                                'data-toggle': 'tooltip', spellcheck: true,
                                title: project_title_tooltip) %>
  </div>
  <div class="col-md-8">
    <div class="checkbox">
      <%= form.hidden_field :visibility %>
      <%= form.label(:is_test, class: 'control-label') do %>
        <%= check_box_tag(:is_test, 1, plan.is_test?, "aria-label": "is_test") %>
        <%= _('mock project for testing, practice, or educational purposes') %>
      <% end %>
    </div>
  </div>
</div>

<div class="form-group"><!-- description -->
  <div class="col-md-12">
    <%= form.label(:description, _('Project abstract'), class: 'control-label') %>
  </div>
  <div class="col-md-8" data-toggle="tooltip" title="<%= project_abstract_tooltip %>">
    <em class="sr-only"><%= project_abstract_tooltip %></em>
    <%= form.text_area :description, rows: 6, class: 'form-control tinymce',
                                     "aria-required": false %>
  </div>
</div>

<div class="form-group">
  <div class="col-md-12">
    <%= form.label(:fos_id, _("Research domain"), class: "control-label") %>
  </div>
  <div class="col-md-8">
    <% fos_categories = FieldOfScience.all.order(:label).map { |fos| [fos.label, fos.id] } %>
    <%= form.select :fos_id, options_for_select(fos_categories, form.object.fos_id),
                             { include_blank: _("- Please select one -"), selected: form.object.fos_id },
                             { class: "form-control" } %>
  </div>
</div>

<div class="form-group"><!-- start / end dates -->
  <div class="col-md-4">
    <%= form.label(:start_date, _("Project Start"), class: "control-label") %>
    <%= form.date_field :start_date, class: "form-control",
                                     data: { toggle: "tooltip" },
                                     title: _("The estimated date on which you will begin this project.") %>
  </div>
  <div class="col-md-4">
    <%= form.label(:end_date, _("Project End"), class: "control-label") %>
    <%= form.date_field :end_date, class: "form-control",
                                   data: { toggle: "tooltip" },
                                   title: _("The estimated date on which you will complete this project.") %>
  </div>
</div>

<%# if DOI minting is enabled %>
<% landing_page = plan.landing_page %>
<% if Rails.configuration.x.dmproadmap.doi_minting && landing_page.present? %>
  <div class="form-group"><!-- identifier -->
    <div class="col-md-12">
      <%= form.label(:doi, _('Landing page'), class: 'control-label') %>
    </div>
    <div class="col-md-8">
      <% if landing_page.value.starts_with?("http") %>
        <%= link_to landing_page.value, landing_page.value %>
      <% else %>
        <%= landing_page.value %>
      <% end %>
    </div>
  </div>
<% end %>

<% if form.object.related_identifiers.any? %>
  <div class="form-group">
    <div class="col-md-12">
      <%= form.label(:identifier, _('Related identifiers'), class: 'control-label') %>
    </div>
    <div class="col-md-8">
      <ul>
        <% form.object.related_identifiers.each do |id| %>
          <li>
            <%= id.relation_type %> - <%= link_to id.value, id.value, target: "_blank",
                                                  class: "has-new-window-popup-info" %>
          </li>
        <% end %>
      </ul>
    </div>
  </div>
<% end %>

<conditional>
  <div class="form-group">
    <div class="col-md-8">
      <div class="checkbox">
        <%= form.label(:ethical_issues, class: 'control-label', title: ethics_tooltip) do %>
          <%= form.check_box(:ethical_issues) %>
          <%= _('Research outputs may have ethical concerns') %>
        <% end %>
      </div>
    </div>
  </div>
  <div class="form-group toggleable-field">
    <div class="col-md-12">
      <%= form.label(:ethical_issues_description, _('Describe any ethical concerns'), class: 'control-label') %>
    </div>
    <div class="col-md-8" data-toggle="tooltip" title="<%= ethics_description_tooltip %>">
      <em class="sr-only"><%= ethics_description_tooltip %></em>
      <%= form.text_area :ethical_issues_description, rows: 6, class: 'form-control tinymce',
                                      "aria-required": false %>
    </div>
  </div>
  <div class="form-group toggleable-field">
    <div class="col-md-12">
      <%= form.label(:ethical_issues_report, _('Ethical protocols'), class: 'control-label') %>
    </div>
    <div class="col-md-8">
      <em class="sr-only"><%= ethics_report_tooltip %></em>
      <%= form.url_field(:ethical_issues_report, class: "form-control", "aria-required": false,
                                  'data-toggle': 'tooltip',
                                  title: ethics_report_tooltip) %>
    </div>
  </div>
</conditional>

<conditional>
  <div id="funder-org-controls" class="form-group">
    <div class="col-md-8">
      <%= fields_for :funder, plan.funder do |funder_fields| %>
        <%= render partial: "shared/org_selectors/combined",
            locals: {
              form: form,
              funder_only: true,
              label: _("Funder"),
              default_org: plan.funder,
              required: false
            } %>
      <% end %>
    </div>
  </div>

  <div class="form-group toggleable-field">
    <div class="col-md-12">
      <%= form.label(:funding_status, _("Funding status"), class: "control-label") %>
    </div>
    <div class="col-md-8">
      <% funding_statuses = Plan.funding_statuses.map { |status| [status[0].capitalize, status[0]] } %>
      <%= form.select :funding_status, options_for_select(funding_statuses, form.object.funding_status),
                                      {
{'fraction_non_alphanumeric': 0.17561998951075147, 'fraction_numerical': 0.005094777852700982, 'mean_word_length': 2.5246897280169, 'pattern_counts': {'":': 10, '<': 283, '<?xml version=': 0, '>': 281, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 22, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '669070', 'n_tokens_mistral': 4419, 'n_tokens_neox': 4108, 'n_words': 932}