<commit_before><%#
Copyright 2011-2018, The Trustees of Indiana University and Northwestern
  University.  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
  specific language governing permissions and limitations under the License.
---  END LICENSE_HEADER BLOCK  ---
%>
<div id="resource_description_content">
<p><%= t(:required_field_html) %></p>
<%= form_for @media_object, html: { class: 'form-vertical' } do |form| %>
  <%= hidden_field_tag :step, @active_step %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :bibliographic_id,
                      options: {display_label: 'Bibliographic ID',
                                primary_hash_key: :id,
                                secondary_hash_key: :source,
                                dropdown_field: :bibliographic_id_label,
                                dropdown_options: ModsDocument::IDENTIFIER_TYPES,
                                extra_classes: Avalon::BibRetriever.configured? ? 'import-button' : nil}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :title,
                      options: {label_parenthesis: t('metadata_parenthesis.title'),
                                required: true}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :creator,
                      options: {display_label: t('metadata_label.creator'),
                                label_parenthesis: t('metadata_parenthesis.creator'),
                                required: true,
                                multivalued: true}} %>

  <%= render partial: 'license_form_field', locals: { form: form } %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :topical_subject,
                      options: {display_label: t('metadata_label.topical_subject'),
                                label_parenthesis: t('metadata_parenthesis.topical_subject'),
                                required: true,
                                multivalued: true}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :genre,
                      options: {display_label: t('metadata_label.genre'),
                                label_parenthesis: t('metadata_parenthesis.genre'),
                                multivalued: true,
                                autocomplete_model: 'genreTerm',
                                autocomplete_validate: false,
                                required: true}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :language,
                      options: {multivalued: true,
                                autocomplete_model: 'languageTerm',
                                autocomplete_validate: false,
                                autocomplete_display_key: :text,
                                required: true,
                                autocomplete_id_key: :code}} %>

  <%= render partial: 'text_field',
             locals: { form: form, field: :date_issued,
                       options: { display_label: t('metadata_label.date_issued'),
                                  label_parenthesis: t('metadata_parenthesis.date_issued'),
                                  required: true } } %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :date_created,
                     options: {display_label: t('metadata_label.date_created'),
                               label_parenthesis: t('metadata_parenthesis.date_created')}} %>

  <%= render partial: 'text_area',
             locals: {form: form, field: :abstract,
                      options: {display_label: 'Summary'}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :contributor,
                      options: {multivalued: true,
                                display_label: t('metadata_label.contributor'),
                                label_parenthesis: t('metadata_parenthesis.contributor')}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :publisher,
                      options: {multivalued: true,
                                display_label: t('metadata_label.publisher'),
                                label_parenthesis: t('metadata_parenthesis.publisher')}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :physical_description,
                      options: {multivalued: true,
                                display_label: t('metadata_label.physical_description'),
                                label_parenthesis:
                                  t('metadata_parenthesis.physical_description')}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :related_item_url,
                      options: {display_label: t('metadata_label.related_item_url'),
                                label_parenthesis:
                                  t('metadata_parenthesis.related_item_url'),
                                multivalued: true,
                                primary_label: t('metadata_label.related_item_url_url'),
                                primary_key: :url,
                                secondary_label: t('metadata_label.related_item_url_label'),
                                secondary_key: :label,
                                secondary_field: :related_item_label}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :temporal_subject,
                      options: {display_label: 'Time period(s)', multivalued: true}} %>
  <%= render partial: 'text_field',
             locals: {form: form, field: :geographic_subject,
                      options: {display_label: 'Location(s)', multivalued: true}} %>
  <%= render partial: 'text_field',
             locals: {form: form, field: :permalink,
                      options: {}} %>
  <%= render partial: 'text_field',
             locals: {form: form, field: :other_identifier,
                      options: {display_label: 'Other Identifier(s)',
                                multivalued: true,
                                primary_hash_key: :id,
                                secondary_hash_key: :source,
                                dropdown_field: :other_identifier_type,
                                dropdown_options: ModsDocument::IDENTIFIER_TYPES}} %>

  <%= render partial: 'text_area',
             locals: {form: form, field: :table_of_contents,
                      options: {multivalued: true,
                                display_label: t('metadata_label.table_of_contents'),
                                label_parenthesis:
                                  t('metadata_parenthesis.table_of_contents') }} %>
  <%= render partial: 'text_area',
             locals: {form: form, field: :note,
                      options: {multivalued: true,
                                display_label: 'Note(s)',
                                primary_hash_key: :note,
                                secondary_hash_key: :type,
                                dropdown_field: :note_type,
                                dropdown_options: ModsDocument::NOTE_TYPES }} %>

  <div class="form-group">
    <label for="agreement_checkbox">
      <input id="agreement_checkbox" type="checkbox" checked="false" name="deposit_agreement" />
      I have read and do agree to the
      <a target="_blank" href="https://era.library.ualberta.ca/agreement/">
        University of Alberta ERA Audio + Video Deposit and Distribution Agreement.
      </a>
    </label>
  </div>

  <%= render 'workflow_buttons' %>
