Enable CVoC managed-field for TEXTBOX type #11954
Merged
+7
−1
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
What this PR does / why we need it:
The external vocabulary mechanism adds data-cvoc-* attributes to metadata inputs that allow external JavaScripts to find/alter relevant metadata fields. The existing code that identifies 'managed' fields (e.g. for the author field, the name and ID type fields that are controlled a script running on the author identifier field) handles all of our input types except TEXTBOX. That's nominally due to the fact that the TEXTBOX dataset field type is the only one rendered as a textarea (p:inputTextarea in the xhtml).
This PR adds the data-cvoc-managed-field attribute to TEXTBOX fields.
The specific use case requiring this functionality is for work related to the GDCC ORCID grant that leverages author's ORCID Profile works to populate the related publication fields, including the publicationCitation field, which is a TEXTBOX type.
Which issue(s) this PR closes:
Special notes for your reviewer:
Suggestions on how to test this:
The simplest test would be to add the https://github.com/gdcc/dataverse-external-vocab-support/blob/PIDs/examples/config/demos/relatedPubs.json object to the overall :CVoCConf setting for a given instance and to then look in the browser console to confirm that the publicationCitation textarea has a data-cvoc-managed-field attribute.
Does this PR introduce a user interface change? If mockups are available, please link/include them here:
Is there a release notes update needed for this change?:
Additional documentation: