import React from 'react'; import PropTypes from 'prop-types'; import { Field, reduxForm } from 'redux-form'; import { Trans, withTranslation } from 'react-i18next'; import flow from 'lodash/flow'; import { renderTextareaField } from '../../../../helpers/form'; import { normalizeMultiline } from '../../../../helpers/helpers'; const fields = [ { id: 'allowed_clients', title: 'access_allowed_title', subtitle: 'access_allowed_desc', }, { id: 'disallowed_clients', title: 'access_disallowed_title', subtitle: 'access_disallowed_desc', }, { id: 'blocked_hosts', title: 'access_blocked_title', subtitle: 'access_blocked_desc', }, ]; const Form = (props) => { const { handleSubmit, submitting, invalid, processingSet, } = props; const renderField = ({ id, title, subtitle, disabled = processingSet, }) =>