'use strict'; import React from 'react'; import classnames from 'classnames'; import Button from 'react-bootstrap/lib/Button'; import { InformationTexts } from '../../constants/information_text'; import { replaceSubstringAtIndex, sanitize } from '../../utils/general_utils'; import { intersectAcls } from '../../utils/acl_utils'; import { getLangText } from '../../utils/lang_utils'; let AclInformation = React.createClass({ propTypes: { verbs: React.PropTypes.arrayOf(React.PropTypes.string), aim: React.PropTypes.string.isRequired, aclObject: React.PropTypes.object }, getInitialState() { return { isVisible: false }; }, componentDidMount() { this.dropdownButtonStyle = { background: 'none', color: 'black', padding: 0, border: 'none' }; this.dropdownListStyle = { textAlign: 'justify', width: '80.8%', border: '1px solid #CCC', backgroundColor: 'white', padding: '0.5em' }; }, onOff() { if(!this.state.isVisible) { this.setState({ isVisible: true }); } else { this.setState({ isVisible: false }); } }, getInfoText(title, info, example){ let titleStyle = { color: '#02B6A3', fontSize: '11px', lineHeight: '3px' }; let infoStyle = { color: '#333333', fontSize: '11px', lineHeight: '3px' }; let exampleStyle = { color: '#B2B2B2', fontSize: '11px', lineHeight: '3px' }; let paragraphStyle = { margin: '.5em', lineHeight: '15px', align: 'justify' }; let aim = this.props.aim; if (aim) { if (aim === 'form') { return (
{replaceSubstringAtIndex(info.slice(2), 's ', ' ')}
{example}
{title}
{info}
{example}