From 6231cb9ed6df1869ad489bcc094a1af6e28167d9 Mon Sep 17 00:00:00 2001 From: Hrafn Malmquist Date: Mon, 9 Dec 2024 09:56:54 +0000 Subject: [PATCH] Remove overly elaborate licenses prop --- .../semantic-ui/js/ic_data_repo/LimitedLicenseField.js | 6 +++--- .../semantic-ui/js/ic_data_repo/LimitedLicenseModal.js | 5 ----- 2 files changed, 3 insertions(+), 8 deletions(-) diff --git a/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseField.js b/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseField.js index 190dd90..9f01f04 100644 --- a/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseField.js +++ b/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseField.js @@ -99,7 +99,7 @@ class LicenseFieldForm extends Component { ); })} - @@ -111,9 +111,9 @@ class LicenseFieldForm extends Component { formikArrayPush(selectedLicense); }} action="add" - licenses={values.metadata.rights.length} serializeLicenses={serializeLicenses} - /> + />) + } ); diff --git a/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseModal.js b/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseModal.js index 0805e4c..90d39f8 100644 --- a/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseModal.js +++ b/site/ic_data_repo/assets/semantic-ui/js/ic_data_repo/LimitedLicenseModal.js @@ -67,7 +67,6 @@ export class LimitedLicenseModal extends Component { render() { const { - licenses, trigger, action, searchConfig, @@ -83,10 +82,6 @@ export class LimitedLicenseModal extends Component { link: "", }; - // Do not display the add button if a license has been selected - if(licenses) - return null; - const searchApi = new InvenioSearchApi(searchConfig.searchApi); return (