diff --git a/js/components/ascribe_forms/form_loan.js b/js/components/ascribe_forms/form_loan.js
index eb709714..a204fb87 100644
--- a/js/components/ascribe_forms/form_loan.js
+++ b/js/components/ascribe_forms/form_loan.js
@@ -210,7 +210,7 @@ let LoanForm = React.createClass({
+ required={showPassword}/>
{children}
diff --git a/js/components/ascribe_forms/input_contract_agreement_checkbox.js b/js/components/ascribe_forms/input_contract_agreement_checkbox.js
index c609786e..61235631 100644
--- a/js/components/ascribe_forms/input_contract_agreement_checkbox.js
+++ b/js/components/ascribe_forms/input_contract_agreement_checkbox.js
@@ -53,12 +53,10 @@ const InputContractAgreementCheckbox = React.createClass({
},
componentWillReceiveProps({ email: nextEmail }) {
- const { contractAgreementList } = this.state;
-
if (this.props.email !== nextEmail) {
if (isEmail(nextEmail)) {
this.getContractAgreementsOrCreatePublic(nextEmail);
- } else if (contractAgreementList && contractAgreementList.length > 0) {
+ } else if (this.getContractAgreement()) {
ContractAgreementListActions.flushContractAgreementList();
}
}
@@ -69,7 +67,9 @@ const InputContractAgreementCheckbox = React.createClass({
},
onStoreChange(state) {
- const contractAgreement = this.getContractAgreement(state.contractAgreementList);
+ const contractAgreement = this.getContractAgreement(state.contractAgreementList);
+
+ // If there is no contract available, hide this `Property` from the user
this.props.setExpanded(!!contractAgreement);
state = mergeOptions(state, {
@@ -97,16 +97,21 @@ const InputContractAgreementCheckbox = React.createClass({
},
onChange(event) {
+ // Sync the value between our `InputCheckbox` and this component's `terms`
+ // so the parent `Property` is able to get the correct value of this component
+ // when the `Form` queries it.
this.setState({
value: React.addons.update(this.state.value, {
terms: { $set: event.target.value }
})
});
+
+ // Propagate change events from the checkbox up to the parent `Property`
this.props.onChange(event);
},
getContractAgreement(contractAgreementList = this.state.contractAgreementList) {
- if (contractAgreementList && contractAgreementList.length > 0) {
+ if (contractAgreementList && contractAgreementList.length) {
return contractAgreementList[0];
}
},
diff --git a/js/components/ascribe_forms/input_fineuploader.js b/js/components/ascribe_forms/input_fineuploader.js
index 1a9889db..6d3a3e81 100644
--- a/js/components/ascribe_forms/input_fineuploader.js
+++ b/js/components/ascribe_forms/input_fineuploader.js
@@ -96,18 +96,21 @@ const InputFineUploader = React.createClass({
},
render() {
- const { fileInputElement,
- keyRoutine,
- createBlobRoutine,
- validation,
- setIsUploadReady,
- isReadyForFormSubmission,
- areAssetsDownloadable,
- enableLocalHashing,
- uploadMethod,
- fileClassToUpload,
- disabled } = this.props;
- let editable = this.props.isFineUploaderActive;
+ const {
+ areAssetsDownloadable,
+ enableLocalHashing,
+ createBlobRoutine,
+ disabled,
+ fileClassToUpload,
+ fileInputElement,
+ isFineUploaderActive,
+ isReadyForFormSubmission,
+ keyRoutine,
+ setIsUploadReady,
+ uploadMethod,
+ validation } = this.props;
+
+ let editable = isFineUploaderActive;
// if disabled is actually set by property, we want to override
// isFineUploaderActive
diff --git a/js/components/ascribe_forms/property.js b/js/components/ascribe_forms/property.js
index e57c8b3c..479c9602 100644
--- a/js/components/ascribe_forms/property.js
+++ b/js/components/ascribe_forms/property.js
@@ -239,6 +239,10 @@ const Property = React.createClass({
this.setState({ expanded });
},
+ handleCheckboxToggle() {
+ this.setExpanded(!this.state.expanded);
+ },
+
renderChildren(style) {
// Input's props should only be cloned and propagated down the tree,
// if the component is actually being shown (!== 'expanded === false')
@@ -280,10 +284,6 @@ const Property = React.createClass({
}
},
- handleCheckboxToggle() {
- this.setState({expanded: !this.state.expanded});
- },
-
getCheckbox() {
const { checkboxLabel } = this.props;
diff --git a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js
index bb8d4ccc..c9c7f9f4 100644
--- a/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js
+++ b/js/components/ascribe_piece_list_bulk_modal/piece_list_bulk_modal.js
@@ -30,7 +30,7 @@ let PieceListBulkModal = React.createClass({
},
render() {
- if (Object.keys(this.props.availableAcls).length > 0) {
+ if (Object.keys(this.props.availableAcls).length) {
return (
diff --git a/js/components/ascribe_spinner.js b/js/components/ascribe_spinner.js
index e1daf5b2..ad97d484 100644
--- a/js/components/ascribe_spinner.js
+++ b/js/components/ascribe_spinner.js
@@ -7,26 +7,26 @@ let AscribeSpinner = React.createClass({
propTypes: {
classNames: React.PropTypes.string,
size: React.PropTypes.oneOf(['sm', 'md', 'lg']),
- color: React.PropTypes.oneOf(['blue', 'dark-blue', 'light-blue', 'pink', 'black', 'loop'])
+ color: React.PropTypes.oneOf(['black', 'blue', 'dark-blue', 'light-blue', 'pink', 'white', 'loop'])
},
getDefaultProps() {
return {
inline: false,
- size: 'md',
- color: 'loop'
+ size: 'md'
};
},
render() {
+ const { classNames: classes, color, size } = this.props;
+
return (
-
-
A
+ className={classNames('spinner-wrapper-' + size,
+ color ? 'spinner-wrapper-' + color : null,
+ classes)}>
+
+
A
);
}
diff --git a/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js b/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js
index d889a9a0..0bfb8aa0 100644
--- a/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js
+++ b/js/components/whitelabel/wallet/components/23vivi/23vivi_piece_list.js
@@ -6,7 +6,7 @@ import Vivi23AccordionListItemThumbnailPlaceholder from './23vivi_accordion_list
import MarketPieceList from '../market/market_piece_list';
-let vivi23PieceList = React.createClass({
+let Vivi23PieceList = React.createClass({
propTypes: {
location: React.PropTypes.object
},
@@ -21,4 +21,4 @@ let vivi23PieceList = React.createClass({
});
-export default vivi23PieceList;
+export default Vivi23PieceList;
diff --git a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
index c4636911..c40d779d 100644
--- a/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
+++ b/js/components/whitelabel/wallet/components/ikonotv/ikonotv_register_piece.js
@@ -199,7 +199,7 @@ let IkonotvRegisterPiece = React.createClass({
getSlideLoan() {
if (this.canSubmit()) {
- const {piece, whitelabel} = this.state;
+ const { piece, whitelabel } = this.state;
let today = new Moment();
let endDate = new Moment();
endDate.add(2, 'years');
diff --git a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js
index 8e7775a2..d8ef4c41 100644
--- a/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js
+++ b/js/components/whitelabel/wallet/components/market/market_buttons/market_submit_button.js
@@ -144,8 +144,7 @@ let MarketSubmitButton = React.createClass({
} else {
return (
+ show={availableAcls.acl_consign && canSubmit}>
;
if (!isInline) {
buttons = (
@@ -146,7 +150,9 @@ let MarketAdditionalDataForm = React.createClass({
spinner = (
-
+
+ {spinner}
+
);
@@ -169,7 +175,8 @@ let MarketAdditionalDataForm = React.createClass({
handleSuccess={showNotification ? this.handleSuccessWithNotification : handleSuccess}
getFormData={this.getFormData}
buttons={buttons}
- spinner={spinner}>
+ spinner={spinner}
+ disabled={!this.props.editable || !piece.acl.acl_edit}>
{heading}
+ otherData={piece.other_data}
+ editable={editable} />
+ label={getLangText('Artist Bio')}
+ expanded={editable || !!piece.extra_data.artist_bio}>
+ label={getLangText('Work Description')}
+ expanded={editable || !!piece.extra_data.work_description}>
+ label={getLangText('Technology Details')}
+ expanded={editable || !!piece.extra_data.technology_details}>
+ label={getLangText('Display Instructions')}
+ expanded={editable || !!piece.extra_data.display_instructions}>
-
+ {spinner}
);
}
diff --git a/js/components/whitelabel/wallet/components/market/market_register_piece.js b/js/components/whitelabel/wallet/components/market/market_register_piece.js
index e02df80c..eed17477 100644
--- a/js/components/whitelabel/wallet/components/market/market_register_piece.js
+++ b/js/components/whitelabel/wallet/components/market/market_register_piece.js
@@ -82,7 +82,7 @@ let MarketRegisterPiece = React.createClass({
handleAdditionalDataSuccess() {
this.refreshPieceList();
- this.history.pushState(null, `/collection`);
+ this.history.pushState(null, '/collection');
},
// We need to increase the step to lock the forms that are already filled out
diff --git a/sass/ascribe_spinner.scss b/sass/ascribe_spinner.scss
index 7f02a383..543b1463 100644
--- a/sass/ascribe_spinner.scss
+++ b/sass/ascribe_spinner.scss
@@ -52,6 +52,13 @@ $ascribe--spinner-size-sm: 15px;
}
}
+.spinner-wrapper-white {
+ color: $ascribe-white;
+ .spinner-circle {
+ border-color: $ascribe-white;
+ }
+}
+
.spinner-wrapper-lg {
width: $ascribe--spinner-size-lg;
height: $ascribe--spinner-size-lg;
@@ -146,4 +153,4 @@ $ascribe--spinner-size-sm: 15px;
40% { color: $ascribe-blue; }
60% { color: $ascribe-light-blue; }
80% { color: $ascribe-pink; }
-}
\ No newline at end of file
+}
diff --git a/sass/whitelabel/wallet/23vivi/23vivi_custom_style.scss b/sass/whitelabel/wallet/23vivi/23vivi_custom_style.scss
index 37269bd6..32783a7a 100644
--- a/sass/whitelabel/wallet/23vivi/23vivi_custom_style.scss
+++ b/sass/whitelabel/wallet/23vivi/23vivi_custom_style.scss
@@ -331,6 +331,9 @@ $vivi23--highlight-color: #de2600;
.spinner-inner {
display: none;
}
+ .btn-secondary .spinner-circle {
+ border-color: $vivi23--bg-color;
+ }
// video player
.ascribe-media-player .vjs-default-skin {