mirror of
https://github.com/ascribe/onion.git
synced 2025-02-14 21:10:27 +01:00
make term components unique in loan form
This commit is contained in:
parent
cb5b381e0b
commit
8da71d0229
@ -53,12 +53,16 @@ let LoanForm = React.createClass({
|
|||||||
|
|
||||||
getContractCheckbox() {
|
getContractCheckbox() {
|
||||||
if(this.state.contractKey && this.state.contractUrl) {
|
if(this.state.contractKey && this.state.contractUrl) {
|
||||||
|
// we need to define a key on the InputCheckboxes as otherwise
|
||||||
|
// react is not rerendering them on a store switch and is keeping
|
||||||
|
// the default value of the component (which is in that case true)
|
||||||
return (
|
return (
|
||||||
<Property
|
<Property
|
||||||
name="terms"
|
name="terms"
|
||||||
className="ascribe-settings-property-collapsible-toggle"
|
className="ascribe-settings-property-collapsible-toggle"
|
||||||
style={{paddingBottom: 0}}>
|
style={{paddingBottom: 0}}>
|
||||||
<InputCheckbox
|
<InputCheckbox
|
||||||
|
key="terms_explicitly"
|
||||||
defaultChecked={false}>
|
defaultChecked={false}>
|
||||||
<span>
|
<span>
|
||||||
{getLangText('I agree to the')}
|
{getLangText('I agree to the')}
|
||||||
@ -76,6 +80,7 @@ let LoanForm = React.createClass({
|
|||||||
style={{paddingBottom: 0}}
|
style={{paddingBottom: 0}}
|
||||||
hidden={true}>
|
hidden={true}>
|
||||||
<InputCheckbox
|
<InputCheckbox
|
||||||
|
key="terms_implicitly"
|
||||||
defaultChecked={true} />
|
defaultChecked={true} />
|
||||||
</Property>
|
</Property>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user