Skip to content

Commit

Permalink
Improvements to Custom Branding (mattermost#4177)
Browse files Browse the repository at this point in the history
  • Loading branch information
DavidLu1997 authored and jwilander committed Oct 11, 2016
1 parent 78a4b19 commit 6e9e41e
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 30 deletions.
50 changes: 24 additions & 26 deletions webapp/components/admin_console/custom_brand_settings.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ export default class CustomBrandSettings extends AdminSettings {
getConfigFromState(config) {
config.TeamSettings.SiteName = this.state.siteName;
if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true') {
config.TeamSettings.customDescriptionText = this.state.customDescriptionText;
config.TeamSettings.EnableCustomBrand = this.state.enableCustomBrand;
config.TeamSettings.CustomBrandText = this.state.customBrandText;
config.TeamSettings.customDescriptionText = this.state.customDescriptionText;
}

return config;
Expand Down Expand Up @@ -56,6 +56,28 @@ export default class CustomBrandSettings extends AdminSettings {
renderSettings() {
const enterpriseSettings = [];
if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true') {
enterpriseSettings.push(
<TextSetting
key='customDescriptionText'
id='customDescriptionText'
label={
<FormattedMessage
id='admin.team.brandDescriptionTitle'
defaultMessage='Site Description: '
/>
}
helpText={
<FormattedMessage
id='admin.team.brandDescriptionHelp'
defaultMessage='Description of service shown in login screens and UI. When not specified, "All team communication in one place, searchable and accessible anywhere" is displayed.'
/>
}
value={this.state.customDescriptionText}
placeholder={Utils.localizeMessage('web.root.signup_info', 'All team communication in one place, searchable and accessible anywhere')}
onChange={this.handleChange}
/>
);

enterpriseSettings.push(
<BooleanSetting
key='enableCustomBrand'
Expand Down Expand Up @@ -98,38 +120,14 @@ export default class CustomBrandSettings extends AdminSettings {
helpText={
<FormattedMessage
id='admin.team.brandTextDescription'
defaultMessage='The custom branding Markdown-formatted text you would like to appear below your custom brand image on your login sreen.'
defaultMessage='Text that will appear below your custom brand image on your login screen. Supports Markdown-formatted text. Maximum 500 characters allowed.'
/>
}
value={this.state.customBrandText}
onChange={this.handleChange}
disabled={!this.state.enableCustomBrand}
/>
);

enterpriseSettings.push(
<TextSetting
key='customDescriptionText'
id='customDescriptionText'
type='textarea'
label={
<FormattedMessage
id='admin.team.brandDescriptionTitle'
defaultMessage='Site Description'
/>
}
helpText={
<FormattedMessage
id='admin.team.brandDescriptionHelp'
defaultMessage='Description of service shown in login screens and UI.'
/>
}
value={this.state.customDescriptionText}
placeholder={Utils.localizeMessage('web.root.signup_info', 'All team communication in one place, searchable and accessible anywhere')}
onChange={this.handleChange}
disabled={!this.state.enableCustomBrand}
/>
);
}

return (
Expand Down
8 changes: 4 additions & 4 deletions webapp/i18n/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -771,10 +771,10 @@
"admin.system_analytics.totalPosts": "Total Posts",
"admin.team.brandDesc": "Enable custom branding to show an image of your choice, uploaded below, and some help text, written below, on the login page.",
"admin.team.brandDescriptionExample": "All team communication in one place, searchable and accessible anywhere",
"admin.team.brandDescriptionHelp": "Description of service shown in login screens and UI.",
"admin.team.brandDescriptionTitle": "Site Description",
"admin.team.brandDescriptionHelp": "Description of service shown in login screens and UI. When not specified, \"All team communication in one place, searchable and accessible anywhere\" is displayed.",
"admin.team.brandDescriptionTitle": "Site Description: ",
"admin.team.brandImageTitle": "Custom Brand Image:",
"admin.team.brandTextDescription": "The custom branding Markdown-formatted text you would like to appear below your custom brand image on your login screen.",
"admin.team.brandTextDescription": "Text that will appear below your custom brand image on your login screen. Supports Markdown-formatted text. Maximum 500 characters allowed.",
"admin.team.brandTextTitle": "Custom Brand Text:",
"admin.team.brandTitle": "Enable Custom Branding: ",
"admin.team.chooseImage": "Choose New Image",
Expand All @@ -801,7 +801,7 @@
"admin.team.teamCreationDescription": "When false, only System Administrators can create teams.",
"admin.team.teamCreationTitle": "Enable Team Creation: ",
"admin.team.upload": "Upload",
"admin.team.uploadDesc": "Customize your user experience by adding a custom image to your login screen. See examples at <a href='http://docs.mattermost.com/administration/config-settings.html#custom-branding' target='_blank'>docs.mattermost.com/administration/config-settings.html#custom-branding</a>.",
"admin.team.uploadDesc": "Customize your user experience by adding a custom image to your login screen. Recommended maximum image size is less than 2 MB.",
"admin.team.uploaded": "Uploaded!",
"admin.team.uploading": "Uploading..",
"admin.team.userCreationDescription": "When false, the ability to create accounts is disabled. The create account button displays error when pressed.",
Expand Down

0 comments on commit 6e9e41e

Please sign in to comment.