diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index acf6db9dc7..395b986301 100644 --- a/web/react/components/invite_member_modal.jsx +++ b/web/react/components/invite_member_modal.jsx @@ -21,7 +21,7 @@ export default class InviteMemberModal extends React.Component { emailErrors: {}, firstNameErrors: {}, lastNameErrors: {}, - emailEnabled: !global.window.config.SendEmailNotifications + emailEnabled: global.window.config.SendEmailNotifications === 'true' }; } diff --git a/web/react/components/login.jsx b/web/react/components/login.jsx index cb7bc88359..72fae9149b 100644 --- a/web/react/components/login.jsx +++ b/web/react/components/login.jsx @@ -96,7 +96,7 @@ export default class Login extends React.Component { } let loginMessage = []; - if (global.window.config.AllowSignUpWithGitLab) { + if (global.window.config.AllowSignUpWithGitLab === 'true') { loginMessage.push(
diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx index 91d79b9194..d08608c9bf 100644 --- a/web/react/components/signup_team.jsx +++ b/web/react/components/signup_team.jsx @@ -12,11 +12,21 @@ export default class TeamSignUp extends React.Component { this.updatePage = this.updatePage.bind(this); - if (global.window.config.AllowSignUpWithEmail && global.window.config.AllowSignUpWithGitLab) { + var count = 0; + + if (global.window.config.AllowSignUpWithEmail === 'true') { + count = count + 1; + } + + if (global.window.config.AllowSignUpWithGitLab === 'true') { + count = count + 1; + } + + if (count > 1) { this.state = {page: 'choose'}; - } else if (global.window.config.AllowSignUpWithEmail) { + } else if (global.window.config.AllowSignUpWithEmail === 'true') { this.state = {page: 'email'}; - } else if (global.window.config.AllowSignUpWithGitLab) { + } else if (global.window.config.AllowSignUpWithGitLab === 'true') { this.state = {page: 'gitlab'}; } } diff --git a/web/react/components/signup_user_complete.jsx b/web/react/components/signup_user_complete.jsx index 08d5e2f48f..5b11829386 100644 --- a/web/react/components/signup_user_complete.jsx +++ b/web/react/components/signup_user_complete.jsx @@ -162,7 +162,7 @@ export default class SignupUserComplete extends React.Component { ); var signupMessage = []; - if (global.window.config.AllowSignUpWithGitLab) { + if (global.window.config.AllowSignUpWithGitLab === 'true') { signupMessage.push(
diff --git a/web/react/components/team_signup_choose_auth.jsx b/web/react/components/team_signup_choose_auth.jsx index cfd45edb37..4aeae8f084 100644 --- a/web/react/components/team_signup_choose_auth.jsx +++ b/web/react/components/team_signup_choose_auth.jsx @@ -8,7 +8,7 @@ export default class ChooseAuthPage extends React.Component { } render() { var buttons = []; - if (global.window.config.AllowSignUpWithGitLab) { + if (global.window.config.AllowSignUpWithGitLab === 'true') { buttons.push( '; - if (!global.window.config.ShowEmailAddress) { + if (!global.window.config.ShowEmailAddress === 'true') { dataContent += '
Email not shared
'; } else { dataContent += '
'; diff --git a/web/react/components/user_settings_general.jsx b/web/react/components/user_settings_general.jsx index 895601bd2c..cb60691a15 100644 --- a/web/react/components/user_settings_general.jsx +++ b/web/react/components/user_settings_general.jsx @@ -208,7 +208,7 @@ export default class UserSettingsGeneralTab extends React.Component { } setupInitialState(props) { var user = props.user; - var emailEnabled = !global.window.config.SendEmailNotifications; + var emailEnabled = global.window.config.SendEmailNotifications === 'true'; return {username: user.username, firstName: user.first_name, lastName: user.last_name, nickname: user.nickname, email: user.email, picture: null, loadingPicture: false, emailEnabled: emailEnabled}; } diff --git a/web/react/components/view_image.jsx b/web/react/components/view_image.jsx index f7c9803960..a37eb67759 100644 --- a/web/react/components/view_image.jsx +++ b/web/react/components/view_image.jsx @@ -300,7 +300,7 @@ export default class ViewImageModal extends React.Component { } var publicLink = ''; - if (global.window.config.AllowPublicLink) { + if (global.window.config.AllowPublicLink === 'true') { publicLink = (