From 49ab8b216191749bd39694d79f687a84ad24adf0 Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 11 Apr 2016 13:45:03 -0400 Subject: Add custom branding functionality (#2667) --- webapp/components/login/login.jsx | 66 ++++++++++++++++++++++++++++----------- 1 file changed, 48 insertions(+), 18 deletions(-) (limited to 'webapp/components/login/login.jsx') diff --git a/webapp/components/login/login.jsx b/webapp/components/login/login.jsx index ed7495b13..a3dadbf36 100644 --- a/webapp/components/login/login.jsx +++ b/webapp/components/login/login.jsx @@ -9,6 +9,7 @@ import LoginMfa from './components/login_mfa.jsx'; import TeamStore from 'stores/team_store.jsx'; import UserStore from 'stores/user_store.jsx'; +import * as TextFormatting from 'utils/text_formatting.jsx'; import * as Client from 'utils/client.jsx'; import * as Utils from 'utils/utils.jsx'; import Constants from 'utils/constants.jsx'; @@ -134,6 +135,24 @@ export default class Login extends React.Component { ); } } + createCustomLogin() { + if (global.window.mm_license.IsLicensed === 'true' && + global.window.mm_license.CustomBrand === 'true' && + global.window.mm_config.EnableCustomBrand === 'true') { + const text = global.window.mm_config.CustomBrandText || ''; + + return ( +
+ +

+

+ ); + } + + return null; + } createLoginOptions(currentTeam) { const extraParam = Utils.getUrlParameter('extra'); let extraBox = ''; @@ -364,6 +383,8 @@ export default class Login extends React.Component { } let content; + let customContent; + let customClass; if (this.state.showMfa) { content = (
-
-
- -
-

{currentTeam.display_name}

-

- -

- {content} +
+
+ {customContent} +
+
+
+ +
+

{currentTeam.display_name}

+

+ +

+ {content} +
-- cgit v1.2.3-1-g7c22