1
0
mirror of https://github.com/Radarr/Radarr.git synced 2026-04-19 21:46:50 -04:00

New: Movie Certifications

This commit is contained in:
Qstick
2020-04-02 20:57:36 -04:00
parent 770e3379fb
commit dd52760095
22 changed files with 412 additions and 36 deletions
@@ -0,0 +1,66 @@
import PropTypes from 'prop-types';
import React from 'react';
import { inputTypes } from 'Helpers/Props';
import LoadingIndicator from 'Components/Loading/LoadingIndicator';
import FieldSet from 'Components/FieldSet';
import Form from 'Components/Form/Form';
import FormGroup from 'Components/Form/FormGroup';
import FormLabel from 'Components/Form/FormLabel';
import FormInputGroup from 'Components/Form/FormInputGroup';
export const certificationCountryOptions = [
{ key: 'us', value: 'United States' },
{ key: 'gb', value: 'Great Britain' }
];
function MetadataOptions(props) {
const {
isFetching,
error,
settings,
hasSettings,
onInputChange
} = props;
return (
<FieldSet legend="Options">
{
isFetching &&
<LoadingIndicator />
}
{
!isFetching && error &&
<div>Unable to load indexer options</div>
}
{
hasSettings && !isFetching && !error &&
<Form>
<FormGroup>
<FormLabel>Certification Country</FormLabel>
<FormInputGroup
type={inputTypes.SELECT}
name="certificationCountry"
values={certificationCountryOptions}
onChange={onInputChange}
helpText="Select Country for Movie Certifications"
{...settings.certificationCountry}
/>
</FormGroup>
</Form>
}
</FieldSet>
);
}
MetadataOptions.propTypes = {
isFetching: PropTypes.bool.isRequired,
error: PropTypes.object,
settings: PropTypes.object.isRequired,
hasSettings: PropTypes.bool.isRequired,
onInputChange: PropTypes.func.isRequired
};
export default MetadataOptions;