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