...
 
Commits (2)
......@@ -42,98 +42,79 @@ exports[`RegisterForm component should renders correctly 1`] = `
>
<View>
<View
accessible={true}
focusable={false}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"marginBottom": 15,
"opacity": 1,
}
}
>
<View
accessible={true}
focusable={false}
isTVSelectable={true}
onClick={[Function]}
onResponderGrant={[Function]}
onResponderMove={[Function]}
onResponderRelease={[Function]}
onResponderTerminate={[Function]}
onResponderTerminationRequest={[Function]}
onStartShouldSetResponder={[Function]}
style={
Object {
"opacity": 1,
}
}
>
<Text
allowFontScaling={false}
style={
Array [
Object {
"color": undefined,
"fontSize": 34,
},
Object {
"color": "#939397",
},
Object {
"fontFamily": "Material Icons",
"fontStyle": "normal",
"fontWeight": "normal",
},
Object {},
]
}
>
</Text>
</View>
</View>
<View
style={
Array [
Object {
"marginBottom": 15,
},
Object {
"alignContent": "center",
"alignItems": "center",
"alignSelf": "center",
"justifyContent": "center",
},
]
}
>
<Text
allowFontScaling={false}
style={
Array [
Object {
"fontFamily": "Roboto",
"fontSize": 28,
"fontWeight": "bold",
"lineHeight": 44,
"color": undefined,
"fontSize": 34,
},
Object {
"color": "#4F4F50",
"color": "#939397",
},
Object {
"fontFamily": "Material Icons",
"fontStyle": "normal",
"fontWeight": "normal",
},
Object {},
]
}
>
Join the Revolution
</Text>
</View>
<View>
<Text
style={
<Text
style={
Array [
Object {
"marginBottom": 15,
},
Object {
"color": "#F00",
"paddingLeft": 4,
"paddingTop": 4,
"textAlign": "center",
}
},
Object {
"fontFamily": "Roboto",
"fontSize": 28,
"fontWeight": "bold",
"lineHeight": 44,
},
Object {
"color": "#4F4F50",
},
]
}
>
Join the Revolution
</Text>
<Text
style={
Object {
"color": "#F00",
"paddingLeft": 4,
"paddingTop": 4,
"textAlign": "center",
}
/>
</View>
}
/>
<View
style={
Object {
......@@ -370,17 +351,17 @@ exports[`RegisterForm component should renders correctly 1`] = `
onStartShouldSetResponder={[Function]}
style={
Object {
"alignSelf": "flex-start",
"backgroundColor": "transparent",
"borderColor": "#ededed",
"borderRadius": 3,
"borderWidth": 0,
"margin": 5,
"marginLeft": 10,
"marginLeft": 0,
"marginRight": 10,
"marginTop": 15,
"opacity": 1,
"padding": 10,
"paddingLeft": 0,
}
}
testID="checkbox"
......@@ -390,7 +371,6 @@ exports[`RegisterForm component should renders correctly 1`] = `
Object {
"alignItems": "center",
"flexDirection": "row",
"justifyContent": "flex-end",
}
}
>
......
......@@ -76,21 +76,15 @@ export default class RegisterForm extends Component {
getFormBody = () => {
return (
<ScrollView style={[CS.flexContainer, CS.marginTop2x]}>
<View style={CS.marginBottom3x}>
<TouchableOpacity onPress={this.props.onBack}>
<Icon size={34} name="keyboard-arrow-left" style={CS.colorSecondaryText} />
</TouchableOpacity>
</View>
<View style={[CS.marginBottom3x, CS.centered]}>
<Text style={[CS.titleText, CS.colorPrimaryText]}>
{i18n.t('auth.join')}
</Text>
</View>
<View>
<Text style={{color: '#F00', textAlign: 'center', paddingTop:4, paddingLeft:4}}>
{this.state.error.termsAcceptedError}
</Text>
</View>
<TouchableOpacity onPress={this.props.onBack} style={CS.marginBottom3x}>
<Icon size={34} name="keyboard-arrow-left" style={CS.colorSecondaryText} />
</TouchableOpacity>
<Text style={[CS.marginBottom3x, CS.textCenter, CS.titleText, CS.colorPrimaryText]}>
{i18n.t('auth.join')}
</Text>
<Text style={{color: '#F00', textAlign: 'center', paddingTop:4, paddingLeft:4}}>
{this.state.error.termsAcceptedError}
</Text>
<Input
placeholder={i18n.t('auth.username')}
onChangeText={this.setUsername}
......@@ -123,13 +117,11 @@ export default class RegisterForm extends Component {
testID="registerPasswordConfirmInput"
/> : null }
<CheckBox
right
iconLeft
containerStyle={ComponentsStyle.registerCheckboxNew}
title={<Text style={ComponentsStyle.termsNew}>{i18n.t('auth.accept')} <Text style={ComponentsStyle.linkNew} onPress={ ()=> Linking.openURL('https://www.minds.com/p/terms') }>{i18n.t('auth.termsAndConditions')}</Text></Text>}
checked={this.state.termsAccepted}
textStyle={ComponentsStyle.registerCheckboxTextNew}
onPress={() => { this.setState({ termsAccepted: !this.state.termsAccepted }) }}
// textStyle={ComponentsStyle.registerCheckboxTextNew}
onPress={this.check}
disabled={this.state.inProgress}
testID="checkbox"
/>
......@@ -137,6 +129,10 @@ export default class RegisterForm extends Component {
);
};
check = () => {
this.setState({ termsAccepted: !this.state.termsAccepted })
};
getFormFooter = () => {
return (
<View style={CS.flexContainer}>
......
......@@ -101,9 +101,10 @@ export const ComponentsStyle = StyleSheet.create({
},
registerCheckboxNew: {
backgroundColor: 'transparent',
marginLeft: 0,
paddingLeft: 0,
borderWidth: 0,
alignSelf: 'flex-start',
marginTop: 15
marginTop: 15,
},
//button
......