1
0
mirror of https://github.com/ascribe/onion.git synced 2025-02-14 21:10:27 +01:00

inputcheckbox defaultvalue WIP

This commit is contained in:
diminator 2015-07-28 11:32:16 +02:00
parent 60ad72aabb
commit 2cece3ce33
3 changed files with 4 additions and 4 deletions

View File

@ -59,7 +59,8 @@ let LoanForm = React.createClass({
name="terms"
className="ascribe-settings-property-collapsible-toggle"
style={{paddingBottom: 0}}>
<InputCheckbox>
<InputCheckbox
defaultValue={false}>
<span>
{getLangText('I agree to the')}&nbsp;
<a href={this.state.contractUrl} target="_blank">

View File

@ -4,7 +4,6 @@ import React from 'react';
let InputCheckbox = React.createClass({
propTypes: {
required: React.PropTypes.string.isRequired,
defaultValue: React.PropTypes.bool,
children: React.PropTypes.oneOfType([
React.PropTypes.arrayOf(React.PropTypes.element),
@ -13,7 +12,7 @@ let InputCheckbox = React.createClass({
},
getDefaultProps() {
return {
required: 'required'
defaultValue: false
};
},

View File

@ -158,7 +158,7 @@ let Property = React.createClass({
renderChildren() {
return ReactAddons.Children.map(this.props.children, (child) => {
return ReactAddons.addons.cloneWithProps(child, {
value: this.state.value,
//value: this.state.value,
onChange: this.handleChange,
onFocus: this.handleFocus,
onBlur: this.handleBlur,