mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
add request action loan to piece
This commit is contained in:
parent
82cc53fdc5
commit
ea9fb306c4
@ -107,7 +107,6 @@ let Edition = React.createClass({
|
|||||||
},
|
},
|
||||||
|
|
||||||
render() {
|
render() {
|
||||||
console.log(!!this.props.edition.public_note || this.props.edition.acl.acl_edit)
|
|
||||||
return (
|
return (
|
||||||
<Row>
|
<Row>
|
||||||
<Col md={6}>
|
<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({
|
let CoaDetails = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
edition: React.PropTypes.object
|
edition: React.PropTypes.object
|
||||||
|
Loading…
x
Reference in New Issue
Block a user