diff --git a/js/components/ascribe_forms/form.js b/js/components/ascribe_forms/form.js index 2b956a7e..eac91d42 100644 --- a/js/components/ascribe_forms/form.js +++ b/js/components/ascribe_forms/form.js @@ -33,6 +33,9 @@ let Form = React.createClass({ React.PropTypes.arrayOf(React.PropTypes.element) ]), + // Can be used to freeze the whole form + disabled: React.PropTypes.bool, + // You can use the form for inline requests, like the submit click on a button. // For the form to then not display the error on top, you need to enable this option. // It will make use of the GlobalNotification @@ -203,7 +206,8 @@ let Form = React.createClass({ if (child) { return ReactAddons.addons.cloneWithProps(child, { handleChange: this.handleChangeChild, - ref: child.props.name + ref: child.props.name, + editable: !this.props.disabled }); } }); diff --git a/js/components/ascribe_forms/form_register_piece.js b/js/components/ascribe_forms/form_register_piece.js index 6545007c..a47ab00e 100644 --- a/js/components/ascribe_forms/form_register_piece.js +++ b/js/components/ascribe_forms/form_register_piece.js @@ -86,6 +86,7 @@ let RegisterPieceForm = React.createClass({ enableLocalHashing = enableLocalHashing && this.props.enableLocalHashing; return (