@ -11,7 +11,8 @@ import ModalContent from 'Components/Modal/ModalContent';
import ModalFooter from 'Components/Modal/ModalFooter' ;
import ModalHeader from 'Components/Modal/ModalHeader' ;
import { inputTypes , kinds } from 'Helpers/Props' ;
import { authenticationMethodOptions , authenticationRequiredOptions , authenticationRequiredWarning } from 'Settings/General/SecuritySettings' ;
import { authenticationMethodOptions , authenticationRequiredOptions } from 'Settings/General/SecuritySettings' ;
import translate from 'Utilities/String/translate' ;
import styles from './AuthenticationRequiredModalContent.css' ;
function onModalClose ( ) {
@ -54,7 +55,7 @@ function AuthenticationRequiredModalContent(props) {
onModalClose = { onModalClose }
>
< ModalHeader >
Authentication Required
{ translate( ' AuthenticationRequired') }
< / M o d a l H e a d e r >
< ModalBody >
@ -62,71 +63,59 @@ function AuthenticationRequiredModalContent(props) {
className = { styles . authRequiredAlert }
kind = { kinds . WARNING }
>
{ authenticationRequiredWarning}
{ tr anslate( 'A uthenticationRequiredWarning') }
< / A l e r t >
{
isPopulated && ! error ?
< div >
< FormGroup >
< FormLabel > Authentication< / F o r m L a b e l >
< FormLabel > { translate( ' Authentication') } < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . SELECT }
name = "authenticationMethod"
values = { authenticationMethodOptions }
helpText = "Require Username and Password to access Radarr"
helpText = { translate ( 'AuthenticationMethodHelpText' ) }
onChange = { onInputChange }
{ ... authenticationMethod }
/ >
< / F o r m G r o u p >
{
authenticationEnabled ?
< FormGroup >
< FormLabel > Authentication Required < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . SELECT }
name = "authenticationRequired"
values = { authenticationRequiredOptions }
helpText = "Change which requests authentication is required for. Do not change unless you understand the risks."
onChange = { onInputChange }
{ ... authenticationRequired }
/ >
< / F o r m G r o u p > :
null
}
{
authenticationEnabled ?
< FormGroup >
< FormLabel > Username < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "username"
onChange = { onInputChange }
{ ... username }
/ >
< / F o r m G r o u p > :
null
}
{
authenticationEnabled ?
< FormGroup >
< FormLabel > Password < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . PASSWORD }
name = "password"
onChange = { onInputChange }
{ ... password }
/ >
< / F o r m G r o u p > :
null
}
< FormGroup >
< FormLabel > { translate ( 'AuthenticationRequired' ) } < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . SELECT }
name = "authenticationRequired"
values = { authenticationRequiredOptions }
helpText = { translate ( 'AuthenticationRequiredHelpText' ) }
onChange = { onInputChange }
{ ... authenticationRequired }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel > { translate ( 'Username' ) } < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . TEXT }
name = "username"
onChange = { onInputChange }
{ ... username }
/ >
< / F o r m G r o u p >
< FormGroup >
< FormLabel > { translate ( 'Password' ) } < / F o r m L a b e l >
< FormInputGroup
type = { inputTypes . PASSWORD }
name = "password"
onChange = { onInputChange }
{ ... password }
/ >
< / F o r m G r o u p >
< / d i v > :
null
}
@ -143,7 +132,7 @@ function AuthenticationRequiredModalContent(props) {
isDisabled = { ! authenticationEnabled }
onPress = { onSavePress }
>
Save
{ translate( ' Save') }
< / S p i n n e r B u t t o n >
< / M o d a l F o o t e r >
< / M o d a l C o n t e n t >