const React = require('react'); import ShareContextConsumer from '../ShareContextConsumer' const {Checkbox, RaisedButton, TextField} = require('material-ui') import Card from '../main/Card' let VisibilityPanel = React.createClass({ toggleVisibility: function(){ this.props.shareModel.toggleVisibility(); }, transferOwnership: function(){ this.props.shareModel.setNewShareOwner(this.refs['newOwner'].getValue()); }, render: function(){ var currentIsOwner = this.props.shareModel.currentIsOwner(); var legend; if(this.props.shareModel.isPublic()){ if(currentIsOwner){ legend = this.props.getMessage('201'); }else{ legend = this.props.getMessage('202'); } }else{ legend = this.props.getMessage('206'); } var showToggle = (