Sha256: bdb7f5422a1472b35bb24eafdd26724c2a8b716874a2b2b135903c9bc41589f5

Contents?: true

Size: 1.63 KB

Versions: 64

Compression:

Stored size: 1.63 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { MessageDialog } from 'patternfly-react';
import { sprintf, translate as __ } 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

64 entries across 64 versions & 1 rubygems

Version Path
katello-4.14.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.15.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.15.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.15.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.14.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.14.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.14.0.rc3 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.14.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.14.0.rc1.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.14.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.13.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.13.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.12.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.13.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.12.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.12.0.rc3 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.12.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.12.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.11.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.11.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js