Sha256: a1b5826c3582f56a26e4afa714059ef8b71ec06de830a7ad6de1c8e84cf0bce5

Contents?: true

Size: 1.65 KB

Versions: 96

Compression:

Stored size: 1.65 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

96 entries across 96 versions & 1 rubygems

Version Path
katello-4.3.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.4.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.3.0 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.3.0.rc4 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.3.0.rc3 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.3.0.rc2.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.3.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.3.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.0.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.1.4 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.0.3 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.0.1.rc3 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-3.18.5 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.0.1.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.0.rc2 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.1.3 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.2.0.rc1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js
katello-4.0.2.1 webpack/scenes/Subscriptions/components/SubscriptionsTable/components/Dialogs/DeleteDialog.js