From 38ef18a192a82fc1dd874b6753ffb8ac3609d674 Mon Sep 17 00:00:00 2001 From: Brett Sun Date: Fri, 11 Dec 2015 11:15:17 +0100 Subject: [PATCH] Hotfix for sending contract agreements without appendices --- .../ascribe_forms/form_send_contract_agreement.js | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/js/components/ascribe_forms/form_send_contract_agreement.js b/js/components/ascribe_forms/form_send_contract_agreement.js index 74331e09..6f5f74d7 100644 --- a/js/components/ascribe_forms/form_send_contract_agreement.js +++ b/js/components/ascribe_forms/form_send_contract_agreement.js @@ -61,8 +61,12 @@ let SendContractAgreementForm = React.createClass({ this.history.pushState(null, '/collection'); }, - getFormData(){ - return {'appendix': {'default': this.refs.form.refs.appendix.state.value}}; + getFormData() { + const appendixValue = this.refs.form.refs.appendix.state.value; + + if (appendixValue) { + return { 'appendix': { 'default': appendixValue } }; + } }, getContracts() { @@ -124,7 +128,8 @@ let SendContractAgreementForm = React.createClass({ + expanded={false} + style={{paddingBottom: 0}}> {getLangText('Appendix')} {/* We're using disabled on a form here as PropertyCollapsible currently does not support the disabled + overrideForm functionality */}