diff options
author | David Lu <david.lu@hotmail.com> | 2016-08-02 08:34:34 -0400 |
---|---|---|
committer | Joram Wilander <jwawilander@gmail.com> | 2016-08-02 08:34:34 -0400 |
commit | 2c23a4fe4907f826013571afdae6db52895f576e (patch) | |
tree | c485d6685570daed65bf956574ee1be9006152bd /webapp | |
parent | 42e74b509dc8a1be7798c030b1ad80f6c2755a73 (diff) | |
download | chat-2c23a4fe4907f826013571afdae6db52895f576e.tar.gz chat-2c23a4fe4907f826013571afdae6db52895f576e.tar.bz2 chat-2c23a4fe4907f826013571afdae6db52895f576e.zip |
Added custom branding to login description (#3710)
Diffstat (limited to 'webapp')
-rw-r--r-- | webapp/components/admin_console/custom_brand_settings.jsx | 28 | ||||
-rw-r--r-- | webapp/components/create_team/create_team_controller.jsx | 16 | ||||
-rw-r--r-- | webapp/components/login/login_controller.jsx | 16 | ||||
-rw-r--r-- | webapp/components/select_team/select_team.jsx | 16 | ||||
-rw-r--r-- | webapp/components/signup_user_complete.jsx | 16 | ||||
-rw-r--r-- | webapp/i18n/en.json | 5 |
6 files changed, 83 insertions, 14 deletions
diff --git a/webapp/components/admin_console/custom_brand_settings.jsx b/webapp/components/admin_console/custom_brand_settings.jsx index b4026c4a9..a54768fb8 100644 --- a/webapp/components/admin_console/custom_brand_settings.jsx +++ b/webapp/components/admin_console/custom_brand_settings.jsx @@ -27,6 +27,7 @@ export default class CustomBrandSettings extends AdminSettings { if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true') { config.TeamSettings.EnableCustomBrand = this.state.enableCustomBrand; config.TeamSettings.CustomBrandText = this.state.customBrandText; + config.TeamSettings.customDescriptionText = this.state.customDescriptionText; } return config; @@ -36,7 +37,8 @@ export default class CustomBrandSettings extends AdminSettings { return { siteName: config.TeamSettings.SiteName, enableCustomBrand: config.TeamSettings.EnableCustomBrand, - customBrandText: config.TeamSettings.CustomBrandText + customBrandText: config.TeamSettings.CustomBrandText, + customDescriptionText: config.TeamSettings.CustomDescriptionText }; } @@ -104,6 +106,30 @@ export default class CustomBrandSettings extends AdminSettings { 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 ( diff --git a/webapp/components/create_team/create_team_controller.jsx b/webapp/components/create_team/create_team_controller.jsx index 47df82a57..77a7f659f 100644 --- a/webapp/components/create_team/create_team_controller.jsx +++ b/webapp/components/create_team/create_team_controller.jsx @@ -35,6 +35,18 @@ export default class CreateTeamController extends React.Component { } render() { + let description = null; + if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true' && global.window.mm_config.EnableCustomBrand === 'true') { + description = global.window.mm_config.CustomDescriptionText; + } else { + description = ( + <FormattedMessage + id='web.root.signup_info' + defaultMessage='All team communication in one place, searchable and accessible anywhere' + /> + ); + } + return ( <div> <ErrorBar/> @@ -50,9 +62,7 @@ export default class CreateTeamController extends React.Component { <div className='signup-team__container'> <h1>{global.window.mm_config.SiteName}</h1> <h4 className='color--light'> - <FormattedMessage - id='web.root.singup_info' - /> + {description} </h4> <div className='signup__content'> {React.cloneElement(this.props.children, { diff --git a/webapp/components/login/login_controller.jsx b/webapp/components/login/login_controller.jsx index 4a4c5cb0a..52f36bb2a 100644 --- a/webapp/components/login/login_controller.jsx +++ b/webapp/components/login/login_controller.jsx @@ -549,6 +549,18 @@ export default class LoginController extends React.Component { } } + let description = null; + if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true' && global.window.mm_config.EnableCustomBrand === 'true') { + description = global.window.mm_config.CustomDescriptionText; + } else { + description = ( + <FormattedMessage + id='web.root.signup_info' + defaultMessage='All team communication in one place, searchable and accessible anywhere' + /> + ); + } + return ( <div> <ErrorBar/> @@ -564,9 +576,7 @@ export default class LoginController extends React.Component { <div className='signup__content'> <h1>{global.window.mm_config.SiteName}</h1> <h4 className='color--light'> - <FormattedMessage - id='web.root.singup_info' - /> + {description} </h4> {content} </div> diff --git a/webapp/components/select_team/select_team.jsx b/webapp/components/select_team/select_team.jsx index f7d5b14b0..f1816238b 100644 --- a/webapp/components/select_team/select_team.jsx +++ b/webapp/components/select_team/select_team.jsx @@ -212,6 +212,18 @@ export default class SelectTeam extends React.Component { ); } + let description = null; + if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true' && global.window.mm_config.EnableCustomBrand === 'true') { + description = global.window.mm_config.CustomDescriptionText; + } else { + description = ( + <FormattedMessage + id='web.root.signup_info' + defaultMessage='All team communication in one place, searchable and accessible anywhere' + /> + ); + } + return ( <div> <ErrorBar/> @@ -234,9 +246,7 @@ export default class SelectTeam extends React.Component { /> <h1>{global.window.mm_config.SiteName}</h1> <h4 className='color--light'> - <FormattedMessage - id='web.root.singup_info' - /> + {description} </h4> {content} {openContent} diff --git a/webapp/components/signup_user_complete.jsx b/webapp/components/signup_user_complete.jsx index 3cd6fb27b..167b41ea1 100644 --- a/webapp/components/signup_user_complete.jsx +++ b/webapp/components/signup_user_complete.jsx @@ -765,6 +765,18 @@ export default class SignupUserComplete extends React.Component { ldapSignup = null; } + let description = null; + if (global.window.mm_license.IsLicensed === 'true' && global.window.mm_license.CustomBrand === 'true' && global.window.mm_config.EnableCustomBrand === 'true') { + description = global.window.mm_config.CustomDescriptionText; + } else { + description = ( + <FormattedMessage + id='web.root.signup_info' + defaultMessage='All team communication in one place, searchable and accessible anywhere' + /> + ); + } + return ( <div> <div className='signup-header'> @@ -783,9 +795,7 @@ export default class SignupUserComplete extends React.Component { /> <h1>{global.window.mm_config.SiteName}</h1> <h4 className='color--light'> - <FormattedMessage - id='web.root.singup_info' - /> + {description} </h4> <h4 className='color--light'> <FormattedMessage diff --git a/webapp/i18n/en.json b/webapp/i18n/en.json index 1ca9ebd6d..f0c16bef7 100644 --- a/webapp/i18n/en.json +++ b/webapp/i18n/en.json @@ -691,6 +691,9 @@ "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.brandTextTitle": "Custom Brand Text:", "admin.team.brandTitle": "Enable Custom Branding: ", + "admin.team.brandDescriptionTitle": "Site Description", + "admin.team.brandDescriptionHelp": "Description of service shown in login screens and UI.", + "admin.team.brandDescriptionExample": "All team communication in one place, searchable and accessible anywhere", "admin.team.chooseImage": "Choose New Image", "admin.team.dirDesc": "When true, teams that are configured to show in team directory will show on main page inplace of creating a new team.", "admin.team.dirTitle": "Enable Team Directory: ", @@ -1748,6 +1751,6 @@ "web.footer.privacy": "Privacy", "web.footer.terms": "Terms", "web.header.back": "Back", - "web.root.singup_info": "All team communication in one place, searchable and accessible anywhere", + "web.root.signup_info": "All team communication in one place, searchable and accessible anywhere", "youtube_video.notFound": "Video not found" } |