Sha256: 3e6ade174b26841103b51b036f65613302ec32b98bf6fb739bd84c0fdfedfa55

Contents?: true

Size: 644 Bytes

Versions: 77

Compression:

Stored size: 644 Bytes

Contents

import React from 'react';
import PropTypes from 'prop-types';
import { translate as __ } from 'foremanReact/common/I18n';
import { formatter } from '../form/Formatter';

export const TemplateInputs = ({ inputs, value, setValue }) => {
  if (inputs.length)
    return inputs.map(input => formatter(input, value, setValue));
  return (
    <p className="gray-text">
      {__('There are no available input fields for the selected template.')}
    </p>
  );
};
TemplateInputs.propTypes = {
  inputs: PropTypes.array.isRequired,
  value: PropTypes.object,
  setValue: PropTypes.func.isRequired,
};

TemplateInputs.defaultProps = {
  value: {},
};

Version data entries

77 entries across 77 versions & 1 rubygems

Version Path
foreman_remote_execution-13.2.8 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-15.0.2 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-15.0.1 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.7 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-15.0.0 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.1.4 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.1.3 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.1.2 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.1.1 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.1.0 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.0.2 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.0.1 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.6 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-14.0.0 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.5 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.4 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.3 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.2 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-12.0.7 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js
foreman_remote_execution-13.2.1 webpack/JobWizard/steps/HostsAndInputs/TemplateInputs.js