Skip to content

Commit

Permalink
deposit form: provide props to overridable components
Browse files Browse the repository at this point in the history
* some of the overridable components have been using values that weren't
  passed as props
  • Loading branch information
max-moser committed Aug 26, 2024
1 parent f7fcc1c commit cd4cd6d
Showing 1 changed file with 17 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,10 @@ export class RDMDepositForm extends Component {
/>
</Overridable>

<Overridable id="InvenioAppRdm.Deposit.CommunityHeader.container">
<Overridable
id="InvenioAppRdm.Deposit.CommunityHeader.container"
record={record}
>
{!this.hide_community_selection && (
<CommunityHeader
imagePlaceholderLink="/static/images/square-placeholder.png"
Expand Down Expand Up @@ -159,6 +162,8 @@ export class RDMDepositForm extends Component {
id="InvenioAppRdm.Deposit.FileUploader.container"
record={record}
config={this.config}
permissions={permissions}
filesLocked={filesLocked}
>
<FileUploader
isDraftRecord={!record.is_published}
Expand Down Expand Up @@ -578,6 +583,7 @@ export class RDMDepositForm extends Component {
{!_isEmpty(customFieldsUI) && (
<Overridable
id="InvenioAppRdm.Deposit.CustomFields.container"
record={record}
customFieldsUI={customFieldsUI}
>
<CustomFields
Expand All @@ -602,7 +608,12 @@ export class RDMDepositForm extends Component {
className="deposit-sidebar"
>
<Sticky context={this.sidebarRef} offset={20}>
<Overridable id="InvenioAppRdm.Deposit.CardDepositStatusBox.container">
<Overridable
id="InvenioAppRdm.Deposit.CardDepositStatusBox.container"
record={record}
permissions={permissions}
groupsEnabled={groupsEnabled}
>
<Card>
<Card.Content>
<DepositStatusBox />
Expand Down Expand Up @@ -645,6 +656,10 @@ export class RDMDepositForm extends Component {
<Overridable
id="InvenioAppRdm.Deposit.AccessRightField.container"
fieldPath="access"
record={record}
permissions={permissions}
recordRestrictionGracePeriod={recordRestrictionGracePeriod}
allowRecordRestriction={allowRecordRestriction}
>
<AccessRightField
label={i18next.t("Visibility")}
Expand Down

0 comments on commit cd4cd6d

Please sign in to comment.