diff --git a/jams-react-client/src/components/FormikField/FormikField.js b/jams-react-client/src/components/FormikField/FormikField.js index 3dc5394c36181b9b56204d95fdc1fa92339bd79a..5c514f60d65d85b3c22866cf4d13a8cff3376078 100644 --- a/jams-react-client/src/components/FormikField/FormikField.js +++ b/jams-react-client/src/components/FormikField/FormikField.js @@ -1,42 +1,54 @@ -import React from 'react'; -import PropTypes from 'prop-types'; -import { ErrorMessage, Field } from 'formik'; +import React from "react"; +import PropTypes from "prop-types"; +import { ErrorMessage, Field } from "formik"; -import FormControl from '@material-ui/core/FormControl'; +import FormControl from "@material-ui/core/FormControl"; import InputLabel from "@material-ui/core/InputLabel"; -import Input from '@material-ui/core/Input'; +import Input from "@material-ui/core/Input"; class FormikField extends React.Component { - render() { - return ( - <div className="FormikField"> - <FormControl size="medium" error={<ErrorMessage name={this.props.name} /> === ""} fullWidth> - <InputLabel htmlFor={this.props.name}>{<ErrorMessage name={this.props.name} /> === "" ? this.props.label : <ErrorMessage name={this.props.name} />}</InputLabel> - <Field - placeholder={this.props.placeholder} - required={this.props.required} - name={this.props.name} - as={Input} - startAdornment={this.props.startAdornment} - endAdornment={this.props.endAdornment} - label={this.props.label} - fullWidth - type={this.props.type} - /> - </FormControl> - </div> - ) - } + render() { + return ( + <div className="FormikField"> + <FormControl + size="medium" + error={<ErrorMessage name={this.props.name} /> === ""} + fullWidth + > + <InputLabel htmlFor={this.props.name}> + {<ErrorMessage name={this.props.name} /> === "" ? ( + this.props.label + ) : ( + <ErrorMessage name={this.props.name} /> + )} + </InputLabel> + <Field + placeholder={this.props.placeholder} + required={this.props.required} + name={this.props.name} + as={Input} + startAdornment={this.props.startAdornment} + endAdornment={this.props.endAdornment} + label={this.props.label} + fullWidth + type={this.props.type} + autoComplete={this.props.autoComplete} + /> + </FormControl> + </div> + ); + } } FormikField.propTypes = { - startAdornment: false, - endAdornment: false, - placeholder: PropTypes.string, - required: false, - name: PropTypes.string.isRequired, - label: PropTypes.string.isRequired, - type: "text" + startAdornment: false, + endAdornment: false, + placeholder: PropTypes.string, + required: false, + name: PropTypes.string.isRequired, + label: PropTypes.string.isRequired, + type: "text", + autoComplete: "on", }; -export default FormikField; \ No newline at end of file +export default FormikField; diff --git a/jams-react-client/src/views/UserProfile/EditCreateUserProfile.js b/jams-react-client/src/views/UserProfile/EditCreateUserProfile.js index 420529cc64ce13b3f9da548e1cc1a780289ce855..45879b46d5bb6c3af67f9b620869689461f183e9 100644 --- a/jams-react-client/src/views/UserProfile/EditCreateUserProfile.js +++ b/jams-react-client/src/views/UserProfile/EditCreateUserProfile.js @@ -504,6 +504,7 @@ export default function EditCreateUserProfile(props) { </InputAdornment> } required + autoComplete="off" /> </Grid> )} @@ -533,6 +534,7 @@ export default function EditCreateUserProfile(props) { </IconButton> } required + autoComplete="off" /> </Grid> )} @@ -562,6 +564,7 @@ export default function EditCreateUserProfile(props) { </IconButton> } required + autoComplete="off" /> </Grid> )}