From 0dfac9875ef6f5f20318a3ef542b11592da8480e Mon Sep 17 00:00:00 2001 From: Joram Wilander Date: Mon, 30 May 2016 09:59:53 -0400 Subject: Add license expiry messages (#3153) --- webapp/components/admin_console/banner.jsx | 40 +++++++++++++++++++++++ webapp/components/admin_console/ldap_settings.jsx | 37 +++++++++------------ 2 files changed, 55 insertions(+), 22 deletions(-) create mode 100644 webapp/components/admin_console/banner.jsx (limited to 'webapp/components/admin_console') diff --git a/webapp/components/admin_console/banner.jsx b/webapp/components/admin_console/banner.jsx new file mode 100644 index 000000000..2071fff93 --- /dev/null +++ b/webapp/components/admin_console/banner.jsx @@ -0,0 +1,40 @@ +// Copyright (c) 2016 Mattermost, Inc. All Rights Reserved. +// See License.txt for license information. + +import React from 'react'; +import {FormattedMessage} from 'react-intl'; + +export default class Banner extends React.Component { + render() { + let title = ( + + ); + + if (this.props.title) { + title = this.props.title; + } + + return ( +
+
+

+ {title} +

+

+ {this.props.description} +

+
+
+ ); + } +} + +Banner.defaultProps = { +}; +Banner.propTypes = { + title: React.PropTypes.node, + description: React.PropTypes.node.isRequired +}; diff --git a/webapp/components/admin_console/ldap_settings.jsx b/webapp/components/admin_console/ldap_settings.jsx index d47a1f8c2..80c1a7867 100644 --- a/webapp/components/admin_console/ldap_settings.jsx +++ b/webapp/components/admin_console/ldap_settings.jsx @@ -1,17 +1,18 @@ // Copyright (c) 2015 Mattermost, Inc. All Rights Reserved. // See License.txt for license information. -import React from 'react'; - -import * as Utils from 'utils/utils.jsx'; - import AdminSettings from './admin_settings.jsx'; +import Banner from './banner.jsx'; import BooleanSetting from './boolean_setting.jsx'; import ConnectionSecurityDropdownSetting from './connection_security_dropdown_setting.jsx'; -import {FormattedMessage} from 'react-intl'; import SettingsGroup from './settings_group.jsx'; import TextSetting from './text_setting.jsx'; +import * as Utils from 'utils/utils.jsx'; + +import React from 'react'; +import {FormattedMessage} from 'react-intl'; + export default class LdapSettings extends AdminSettings { constructor(props) { super(props); @@ -90,22 +91,14 @@ export default class LdapSettings extends AdminSettings { } > -
-
-

- -

-

- -

-
-
+ + } + /> ); } -} \ No newline at end of file +} -- cgit v1.2.3-1-g7c22