diff --git a/frontend/src/Components/Form/FormInputGroup.js b/frontend/src/Components/Form/FormInputGroup.js index 875554731..068e831f2 100644 --- a/frontend/src/Components/Form/FormInputGroup.js +++ b/frontend/src/Components/Form/FormInputGroup.js @@ -12,6 +12,7 @@ import EnhancedSelectInput from './EnhancedSelectInput'; import EnhancedSelectInputConnector from './EnhancedSelectInputConnector'; import FormInputHelpText from './FormInputHelpText'; import IndexerFlagsSelectInputConnector from './IndexerFlagsSelectInputConnector'; +import InfoInput from './InfoInput'; import KeyValueListInput from './KeyValueListInput'; import MovieMonitoredSelectInput from './MovieMonitoredSelectInput'; import NumberInput from './NumberInput'; @@ -42,6 +43,9 @@ function getComponent(type) { case inputTypes.DEVICE: return DeviceInputConnector; + case inputTypes.INFO: + return InfoInput; + case inputTypes.KEY_VALUE_LIST: return KeyValueListInput; diff --git a/frontend/src/Components/Form/InfoInput.js b/frontend/src/Components/Form/InfoInput.js new file mode 100644 index 000000000..f5fb9b15c --- /dev/null +++ b/frontend/src/Components/Form/InfoInput.js @@ -0,0 +1,42 @@ +import PropTypes from 'prop-types'; +import React, { Component } from 'react'; + +class InfoInput extends Component { + + // + // Render + + render() { + const { + value + } = this.props; + + console.log(this.props); + + return ( + + ); + } +} + +InfoInput.propTypes = { + readOnly: PropTypes.bool, + autoFocus: PropTypes.bool, + placeholder: PropTypes.string, + name: PropTypes.string.isRequired, + value: PropTypes.oneOfType([PropTypes.string, PropTypes.number, PropTypes.array]).isRequired, + hasError: PropTypes.bool, + hasWarning: PropTypes.bool, + hasButton: PropTypes.bool, + onChange: PropTypes.func.isRequired, + onFocus: PropTypes.func, + onBlur: PropTypes.func, + onCopy: PropTypes.func, + onSelectionChange: PropTypes.func +}; + +InfoInput.defaultProps = { + value: '' +}; + +export default InfoInput; diff --git a/frontend/src/Components/Form/ProviderFieldFormGroup.js b/frontend/src/Components/Form/ProviderFieldFormGroup.js index f5130d18b..a43b21c5b 100644 --- a/frontend/src/Components/Form/ProviderFieldFormGroup.js +++ b/frontend/src/Components/Form/ProviderFieldFormGroup.js @@ -35,6 +35,8 @@ function getType({ type, selectOptionsProviderAction }) { return inputTypes.TEXT; case 'oAuth': return inputTypes.OAUTH; + case 'info': + return inputTypes.INFO; default: return inputTypes.TEXT; } diff --git a/frontend/src/Helpers/Props/inputTypes.js b/frontend/src/Helpers/Props/inputTypes.js index bc0379858..c6b94a87f 100644 --- a/frontend/src/Helpers/Props/inputTypes.js +++ b/frontend/src/Helpers/Props/inputTypes.js @@ -3,6 +3,7 @@ export const AVAILABILITY_SELECT = 'availabilitySelect'; export const CAPTCHA = 'captcha'; export const CHECK = 'check'; export const DEVICE = 'device'; +export const INFO = 'info'; export const MOVIE_MONITORED_SELECT = 'movieMonitoredSelect'; export const NUMBER = 'number'; export const OAUTH = 'oauth'; @@ -22,6 +23,7 @@ export const all = [ CAPTCHA, CHECK, DEVICE, + INFO, MOVIE_MONITORED_SELECT, NUMBER, OAUTH, diff --git a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs index 8078a2196..fed8b3002 100644 --- a/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs +++ b/src/NzbDrone.Core/Indexers/Definitions/Cardigann/CardigannBase.cs @@ -240,6 +240,10 @@ namespace NzbDrone.Core.Indexers.Cardigann variables[name] = selected.Value; } + else if (setting.Type == "info") + { + variables[name] = value; + } else { throw new NotSupportedException();