Этот коммит содержится в:
=Corey Hulen
2015-09-21 15:34:09 -07:00
родитель 9baef5a6a0
Коммит e863096358
9 изменённых файлов: 24 добавлений и 14 удалений

Просмотреть файл

@@ -21,7 +21,7 @@ export default class InviteMemberModal extends React.Component {
emailErrors: {}, emailErrors: {},
firstNameErrors: {}, firstNameErrors: {},
lastNameErrors: {}, 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 = []; let loginMessage = [];
if (global.window.config.AllowSignUpWithGitLab) { if (global.window.config.AllowSignUpWithGitLab === 'true') {
loginMessage.push( loginMessage.push(
<a <a
className='btn btn-custom-login gitlab' className='btn btn-custom-login gitlab'
@@ -114,7 +114,7 @@ export default class Login extends React.Component {
} }
let emailSignup; let emailSignup;
if (global.window.config.AllowSignUpWithEmail) { if (global.window.config.AllowSignUpWithEmail === 'true') {
emailSignup = ( emailSignup = (
<div> <div>
<div className={'form-group' + errorClass}> <div className={'form-group' + errorClass}>

Просмотреть файл

@@ -12,11 +12,21 @@ export default class TeamSignUp extends React.Component {
this.updatePage = this.updatePage.bind(this); 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'}; this.state = {page: 'choose'};
} else if (global.window.config.AllowSignUpWithEmail) { } else if (global.window.config.AllowSignUpWithEmail === 'true') {
this.state = {page: 'email'}; this.state = {page: 'email'};
} else if (global.window.config.AllowSignUpWithGitLab) { } else if (global.window.config.AllowSignUpWithGitLab === 'true') {
this.state = {page: 'gitlab'}; this.state = {page: 'gitlab'};
} }
} }

Просмотреть файл

@@ -162,7 +162,7 @@ export default class SignupUserComplete extends React.Component {
); );
var signupMessage = []; var signupMessage = [];
if (global.window.config.AllowSignUpWithGitLab) { if (global.window.config.AllowSignUpWithGitLab === 'true') {
signupMessage.push( signupMessage.push(
<a <a
className='btn btn-custom-login gitlab' className='btn btn-custom-login gitlab'
@@ -175,7 +175,7 @@ export default class SignupUserComplete extends React.Component {
} }
var emailSignup; var emailSignup;
if (global.window.config.AllowSignUpWithEmail) { if (global.window.config.AllowSignUpWithEmail === 'true') {
emailSignup = ( emailSignup = (
<div> <div>
<div className='inner__content'> <div className='inner__content'>

Просмотреть файл

@@ -8,7 +8,7 @@ export default class ChooseAuthPage extends React.Component {
} }
render() { render() {
var buttons = []; var buttons = [];
if (global.window.config.AllowSignUpWithGitLab) { if (global.window.config.AllowSignUpWithGitLab === 'true') {
buttons.push( buttons.push(
<a <a
className='btn btn-custom-login gitlab btn-full' 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( buttons.push(
<a <a
className='btn btn-custom-login email btn-full' 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.submitSkip = this.submitSkip.bind(this);
this.keySubmit = this.keySubmit.bind(this); this.keySubmit = this.keySubmit.bind(this);
this.state = { this.state = {
emailEnabled: !global.window.config.SendEmailNotifications emailEnabled: global.window.config.SendEmailNotifications === 'true'
}; };
if (!this.state.emailEnabled) { 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" />'; 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>'; dataContent += '<div class="text-nowrap">Email not shared</div>';
} else { } 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>'; 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) { setupInitialState(props) {
var user = props.user; 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, return {username: user.username, firstName: user.first_name, lastName: user.last_name, nickname: user.nickname,
email: user.email, picture: null, loadingPicture: false, emailEnabled: emailEnabled}; email: user.email, picture: null, loadingPicture: false, emailEnabled: emailEnabled};
} }

Просмотреть файл

@@ -300,7 +300,7 @@ export default class ViewImageModal extends React.Component {
} }
var publicLink = ''; var publicLink = '';
if (global.window.config.AllowPublicLink) { if (global.window.config.AllowPublicLink === 'true') {
publicLink = ( publicLink = (
<div> <div>
<a <a