From c63e027aece1270c8e1378ee27b015304d25f89d Mon Sep 17 00:00:00 2001 From: Christopher Speller Date: Mon, 2 May 2016 08:07:58 -0400 Subject: Fixing LDAP editing of attributes (#2824) --- .../user_settings/user_settings_general.jsx | 313 ++++++++++++--------- 1 file changed, 179 insertions(+), 134 deletions(-) (limited to 'webapp/components/user_settings') diff --git a/webapp/components/user_settings/user_settings_general.jsx b/webapp/components/user_settings/user_settings_general.jsx index abf5ca7a9..718ad5ed8 100644 --- a/webapp/components/user_settings/user_settings_general.jsx +++ b/webapp/components/user_settings/user_settings_general.jsx @@ -513,85 +513,100 @@ class UserSettingsGeneralTab extends React.Component { const inputs = []; if (this.props.activeSection === 'name') { - inputs.push( -
- -
- + let extraInfo; + let submit = null; + if (this.props.user.auth_service === '') { + inputs.push( +
+ +
+ +
-
- ); + ); - inputs.push( -
- -
- + ); + + extraInfo = ( + + -
-
- ); + + ); - function notifClick(e) { - e.preventDefault(); - this.updateSection(''); - this.props.updateTab('notifications'); + submit = this.submitName; + } else { + extraInfo = ( + + + + ); } - const notifLink = ( - - - - ); - - const extraInfo = ( - - - - ); - nameSection = ( { @@ -632,47 +647,62 @@ class UserSettingsGeneralTab extends React.Component { let nicknameSection; if (this.props.activeSection === 'nickname') { - let nicknameLabel = ( - - ); - if (Utils.isMobile()) { - nicknameLabel = ''; - } - - inputs.push( -
- -
- + -
-
- ); - - const extraInfo = ( - + + ); + } else { + let nicknameLabel = ( - - ); + ); + if (Utils.isMobile()) { + nicknameLabel = ''; + } + + inputs.push( +
+ +
+ +
+
+ ); + + extraInfo = ( + + + + ); + + submit = this.submitNickname; + } nicknameSection = ( { @@ -708,48 +738,63 @@ class UserSettingsGeneralTab extends React.Component { let usernameSection; if (this.props.activeSection === 'username') { - let usernameLabel = ( - - ); - if (Utils.isMobile()) { - usernameLabel = ''; - } + let extraInfo; + let submit = null; + if (this.props.user.auth_service === '') { + let usernameLabel = ( + + ); + if (Utils.isMobile()) { + usernameLabel = ''; + } - inputs.push( -
- -
- + inputs.push( +
+ +
+ +
-
- ); + ); - const extraInfo = ( - - - - ); + extraInfo = ( + + + + ); + + submit = this.submitUsername; + } else { + extraInfo = ( + + + + ); + } usernameSection = ( { -- cgit v1.2.3-1-g7c22