diff options
Diffstat (limited to 'web')
-rw-r--r-- | web/react/components/invite_member_modal.jsx | 2 | ||||
-rw-r--r-- | web/react/components/login.jsx | 4 | ||||
-rw-r--r-- | web/react/components/signup_team.jsx | 16 | ||||
-rw-r--r-- | web/react/components/signup_user_complete.jsx | 4 | ||||
-rw-r--r-- | web/react/components/team_signup_choose_auth.jsx | 4 | ||||
-rw-r--r-- | web/react/components/team_signup_send_invites_page.jsx | 2 | ||||
-rw-r--r-- | web/react/components/user_profile.jsx | 2 | ||||
-rw-r--r-- | web/react/components/user_settings_general.jsx | 2 | ||||
-rw-r--r-- | web/react/components/view_image.jsx | 2 |
9 files changed, 24 insertions, 14 deletions
diff --git a/web/react/components/invite_member_modal.jsx b/web/react/components/invite_member_modal.jsx index acf6db9dc..395b98630 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 cb7bc8835..72fae9149 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( <a className='btn btn-custom-login gitlab' @@ -114,7 +114,7 @@ export default class Login extends React.Component { } let emailSignup; - if (global.window.config.AllowSignUpWithEmail) { + if (global.window.config.AllowSignUpWithEmail === 'true') { emailSignup = ( <div> <div className={'form-group' + errorClass}> diff --git a/web/react/components/signup_team.jsx b/web/react/components/signup_team.jsx index 91d79b919..d08608c9b 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 08d5e2f48..5b1182938 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( <a className='btn btn-custom-login gitlab' @@ -175,7 +175,7 @@ export default class SignupUserComplete extends React.Component { } var emailSignup; - if (global.window.config.AllowSignUpWithEmail) { + if (global.window.config.AllowSignUpWithEmail === 'true') { emailSignup = ( <div> <div className='inner__content'> diff --git a/web/react/components/team_signup_choose_auth.jsx b/web/react/components/team_signup_choose_auth.jsx index cfd45edb3..4aeae8f08 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( <a className='btn btn-custom-login gitlab btn-full' @@ -26,7 +26,7 @@ export default class ChooseAuthPage extends React.Component { ); } - if (global.window.config.AllowSignUpWithEmail) { + if (global.window.config.AllowSignUpWithEmail === 'true') { buttons.push( <a className='btn btn-custom-login email btn-full' diff --git a/web/react/components/team_signup_send_invites_page.jsx b/web/react/components/team_signup_send_invites_page.jsx index ee51debb7..524bd5b50 100644 --- a/web/react/components/team_signup_send_invites_page.jsx +++ b/web/react/components/team_signup_send_invites_page.jsx @@ -13,7 +13,7 @@ export default class TeamSignupSendInvitesPage extends React.Component { this.submitSkip = this.submitSkip.bind(this); this.keySubmit = this.keySubmit.bind(this); this.state = { - emailEnabled: !global.window.config.SendEmailNotifications + emailEnabled: global.window.config.SendEmailNotifications === 'true' }; if (!this.state.emailEnabled) { diff --git a/web/react/components/user_profile.jsx b/web/react/components/user_profile.jsx index 7cfac69e7..c5d028d31 100644 --- a/web/react/components/user_profile.jsx +++ b/web/react/components/user_profile.jsx @@ -57,7 +57,7 @@ export default class UserProfile extends React.Component { } var dataContent = '<img class="user-popover__image" src="/api/v1/users/' + this.state.profile.id + '/image?time=' + this.state.profile.update_at + '" height="128" width="128" />'; - if (!global.window.config.ShowEmailAddress) { + if (!global.window.config.ShowEmailAddress === 'true') { dataContent += '<div class="text-nowrap">Email not shared</div>'; } else { dataContent += '<div data-toggle="tooltip" title="' + this.state.profile.email + '"><a href="mailto:' + this.state.profile.email + '" class="text-nowrap text-lowercase user-popover__email">' + this.state.profile.email + '</a></div>'; diff --git a/web/react/components/user_settings_general.jsx b/web/react/components/user_settings_general.jsx index 895601bd2..cb60691a1 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 f7c980396..a37eb6775 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 = ( <div> <a |