Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

i84 - update visibility label and help text #961

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

ShanaLMoore
Copy link
Contributor

This was contributed back per PALNI PALCI. Since it's possible to override whatever setting the user selects at the form level, help text is provided. If the visibility is declared at the CSV level, the visibility selected at the form level will be ignored.

Issue:

BEFORE

image

AFTER

image

This was contributed back per PALNI PALCI. Since it's possible to override whatever setting the user selects at the form level, help text is provided. If the visibility is declared at the CSV level, the visibility selected at the form level will be ignored.

Issue:
- scientist-softserv/palni_palci_knapsack#84
@ShanaLMoore ShanaLMoore added the patch-ver for release notes label Jun 18, 2024
collection: [
['Public', 'open'],
['Private', 'restricted'],
['Institution', 'authenticated']
],
selected: importer.parser_fields['visibility'] || 'open',
input_html: { class: 'form-control' }
input_html: { class: 'form-control' },
hint: 'If your CSV includes the visibility field, it will override the default setting.'
Copy link
Contributor Author

@ShanaLMoore ShanaLMoore Jun 18, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a first pass, I implemented this following pre-existing bulkrax patterns, which doesn't seem to use locales or support translations.

ref: https://github.com/samvera/bulkrax/blob/main/app/views/bulkrax/importers/_csv_fields.html.erb#L23

I will time box my attempt at the translation way.

It seems doable with example,

  <%= fi.input :visibility,
    label: t('bulkrax.importer.labels.visibility'),
    collection: [
      ['Public', 'open'],
      ['Private', 'restricted'],
      ['Institution', 'authenticated']
    ],
    selected: importer.parser_fields['visibility'] || 'open',
    input_html: { class: 'form-control' },
    hint: t('bulkrax.importer.hints.visibility') 
  %>

but I will worry about translations at another time since nothing else on this form can be translated anyways.

@ShanaLMoore ShanaLMoore merged commit 42e594a into main Jun 18, 2024
6 of 7 checks passed
@ShanaLMoore ShanaLMoore deleted the i84-add-help-text-to-import-visibility branch June 18, 2024 16:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
patch-ver for release notes
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants