Skip to content

Commit

Permalink
Merge branch 'master' into UIIN-3223
Browse files Browse the repository at this point in the history
  • Loading branch information
OleksandrHladchenko1 authored Feb 28, 2025
2 parents 7005366 + 85cd1f9 commit a77ad95
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 10 deletions.
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
* Adapt settings options for using number gernerator. Refs UIIN-2556.
* Hide version history icon and settings if audit log feature is disabled. Refs UIIN-3231.
* Provide ids _and `length` param_ when retrieving job profiles. Refs UIIN-3257.
* Move ‘Set for deletion’ checkbox field to 4th space in top row of Instance Edit view. Refs UIIN-3259.
* Update Inventory: Set records for deletion permission's effect on ‘Set for deletion’ checkbox in Instance Edit view. Refs UIIN-3260.
* *BREAKING* Migrate stripes dependencies to their Sunflower versions. Refs UIIN-3223.
* *BREAKING* Migrate `react-intl` to v7. Refs UIIN-3224.

Expand Down
22 changes: 12 additions & 10 deletions src/edit/InstanceForm.js
Original file line number Diff line number Diff line change
Expand Up @@ -198,6 +198,7 @@ class InstanceForm extends React.Component {
connect: PropTypes.func.isRequired,
locale: PropTypes.string.isRequired,
logger: PropTypes.object.isRequired,
hasPerm: PropTypes.func.isRequired,
}).isRequired,
resources: PropTypes.shape({
instanceBlockedFields: PropTypes.shape({
Expand Down Expand Up @@ -536,16 +537,6 @@ class InstanceForm extends React.Component {
<this.cViewMetaData metadata={initialValues.metadata} />
}
<Row>
<Col sm={3}>
<Field
label={<FormattedMessage id="ui-inventory.setForDeletion" />}
name="deleted"
component={Checkbox}
type="checkbox"
disabled={this.isFieldBlocked('deleted')}
onChange={() => this.onSetForDeletionFieldChange()}
/>
</Col>
<Col sm={3}>
<Field
label={<FormattedMessage id="ui-inventory.discoverySuppress" />}
Expand Down Expand Up @@ -576,6 +567,17 @@ class InstanceForm extends React.Component {
disabled={this.isFieldBlocked('previouslyHeld')}
/>
</Col>
<Col sm={3}>
<Field
label={<FormattedMessage id="ui-inventory.setForDeletion" />}
name="deleted"
component={Checkbox}
type="checkbox"
disabled={this.isFieldBlocked('deleted')
|| !this.props.stripes.hasPerm('ui-inventory.instance.set-records-for-deletion.execute')}
onChange={() => this.onSetForDeletionFieldChange()}
/>
</Col>
</Row>
<br />
<Row>
Expand Down

0 comments on commit a77ad95

Please sign in to comment.