import React from 'react'; import { Button } from 'react-bootstrap'; import Card from '../components/card.jsx'; import { app } from '../core/app'; import { format } from '../commons/utils'; export default class Success extends React.Component { constructor(props) { super(props); this.contClick = this.contClick.bind(this); } /** * Called when user clicks on the continue button */ contClick() { app.setState({ login: 'admin' }); app.goto('/pub/login'); } /** * Render the component */ render() { const msg = this.props.wsname; return React.createElement( 'div', { className: 'container central-container-md' }, React.createElement( Card, null, React.createElement( 'div', { className: 'text-center' }, React.createElement( 'h3', null, __('init.ws.name') ), React.createElement('br', null), React.createElement('i', { className: 'fa fa-check-circle fa-4x text-success' }), React.createElement('br', null), React.createElement( 'p', { className: 'mtop-2x' }, format(__('init.ws.success'), msg) ) ), React.createElement( 'div', null, React.createElement( Button, { bsStyle: 'default', block: true, onClick: this.contClick }, __('init.ws.gotologin') ) ) ) ); } } Success.propTypes = { wsname: React.PropTypes.string };