@ -2,7 +2,13 @@ import PropTypes from 'prop-types';
import React , { Component } from 'react' ;
import { connect } from 'react-redux' ;
import { createSelector } from 'reselect' ;
import { saveDownloadClient , setDownloadClientFieldValue , setDownloadClientValue , testDownloadClient } from 'Store/Actions/settingsActions' ;
import {
saveDownloadClient ,
setDownloadClientFieldValue ,
setDownloadClientValue ,
testDownloadClient ,
toggleAdvancedSettings
} from 'Store/Actions/settingsActions' ;
import createProviderSettingsSelector from 'Store/Selectors/createProviderSettingsSelector' ;
import EditDownloadClientModalContent from './EditDownloadClientModalContent' ;
@ -23,7 +29,8 @@ const mapDispatchToProps = {
setDownloadClientValue ,
setDownloadClientFieldValue ,
saveDownloadClient ,
testDownloadClient
testDownloadClient ,
toggleAdvancedSettings
} ;
class EditDownloadClientModalContentConnector extends Component {
@ -56,6 +63,10 @@ class EditDownloadClientModalContentConnector extends Component {
this . props . testDownloadClient ( { id : this . props . id } ) ;
} ;
onAdvancedSettingsPress = ( ) => {
this . props . toggleAdvancedSettings ( ) ;
} ;
//
// Render
@ -65,6 +76,7 @@ class EditDownloadClientModalContentConnector extends Component {
{ ... this . props }
onSavePress = { this . onSavePress }
onTestPress = { this . onTestPress }
onAdvancedSettingsPress = { this . onAdvancedSettingsPress }
onInputChange = { this . onInputChange }
onFieldChange = { this . onFieldChange }
/ >
@ -82,6 +94,7 @@ EditDownloadClientModalContentConnector.propTypes = {
setDownloadClientFieldValue : PropTypes . func . isRequired ,
saveDownloadClient : PropTypes . func . isRequired ,
testDownloadClient : PropTypes . func . isRequired ,
toggleAdvancedSettings : PropTypes . func . isRequired ,
onModalClose : PropTypes . func . isRequired
} ;