From dfe5598c5d1d877d2c23bdb002e89eac869f9613 Mon Sep 17 00:00:00 2001 From: elijah Date: Tue, 27 Sep 2016 12:16:43 -0700 Subject: [bug] Display language and services correctly in provider wizard --- ui/app/components/wizard/provider_select_stage.js | 13 +++++++++++-- 1 file changed, 11 insertions(+), 2 deletions(-) (limited to 'ui/app/components') diff --git a/ui/app/components/wizard/provider_select_stage.js b/ui/app/components/wizard/provider_select_stage.js index 19799f86..e33310b2 100644 --- a/ui/app/components/wizard/provider_select_stage.js +++ b/ui/app/components/wizard/provider_select_stage.js @@ -3,6 +3,7 @@ import {Button, ButtonGroup, ButtonToolbar, Glyphicon} from 'react-bootstrap' import App from 'app' import Provider from 'models/provider' +import Language from 'lib/language' import ListEditor from 'components/list_editor' import {HorizontalLayout, Column} from 'components/layout' @@ -10,6 +11,12 @@ import {HorizontalLayout, Column} from 'components/layout' import StageLayout from './stage_layout' import AddProviderModal from './add_provider_modal' +const SERVICE_MAP = { + mx: "Mail", + openvpn: "VPN", + chat: "Chat" +} + export default class ProviderSelectStage extends React.Component { static get defaultProps() {return{ @@ -131,14 +138,16 @@ export default class ProviderSelectStage extends React.Component { let modal = null let info = null if (this.state.provider) { + let languages = this.state.provider.languages.map(code => Language.find(code).name) + let services = this.state.provider.services.map(code => SERVICE_MAP[code] || '????') info = (

{this.state.provider.name}

{this.state.provider.domain}

{this.state.provider.description}

Enrollment Policy: {this.state.provider.enrollment_policy}

-

Services: {this.state.provider.services}

-

Languages: {this.state.provider.languages.join(', ')}

+

Services: {services}

+

Languages: {languages.join(', ')}

) } else if (this.state.error) { -- cgit v1.2.3