mirror of
https://github.com/ascribe/onion.git
synced 2024-11-15 09:35:10 +01:00
made inputcheckbox component generic
This commit is contained in:
parent
49b530870d
commit
aa5934cd25
@ -126,7 +126,14 @@ let SignupForm = React.createClass({
|
|||||||
name="terms"
|
name="terms"
|
||||||
className="ascribe-settings-property-collapsible-toggle"
|
className="ascribe-settings-property-collapsible-toggle"
|
||||||
style={{paddingBottom: 0}}>
|
style={{paddingBottom: 0}}>
|
||||||
<InputCheckbox/>
|
<InputCheckbox>
|
||||||
|
<span>
|
||||||
|
{' ' + getLangText('I agree to the Terms of Service') + ' '}
|
||||||
|
(<a href="/terms" target="_blank" style={{fontSize: '0.9em', color: 'rgba(0,0,0,0.7)'}}>
|
||||||
|
{getLangText('read')}
|
||||||
|
</a>)
|
||||||
|
</span>
|
||||||
|
</InputCheckbox>
|
||||||
</Property>
|
</Property>
|
||||||
</Form>
|
</Form>
|
||||||
);
|
);
|
||||||
|
@ -7,7 +7,10 @@ import { getLangText } from '../../utils/lang_utils';
|
|||||||
let InputCheckbox = React.createClass({
|
let InputCheckbox = React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
required: React.PropTypes.string.isRequired,
|
required: React.PropTypes.string.isRequired,
|
||||||
label: React.PropTypes.string.isRequired
|
children: React.PropTypes.oneOfType([
|
||||||
|
React.PropTypes.arrayOf(React.PropTypes.element),
|
||||||
|
React.PropTypes.element
|
||||||
|
]).isRequired
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState() {
|
getInitialState() {
|
||||||
@ -31,12 +34,7 @@ let InputCheckbox = React.createClass({
|
|||||||
onFocus={this.handleFocus}>
|
onFocus={this.handleFocus}>
|
||||||
<input type="checkbox" ref="checkbox"/>
|
<input type="checkbox" ref="checkbox"/>
|
||||||
<span className="checkbox">
|
<span className="checkbox">
|
||||||
<span>
|
{this.props.children}
|
||||||
{' ' + getLangText('I agree to the Terms of Service') + ' '}
|
|
||||||
(<a href="/terms" target="_blank" style={{fontSize: '0.9em', color: 'rgba(0,0,0,0.7)'}}>
|
|
||||||
{getLangText('read')}
|
|
||||||
</a>)
|
|
||||||
</span>
|
|
||||||
</span>
|
</span>
|
||||||
</span>
|
</span>
|
||||||
);
|
);
|
||||||
|
Loading…
Reference in New Issue
Block a user