Resolve PR comments

This commit is contained in:
Brett Sun 2016-06-17 18:26:38 +02:00
parent 685ac0d941
commit 9c47c22e91
3 changed files with 4 additions and 6 deletions

View File

@ -73,7 +73,7 @@ const InputContractAgreementCheckbox = React.createClass({
// If there is no contract available, hide this `Property` from the user
this.props.setExpanded(!!contractAgreement);
state = Object.assign(state, {
this.setState({
value: {
// If `email` is defined in this component, `getContractAgreementsOrCreatePublic`
// is either:
@ -93,8 +93,6 @@ const InputContractAgreementCheckbox = React.createClass({
terms: !contractAgreement || !!contractAgreement.datetime_accepted
}
});
this.setState(state);
},
onChange(event) {

View File

@ -76,7 +76,7 @@ const FileDragAndDropPreview = React.createClass({
if (numberOfDisplayedFiles === 1) {
return (
<span className="file-name">
{truncateText(file.name, 30, '(...).' + extractFileExtensionFromString(file.name))}
{truncateText(file.name, 30, `(...).${extractFileExtensionFromString(file.name)}`)}
</span>
);
} else {

View File

@ -127,7 +127,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm', sho
if (uploadingFiles.length) {
return (
<span>
{' ' + truncateText(uploadingFiles[0].name, 40) + ' '}
{` ${truncateText(uploadingFiles[0].name, 40)} `}
[<a onClick={this.onClickRemove}>{getLangText('cancel upload')}</a>]
</span>
);
@ -135,7 +135,7 @@ export default function UploadButton({ className = 'btn btn-default btn-sm', sho
return (
<span>
<span className='ascribe-icon icon-ascribe-ok'/>
{' ' + truncateText(uploadedFile.name, 40) + ' '}
{` ${truncateText(uploadedFile.name, 40)} `}
[<a onClick={this.onClickRemove}>{getLangText('remove')}</a>]
</span>
);