import React from 'react'; import PropTypes from 'prop-types'; import { ValidatorForm } from 'react-material-ui-form-validator'; import { withStyles } from '@material-ui/core/styles'; import Button from '@material-ui/core/Button'; import LinearProgress from '@material-ui/core/LinearProgress'; import Typography from '@material-ui/core/Typography'; import Box from '@material-ui/core/Box'; import PasswordValidator from '../components/PasswordValidator'; import { withAuthenticationContext } from '../authentication/Context'; const styles = theme => ({ loadingSettings: { margin: theme.spacing.unit, }, loadingSettingsDetails: { margin: theme.spacing.unit * 4, textAlign: "center" }, textField: { width: "100%" }, button: { marginRight: theme.spacing.unit * 2, marginTop: theme.spacing.unit * 2, } }); class SecuritySettingsForm extends React.Component { onSubmit = () => { this.props.onSubmit(); this.props.authenticationContext.refresh(); } render() { const { classes, securitySettingsFetched, securitySettings, errorMessage, handleValueChange, onReset } = this.props; return ( !securitySettingsFetched ?