Sha256: d3509616c7378f6a3543a222d9c15c3afea5b84ceacd95e776e695789329067c

Contents?: true

Size: 1.02 KB

Versions: 28

Compression:

Stored size: 1.02 KB

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { noop } from 'foremanReact/common/helpers';

import { FormGroup, Checkbox } from '@patternfly/react-core';
import LabelIcon from 'foremanReact/components/common/LabelIcon';
import { translate as __ } from 'foremanReact/common/I18n';

const Force = ({ value, onChange, isLoading }) => (
  <FormGroup fieldId="reg_katello_force">
    <Checkbox
      ouiaId="reg-katello-force"
      label={
        <span>
          {__('Force')}{' '}
          <LabelIcon text={__('Remove any `katello-ca-consumer` rpms before registration and run subscription-manager with `--force` argument.')} />
        </span>
      }
      id="reg_katello_force"
      onChange={() => onChange({ force: !value })}
      isDisabled={isLoading}
      isChecked={value}
    />
  </FormGroup>
);

Force.propTypes = {
  value: PropTypes.bool,
  onChange: PropTypes.func,
  isLoading: PropTypes.bool,
};

Force.defaultProps = {
  value: false,
  onChange: noop,
  isLoading: false,
};

export default Force;

Version data entries

28 entries across 28 versions & 1 rubygems

Version Path
katello-4.15.0.rc2 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.15.0.rc1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.14.1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.14.0 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.14.0.rc3 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.14.0.rc2 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.14.0.rc1.1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.14.0.rc1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.13.1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.13.0 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.12.1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.13.0.rc1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.12.0 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.12.0.rc3 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.12.0.rc2 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.12.0.rc1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.11.1 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.11.0 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.11.0.rc2 webpack/components/extensions/RegistrationCommands/fields/Force.js
katello-4.11.0.rc1 webpack/components/extensions/RegistrationCommands/fields/Force.js