webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js in katello-3.11.2 vs webpack/scenes/Subscriptions/Manifest/ManageManifestModal.js in katello-3.12.0.rc1

- old
+ new

@@ -1,14 +1,13 @@ import React, { Component } from 'react'; import PropTypes from 'prop-types'; import { Col, Tabs, Tab, Form, FormGroup, FormControl, ControlLabel } from 'react-bootstrap'; -import { Button, Icon, Modal, Spinner, OverlayTrigger, Tooltip } from 'patternfly-react'; +import { Button, Icon, Modal, Spinner, OverlayTrigger, Tooltip, MessageDialog } from 'patternfly-react'; import { isEqual } from 'lodash'; -import TooltipButton from 'react-bootstrap-tooltip-button'; +import TooltipButton from '../../../move_to_pf/TooltipButton'; import { LoadingState } from '../../../move_to_pf/LoadingState'; import { Table } from '../../../move_to_foreman/components/common/table'; -import ConfirmDialog from '../../../move_to_foreman/components/common/ConfirmDialog'; import { manifestExists } from '../SubscriptionHelpers'; import { columns } from './ManifestHistoryTableSchema'; import DeleteManifestModalText from './DeleteManifestModalText'; class ManageManifestModal extends Component { @@ -168,12 +167,12 @@ </Col> <Col sm={9}> <FormControl id="cdnUrl" type="text" - value={this.state.redhat_repository_url || organization.redhat_repository_url || ''} - onChange={this.updateRepositoryUrl} + defaultValue={this.state.redhat_repository_url || organization.redhat_repository_url || ''} + onBlur={this.updateRepositoryUrl} /> </Col> </FormGroup> <FormGroup> <Col smOffset={3} sm={3}> @@ -244,20 +243,28 @@ tooltipText={this.disabledTooltipText()} tooltipPlacement="top" /> - <ConfirmDialog + <MessageDialog show={this.state.showDeleteManifestModalDialog} title={__('Confirm delete manifest')} - dangerouslySetInnerHTML={{ + secondaryContent={ + // eslint-disable-next-line react/no-danger + <p dangerouslySetInnerHTML={{ __html: DeleteManifestModalText, - }} - confirmLabel={__('Delete')} - confirmStyle="danger" - onConfirm={() => this.deleteManifest()} - onCancel={() => this.showDeleteManifestModal(false)} + }} + /> + } + primaryActionButtonContent={__('Delete')} + primaryActionButtonBsStyle="danger" + primaryAction={() => this.deleteManifest()} + secondaryActionButtonContent={__('Cancel')} + secondaryAction={() => this.showDeleteManifestModal(false)} + onHide={() => this.showDeleteManifestModal(false)} + accessibleName="deleteConfirmationDialog" + accessibleDescription="deleteConfirmationDialogContent" /> </Col> </FormGroup> </Form> </Tab> @@ -295,14 +302,12 @@ saveOrganization: PropTypes.func.isRequired, taskInProgress: PropTypes.bool.isRequired, manifestHistory: PropTypes.shape({}).isRequired, showModal: PropTypes.bool.isRequired, onClose: PropTypes.func, - taskDetails: PropTypes.shape({}), }; ManageManifestModal.defaultProps = { - taskDetails: undefined, disableManifestActions: false, disabledReason: '', onClose() {}, };