1
0
mirror of https://github.com/ascribe/onion.git synced 2024-06-28 00:28:00 +02:00

add request action loan to piece

This commit is contained in:
diminator 2015-08-21 16:22:08 +02:00
parent 82cc53fdc5
commit ea9fb306c4

View File

@ -107,7 +107,6 @@ let Edition = React.createClass({
},
render() {
console.log(!!this.props.edition.public_note || this.props.edition.acl.acl_edit)
return (
<Row>
<Col md={6}>
@ -315,84 +314,6 @@ let EditionSummary = React.createClass({
});
let EditionPersonalNote = React.createClass({
propTypes: {
edition: React.PropTypes.object,
currentUser: React.PropTypes.object,
handleSuccess: React.PropTypes.func
},
showNotification(){
this.props.handleSuccess();
let notification = new GlobalNotificationModel(getLangText('Private note saved'), 'success');
GlobalNotificationActions.appendGlobalNotification(notification);
},
render() {
if (this.props.currentUser.username && true || false) {
return (
<Form
url={ApiUrls.note_private_edition}
handleSuccess={this.showNotification}>
<Property
name='note'
label={getLangText('Personal note (private)')}
editable={true}>
<InputTextAreaToggable
rows={1}
editable={true}
defaultValue={this.props.edition.note_from_user}
placeholder={getLangText('Enter a personal note%s', '...')}/>
</Property>
<Property hidden={true} name='bitcoin_id'>
<input defaultValue={this.props.edition.bitcoin_id}/>
</Property>
<hr />
</Form>
);
}
return null;
}
});
let EditionPublicEditionNote = React.createClass({
propTypes: {
edition: React.PropTypes.object,
handleSuccess: React.PropTypes.func
},
showNotification(){
this.props.handleSuccess();
let notification = new GlobalNotificationModel(getLangText('Public note saved'), 'success');
GlobalNotificationActions.appendGlobalNotification(notification);
},
render() {
let isEditable = this.props.edition.acl.acl_edit;
if (isEditable || this.props.edition.public_note){
return (
<Form
url={ApiUrls.note_edition}
handleSuccess={this.showNotification}>
<Property
name='note'
label={getLangText('Edition note (public)')}
editable={isEditable}>
<InputTextAreaToggable
rows={1}
editable={isEditable}
defaultValue={this.props.edition.public_note}
placeholder={getLangText('Enter a public note for this edition%s', '...')}
required="required"/>
</Property>
<Property hidden={true} name='bitcoin_id'>
<input defaultValue={this.props.edition.bitcoin_id}/>
</Property>
<hr />
</Form>
);
}
return null;
}
});
let CoaDetails = React.createClass({
propTypes: {
edition: React.PropTypes.object