summaryrefslogtreecommitdiff
path: root/ui/app/components/wizard
diff options
context:
space:
mode:
authorelijah <elijah@riseup.net>2016-09-27 12:16:43 -0700
committerelijah <elijah@riseup.net>2016-09-29 11:57:53 -0700
commitdfe5598c5d1d877d2c23bdb002e89eac869f9613 (patch)
treeb57da9708d4eb9479ed1aa2f17fd9f803a36939c /ui/app/components/wizard
parent372b6cfc13494b95028d4ec531b842685ecf370a (diff)
[bug] Display language and services correctly in provider wizard
Diffstat (limited to 'ui/app/components/wizard')
-rw-r--r--ui/app/components/wizard/provider_select_stage.js13
1 files changed, 11 insertions, 2 deletions
diff --git a/ui/app/components/wizard/provider_select_stage.js b/ui/app/components/wizard/provider_select_stage.js
index 19799f8..e33310b 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 = (
<div>
<h1 className="first">{this.state.provider.name}</h1>
<h3>{this.state.provider.domain}</h3>
<p>{this.state.provider.description}</p>
<p><b>Enrollment Policy:</b> {this.state.provider.enrollment_policy}</p>
- <p><b>Services</b>: {this.state.provider.services}</p>
- <p><b>Languages</b>: {this.state.provider.languages.join(', ')}</p>
+ <p><b>Services</b>: {services}</p>
+ <p><b>Languages</b>: {languages.join(', ')}</p>
</div>
)
} else if (this.state.error) {