<% end %>
</div>
<commit_msg>remove ability to import by bibliographic id (#398)<commit_after><%#
Copyright 2011-2018, The Trustees of Indiana University and Northwestern
  University.  Licensed under the Apache License, Version 2.0 (the "License");
  you may not use this file except in compliance with the License.

You may obtain a copy of the License at

http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software distributed
  under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR
  CONDITIONS OF ANY KIND, either express or implied. See the License for the
  specific language governing permissions and limitations under the License.
---  END LICENSE_HEADER BLOCK  ---
%>
<div id="resource_description_content">
<p><%= t(:required_field_html) %></p>
<%= form_for @media_object, html: { class: 'form-vertical' } do |form| %>
  <%= hidden_field_tag :step, @active_step %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :title,
                      options: {label_parenthesis: t('metadata_parenthesis.title'),
                                required: true}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :creator,
                      options: {display_label: t('metadata_label.creator'),
                                label_parenthesis: t('metadata_parenthesis.creator'),
                                required: true,
                                multivalued: true}} %>

  <%= render partial: 'license_form_field', locals: { form: form } %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :topical_subject,
                      options: {display_label: t('metadata_label.topical_subject'),
                                label_parenthesis: t('metadata_parenthesis.topical_subject'),
                                required: true,
                                multivalued: true}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :genre,
                      options: {display_label: t('metadata_label.genre'),
                                label_parenthesis: t('metadata_parenthesis.genre'),
                                multivalued: true,
                                autocomplete_model: 'genreTerm',
                                autocomplete_validate: false,
                                required: true}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :language,
                      options: {multivalued: true,
                                autocomplete_model: 'languageTerm',
                                autocomplete_validate: false,
                                autocomplete_display_key: :text,
                                required: true,
                                autocomplete_id_key: :code}} %>

  <%= render partial: 'text_field',
             locals: { form: form, field: :date_issued,
                       options: { display_label: t('metadata_label.date_issued'),
                                  label_parenthesis: t('metadata_parenthesis.date_issued'),
                                  required: true } } %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :date_created,
                     options: {display_label: t('metadata_label.date_created'),
                               label_parenthesis: t('metadata_parenthesis.date_created')}} %>

  <%= render partial: 'text_area',
             locals: {form: form, field: :abstract,
                      options: {display_label: 'Summary'}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :contributor,
                      options: {multivalued: true,
                                display_label: t('metadata_label.contributor'),
                                label_parenthesis: t('metadata_parenthesis.contributor')}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :publisher,
                      options: {multivalued: true,
                                display_label: t('metadata_label.publisher'),
                                label_parenthesis: t('metadata_parenthesis.publisher')}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :physical_description,
                      options: {multivalued: true,
                                display_label: t('metadata_label.physical_description'),
                                label_parenthesis:
                                  t('metadata_parenthesis.physical_description')}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :related_item_url,
                      options: {display_label: t('metadata_label.related_item_url'),
                                label_parenthesis:
                                  t('metadata_parenthesis.related_item_url'),
                                multivalued: true,
                                primary_label: t('metadata_label.related_item_url_url'),
                                primary_key: :url,
                                secondary_label: t('metadata_label.related_item_url_label'),
                                secondary_key: :label,
                                secondary_field: :related_item_label}} %>

  <%= render partial: 'text_field',
             locals: {form: form, field: :temporal_subject,
                      options: {display_label: 'Time period(s)', multivalued: true}} %>
  <%= render partial: 'text_field',
             locals: {form: form, field: :geographic_subject,
                      options: {display_label: 'Location(s)', multivalued: true}} %>
  <%= render partial: 'text_field',
             locals: {form: form, field: :permalink,
                      options: {}} %>
  <%= render partial: 'text_field',
             locals: {form: form, field: :other_identifier,
                      options: {display_label: 'Other Identifier(s)',
                                multivalued: true,
                                primary_hash_key: :id,
                                secondary_hash_key: :source,
                                dropdown_field: :other_identifier_type,
                                dropdown_options: ModsDocument::IDENTIFIER_TYPES}} %>

  <%= render partial: 'text_area',
             locals: {form: form, field: :table_of_contents,
                      options: {multivalued: true,
                                display_label: t('metadata_label.table_of_contents'),
                                label_parenthesis:
                                  t('metadata_parenthesis.table_of_contents') }} %>
  <%= render partial: 'text_area',
             locals: {form: form, field: :note,
                      options: {multivalued: true,
                                display_label: 'Note(s)',
                                primary_hash_key: :note,
                                secondary_hash_key: :type,
                                dropdown_field: :note_type,
                                dropdown_options: ModsDocument::NOTE_TYPES }} %>

  <div class="form-group">
    <label for="agreement_checkbox">
      <input id="agreement_checkbox" type="checkbox" checked="false" name="deposit_agreement" />
      I have read and do agree to the
      <a target="_blank" href="https://era.library.ualberta.ca/agreement/">
        University of Alberta ERA Audio + Video Deposit and Distribution Agreement.
      </a>
    </label>
  </div>

  <%= render 'workflow_buttons' %>
<% end %>
</div>

{'fraction_non_alphanumeric': 0.10345707360632733, 'fraction_numerical': 0.001722158438576349, 'mean_word_length': 1.6351260504201681, 'pattern_counts': {'":': 0, '<': 76, '<?xml version=': 0, '>': 76, 'https://': 2, 'lorem ipsum': 0, 'www.': 2, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 10, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1082531', 'n_tokens_mistral': 4114, 'n_tokens_neox': 3801, 'n_words': 915}