Fixing broken signup pages
Этот коммит содержится в:
@@ -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'
|
||||
};
|
||||
}
|
||||
|
||||
|
||||
@@ -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}>
|
||||
|
||||
@@ -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'};
|
||||
}
|
||||
}
|
||||
|
||||
@@ -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'>
|
||||
|
||||
@@ -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'
|
||||
|
||||
@@ -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) {
|
||||
|
||||
@@ -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>';
|
||||
|
||||
@@ -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};
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
Ссылка в новой задаче
Block a user