mirror of
https://github.com/ascribe/onion.git
synced 2025-01-03 10:25:08 +01:00
PR update
This commit is contained in:
parent
63fffc2132
commit
ff163df61e
@ -152,8 +152,9 @@ let Edition = React.createClass({
|
||||
|
||||
<CollapsibleParagraph
|
||||
title="Notes"
|
||||
show={(!!this.state.currentUser.username) ||
|
||||
(this.props.edition.acl.acl_edit || this.props.edition.public_note)}>
|
||||
show={!!(this.state.currentUser.username
|
||||
|| this.props.edition.acl.acl_edit
|
||||
|| this.props.edition.public_note)}>
|
||||
<Note
|
||||
id={() => {return {'bitcoin_id': this.props.edition.bitcoin_id}; }}
|
||||
label={getLangText('Personal note (private)')}
|
||||
|
@ -237,12 +237,11 @@ let PieceContainer = React.createClass({
|
||||
</CollapsibleParagraph>
|
||||
<CollapsibleParagraph
|
||||
title={getLangText('Notes')}
|
||||
show={(!!this.state.currentUser.username) ||
|
||||
(this.state.piece.public_note)}>
|
||||
show={!!(this.state.currentUser.username || this.state.piece.public_note)}>
|
||||
<Note
|
||||
id={this.getId}
|
||||
label={getLangText('Personal note (private)')}
|
||||
defaultValue={this.state.piece.private_note ? this.state.piece.private_note : null}
|
||||
defaultValue={this.state.piece.private_note || null}
|
||||
placeholder={getLangText('Enter your comments ...')}
|
||||
editable={true}
|
||||
successMessage={getLangText('Private note saved')}
|
||||
|
@ -49,7 +49,7 @@ let CopyrightAssociationForm = React.createClass({
|
||||
style={{paddingBottom: 0}}>
|
||||
<select name="contract">
|
||||
<option disabled selected={selectedState === -1}>
|
||||
{getLangText(' -- select an association -- ')}
|
||||
{' -- ' + getLangText('select an association') + ' -- '}
|
||||
</option>
|
||||
{AppConstants.copyrightAssociations.map((association, i) => {
|
||||
return (
|
||||
|
@ -95,7 +95,7 @@ let LoginForm = React.createClass({
|
||||
},
|
||||
|
||||
render() {
|
||||
let email = this.getQuery().email ? this.getQuery().email : null;
|
||||
let email = this.getQuery().email || null;
|
||||
return (
|
||||
<Form
|
||||
className="ascribe-form-bordered"
|
||||
|
@ -77,7 +77,7 @@ let SignupForm = React.createClass({
|
||||
let tooltipPassword = getLangText('Your password must be at least 10 characters') + '.\n ' +
|
||||
getLangText('This password is securing your digital property like a bank account') + '.\n ' +
|
||||
getLangText('Store it in a safe place') + '!';
|
||||
let email = this.getQuery().email ? this.getQuery().email : null;
|
||||
let email = this.getQuery().email || null;
|
||||
return (
|
||||
<Form
|
||||
className="ascribe-form-bordered"
|
||||
|
@ -98,12 +98,11 @@ let CylandPieceContainer = React.createClass({
|
||||
</CollapsibleParagraph>
|
||||
<CollapsibleParagraph
|
||||
title={getLangText('Notes')}
|
||||
show={(!!this.state.currentUser.username) ||
|
||||
(this.state.piece.public_note)}>
|
||||
show={!!(this.state.currentUser.username || this.state.piece.public_note)}>
|
||||
<Note
|
||||
id={() => {return {'id': this.state.piece.id}; }}
|
||||
label={getLangText('Personal note (private)')}
|
||||
defaultValue={this.state.piece.private_note ? this.state.piece.private_note : null}
|
||||
defaultValue={this.state.piece.private_note || null}
|
||||
placeholder={getLangText('Enter your comments ...')}
|
||||
editable={true}
|
||||
successMessage={getLangText('Private note saved')}
|
||||
|
@ -97,12 +97,11 @@ let IkonotvPieceContainer = React.createClass({
|
||||
</CollapsibleParagraph>
|
||||
<CollapsibleParagraph
|
||||
title={getLangText('Notes')}
|
||||
show={(!!this.state.currentUser.username) ||
|
||||
(this.state.piece.public_note)}>
|
||||
show={!!(this.state.currentUser.username || this.state.piece.public_note)}>
|
||||
<Note
|
||||
id={() => {return {'id': this.state.piece.id}; }}
|
||||
label={getLangText('Personal note (private)')}
|
||||
defaultValue={this.state.piece.private_note ? this.state.piece.private_note : null}
|
||||
defaultValue={this.state.piece.private_note || null}
|
||||
placeholder={getLangText('Enter your comments ...')}
|
||||
editable={true}
|
||||
successMessage={getLangText('Private note saved')}
|
||||
|
@ -12,6 +12,8 @@ import NotificationStore from '../../../../../stores/notification_store';
|
||||
import UserActions from '../../../../../actions/user_actions';
|
||||
import UserStore from '../../../../../stores/user_store';
|
||||
|
||||
import OwnershipFetcher from '../../../../../fetchers/ownership_fetcher';
|
||||
|
||||
import WhitelabelStore from '../../../../../stores/whitelabel_store';
|
||||
import WhitelabelActions from '../../../../../actions/whitelabel_actions';
|
||||
|
||||
@ -21,9 +23,7 @@ import GlobalNotificationActions from '../../../../../actions/global_notificatio
|
||||
import CopyrightAssociationForm from '../../../../ascribe_forms/form_copyright_association';
|
||||
|
||||
import AppConstants from '../../../../../constants/application_constants';
|
||||
import ApiUrls from '../../../../../constants/api_urls';
|
||||
|
||||
import requests from '../../../../../utils/requests';
|
||||
import { getLangText } from '../../../../../utils/lang_utils';
|
||||
import { mergeOptions } from '../../../../../utils/general_utils';
|
||||
|
||||
@ -110,7 +110,7 @@ let IkonotvContractNotifications = React.createClass({
|
||||
|
||||
handleConfirm() {
|
||||
let contractAgreement = this.state.contractAgreementListNotifications[0].contract_agreement;
|
||||
requests.put(ApiUrls.ownership_contract_agreements_confirm, {contract_agreement_id: contractAgreement.id}).then(
|
||||
OwnershipFetcher.confirmContractAgreement(contractAgreement).then(
|
||||
() => this.handleConfirmSuccess()
|
||||
);
|
||||
},
|
||||
@ -123,7 +123,7 @@ let IkonotvContractNotifications = React.createClass({
|
||||
|
||||
handleDeny() {
|
||||
let contractAgreement = this.state.contractAgreementListNotifications[0].contract_agreement;
|
||||
requests.put(ApiUrls.ownership_contract_agreements_deny, {contract_agreement_id: contractAgreement.id}).then(
|
||||
OwnershipFetcher.denyContractAgreement(contractAgreement).then(
|
||||
() => this.handleDenySuccess()
|
||||
);
|
||||
},
|
||||
@ -135,11 +135,9 @@ let IkonotvContractNotifications = React.createClass({
|
||||
},
|
||||
|
||||
getCopyrightAssociationForm(){
|
||||
if (this.state.currentUser && this.state.currentUser.profile
|
||||
&& this.state.currentUser.profile.copyright_association){
|
||||
return null;
|
||||
}
|
||||
if (this.state.currentUser && this.state.currentUser.profile) {
|
||||
let c = this.state.currentUser;
|
||||
|
||||
if (c && c.profile && !c.profile.copyright_association) {
|
||||
return (
|
||||
<div className='notification-contract-footer'>
|
||||
<h1>{getLangText('Are you a member of any copyright societies?')}</h1>
|
||||
|
@ -31,7 +31,7 @@ let IkonotvLanding = React.createClass({
|
||||
},
|
||||
|
||||
getEnterButton() {
|
||||
let redirect = 'signup';
|
||||
let redirect = 'login';
|
||||
|
||||
if(this.state.currentUser && this.state.currentUser.email) {
|
||||
redirect = 'pieces';
|
||||
@ -39,7 +39,6 @@ let IkonotvLanding = React.createClass({
|
||||
else if (this.getQuery() && this.getQuery().redirect) {
|
||||
redirect = this.getQuery().redirect;
|
||||
}
|
||||
console.log(redirect);
|
||||
return (
|
||||
<ButtonLink to={redirect} query={this.getQuery()}>
|
||||
{getLangText('ENTER')}
|
||||
|
@ -165,14 +165,8 @@ let IkonotvRegisterPiece = React.createClass({
|
||||
},
|
||||
|
||||
canSubmit() {
|
||||
if (this.state.currentUser && this.state.currentUser.acl) {
|
||||
return (
|
||||
this.state.currentUser
|
||||
&& this.state.currentUser.acl
|
||||
&& !!this.state.currentUser.acl.acl_submit
|
||||
);
|
||||
}
|
||||
return false;
|
||||
let c = this.state.currentUser;
|
||||
return c && c.acl && c.acl.acl_submit;
|
||||
},
|
||||
|
||||
getSlideArtistDetails() {
|
||||
|
@ -44,6 +44,14 @@ let OwnershipFetcher = {
|
||||
return requests.get(ApiUrls.ownership_contract_agreements, queryParams);
|
||||
},
|
||||
|
||||
confirmContractAgreement(contractAgreement){
|
||||
return requests.put(ApiUrls.ownership_contract_agreements_confirm, {contract_agreement_id: contractAgreement.id});
|
||||
},
|
||||
|
||||
denyContractAgreement(contractAgreement){
|
||||
return requests.put(ApiUrls.ownership_contract_agreements_deny, {contract_agreement_id: contractAgreement.id});
|
||||
},
|
||||
|
||||
fetchLoanPieceRequestList(){
|
||||
return requests.get(ApiUrls.ownership_loans_pieces_request);
|
||||
},
|
||||
|
Loading…
Reference in New Issue
Block a user