summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--api/user.go5
-rw-r--r--web/react/components/admin_console/gitlab_settings.jsx40
-rw-r--r--web/react/utils/utils.jsx1
3 files changed, 24 insertions, 22 deletions
diff --git a/api/user.go b/api/user.go
index 9ed4404f1..92a77e68a 100644
--- a/api/user.go
+++ b/api/user.go
@@ -198,7 +198,7 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User {
l4g.Error("Encountered an issue joining default channels user_id=%s, team_id=%s, err=%v", ruser.Id, ruser.TeamId, err)
}
- fireAndForgetWelcomeEmail(ruser.Email, team.DisplayName, c.GetTeamURLFromTeam(team))
+ fireAndForgetWelcomeEmail(ruser.Email, team.DisplayName, c.GetSiteURL(), c.GetTeamURLFromTeam(team))
if user.EmailVerified {
if cresult := <-Srv.Store.User().VerifyEmail(ruser.Id); cresult.Err != nil {
l4g.Error("Failed to set email verified err=%v", cresult.Err)
@@ -218,12 +218,13 @@ func CreateUser(c *Context, team *model.Team, user *model.User) *model.User {
}
}
-func fireAndForgetWelcomeEmail(email, teamDisplayName, teamURL string) {
+func fireAndForgetWelcomeEmail(email, teamDisplayName, siteURL, teamURL string) {
go func() {
subjectPage := NewServerTemplatePage("welcome_subject")
subjectPage.Props["TeamDisplayName"] = teamDisplayName
bodyPage := NewServerTemplatePage("welcome_body")
+ bodyPage.Props["SiteURL"] = siteURL
bodyPage.Props["TeamURL"] = teamURL
if err := utils.SendMail(email, subjectPage.Render(), bodyPage.Render()); err != nil {
diff --git a/web/react/components/admin_console/gitlab_settings.jsx b/web/react/components/admin_console/gitlab_settings.jsx
index 1e10c5592..eaea15b8f 100644
--- a/web/react/components/admin_console/gitlab_settings.jsx
+++ b/web/react/components/admin_console/gitlab_settings.jsx
@@ -12,7 +12,7 @@ export default class GitLabSettings extends React.Component {
this.handleSubmit = this.handleSubmit.bind(this);
this.state = {
- Allow: this.props.config.GitLabSettings.Allow,
+ Enable: this.props.config.GitLabSettings.Enable,
saveNeeded: false,
serverError: null
};
@@ -21,12 +21,12 @@ export default class GitLabSettings extends React.Component {
handleChange(action) {
var s = {saveNeeded: true, serverError: this.state.serverError};
- if (action === 'AllowTrue') {
- s.Allow = true;
+ if (action === 'EnableTrue') {
+ s.Enable = true;
}
- if (action === 'AllowFalse') {
- s.Allow = false;
+ if (action === 'EnableFalse') {
+ s.Enable = false;
}
this.setState(s);
@@ -37,7 +37,7 @@ export default class GitLabSettings extends React.Component {
$('#save-button').button('loading');
var config = this.props.config;
- config.GitLabSettings.Allow = React.findDOMNode(this.refs.Allow).checked;
+ config.GitLabSettings.Enable = React.findDOMNode(this.refs.Enable).checked;
config.GitLabSettings.Secret = React.findDOMNode(this.refs.Secret).value.trim();
config.GitLabSettings.Id = React.findDOMNode(this.refs.Id).value.trim();
config.GitLabSettings.Scope = React.findDOMNode(this.refs.Scope).value.trim();
@@ -88,7 +88,7 @@ export default class GitLabSettings extends React.Component {
<div className='form-group'>
<label
className='control-label col-sm-4'
- htmlFor='Allow'
+ htmlFor='Enable'
>
{'Enable Sign Up With GitLab: '}
</label>
@@ -96,21 +96,21 @@ export default class GitLabSettings extends React.Component {
<label className='radio-inline'>
<input
type='radio'
- name='Allow'
+ name='Enable'
value='true'
- ref='Allow'
- defaultChecked={this.props.config.GitLabSettings.Allow}
- onChange={this.handleChange.bind(this, 'AllowTrue')}
+ ref='Enable'
+ defaultChecked={this.props.config.GitLabSettings.Enable}
+ onChange={this.handleChange.bind(this, 'EnableTrue')}
/>
{'true'}
</label>
<label className='radio-inline'>
<input
type='radio'
- name='Allow'
+ name='Enable'
value='false'
- defaultChecked={!this.props.config.GitLabSettings.Allow}
- onChange={this.handleChange.bind(this, 'AllowFalse')}
+ defaultChecked={!this.props.config.GitLabSettings.Enable}
+ onChange={this.handleChange.bind(this, 'EnableFalse')}
/>
{'false'}
</label>
@@ -134,7 +134,7 @@ export default class GitLabSettings extends React.Component {
placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"'
defaultValue={this.props.config.GitLabSettings.Secret}
onChange={this.handleChange}
- disabled={!this.state.Allow}
+ disabled={!this.state.Enable}
/>
<p className='help-text'>{'Obtain this value via the instructions above for logging into GitLab.'}</p>
</div>
@@ -156,7 +156,7 @@ export default class GitLabSettings extends React.Component {
placeholder='Ex "jcuS8PuvcpGhpgHhlcpT1Mx42pnqMxQY"'
defaultValue={this.props.config.GitLabSettings.Id}
onChange={this.handleChange}
- disabled={!this.state.Allow}
+ disabled={!this.state.Enable}
/>
<p className='help-text'>{'Obtain this value via the instructions above for logging into GitLab'}</p>
</div>
@@ -178,7 +178,7 @@ export default class GitLabSettings extends React.Component {
placeholder='Not currently used by GitLab. Please leave blank'
defaultValue={this.props.config.GitLabSettings.Scope}
onChange={this.handleChange}
- disabled={!this.state.Allow}
+ disabled={!this.state.Enable}
/>
<p className='help-text'>{'This field is not yet used by GitLab OAuth. Other OAuth providers may use this field to specify the scope of account data from OAuth provider that is sent to Mattermost.'}</p>
</div>
@@ -200,7 +200,7 @@ export default class GitLabSettings extends React.Component {
placeholder='Ex ""'
defaultValue={this.props.config.GitLabSettings.AuthEndpoint}
onChange={this.handleChange}
- disabled={!this.state.Allow}
+ disabled={!this.state.Enable}
/>
<p className='help-text'>{'Enter <your-gitlab-url>/oauth/authorize (example http://localhost:3000/oauth/authorize).'}</p>
</div>
@@ -222,7 +222,7 @@ export default class GitLabSettings extends React.Component {
placeholder='Ex ""'
defaultValue={this.props.config.GitLabSettings.TokenEndpoint}
onChange={this.handleChange}
- disabled={!this.state.Allow}
+ disabled={!this.state.Enable}
/>
<p className='help-text'>{'Enter <your-gitlab-url>/oauth/token.'}</p>
</div>
@@ -244,7 +244,7 @@ export default class GitLabSettings extends React.Component {
placeholder='Ex ""'
defaultValue={this.props.config.GitLabSettings.UserApiEndpoint}
onChange={this.handleChange}
- disabled={!this.state.Allow}
+ disabled={!this.state.Enable}
/>
<p className='help-text'>{'Enter <your-gitlab-url>/api/v3/user.'}</p>
</div>
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index 61dcae6d8..27b8ff0de 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -580,6 +580,7 @@ export function applyTheme(theme) {
changeCss('.sidebar--left .team__header, .sidebar--menu .team__header', 'background:' + theme.sidebarHeaderBg, 1);
changeCss('.modal .modal-header', 'background:' + theme.sidebarHeaderBg, 1);
changeCss('#navbar .navbar-default', 'background:' + theme.sidebarHeaderBg, 1);
+ changeCss('@media screen and (max-width: 768px) { .search-bar__container', 'background:' + theme.sidebarHeaderBg, 1);
}
if (theme.sidebarHeaderTextColor) {