From fdce7be66ef8e28fe65458bb1e863a38578177fc Mon Sep 17 00:00:00 2001 From: Sebastian Sdorra Date: Wed, 25 Jul 2018 14:47:42 +0200 Subject: [PATCH] do not allow change user name field on edit --- scm-ui/src/users/containers/UserForm.js | 83 ++++++++++++------------- 1 file changed, 41 insertions(+), 42 deletions(-) diff --git a/scm-ui/src/users/containers/UserForm.js b/scm-ui/src/users/containers/UserForm.js index b93877e0e3..40ecf4504a 100644 --- a/scm-ui/src/users/containers/UserForm.js +++ b/scm-ui/src/users/containers/UserForm.js @@ -9,7 +9,6 @@ import Loading from "../../components/Loading"; type Props = { submitForm: User => void, user?: User, - loading?: boolean, t: string => string }; @@ -39,49 +38,49 @@ class UserForm extends React.Component { render() { const { t } = this.props; const user = this.state; - if (user) { - return ( -
- - - - - - - - + + let nameField = null; + if (!this.props.user) { + nameField = ( + ); - } else { - return ; } + return ( +
+ {nameField} + + + + + + + + ); } handleUsernameChange = (name: string) => {