Sha256: d2af5186ae135a2d40b6fc1b60b2de590725d1e2ce1d3070e58a168b9439e6f1
Contents?: true
Size: 1.63 KB
Versions: 6
Compression:
Stored size: 1.63 KB
Contents
import React from 'react'; import PropTypes from 'prop-types'; import { MessageDialog } from 'patternfly-react'; import { sprintf } from 'foremanReact/common/I18n'; const DeleteDialog = ({ show, selectedRows, onDeleteSubscriptions, onSubscriptionDeleteModalClose, }) => ( <MessageDialog show={show} title={__('Confirm Deletion')} secondaryContent={ // eslint-disable-next-line react/no-danger <p dangerouslySetInnerHTML={{ __html: sprintf( __(`Are you sure you want to delete %(entitlementCount)s subscription(s)? This action will remove the subscription(s) and refresh your manifest. All systems using these subscription(s) will lose them and also may lose access to updates and Errata.`), { entitlementCount: `<b>${selectedRows.length}</b>`, }, ), }} /> } primaryActionButtonContent={__('Delete')} primaryAction={() => onDeleteSubscriptions(selectedRows)} primaryActionButtonBsStyle="danger" secondaryActionButtonContent={__('Cancel')} secondaryAction={onSubscriptionDeleteModalClose} onHide={onSubscriptionDeleteModalClose} accessibleName="deleteConfirmationDialog" accessibleDescription="deleteConfirmationDialogContent" />); DeleteDialog.propTypes = { show: PropTypes.bool.isRequired, selectedRows: PropTypes.arrayOf(PropTypes.oneOfType([ PropTypes.string, PropTypes.number, ])).isRequired, onDeleteSubscriptions: PropTypes.func.isRequired, onSubscriptionDeleteModalClose: PropTypes.func.isRequired, }; export default DeleteDialog;
Version data entries
6 entries across 6 versions & 1 rubygems