update: register form

This commit is contained in:
ahmadzuhdi 2019-02-01 13:45:35 +07:00
parent 12e7f13c1a
commit a4974f0bb0

View File

@ -310,11 +310,11 @@ class RegisterPage extends React.Component {
<Grid item xs={12} sm={12} md={7} style={{ paddingLeft: 50, paddingRight: 50 }}> <Grid item xs={12} sm={12} md={7} style={{ paddingLeft: 50, paddingRight: 50 }}>
<Paper className={classes.formRegister}> <Paper className={classes.formRegister}>
<Typography variant="h6" gutterBottom> <Typography variant="h6" gutterBottom>
Register Now Daftar Sekarang
</Typography>
<Typography variant="subtitle2" gutterBottom>
Already have an account? <Link to={"/login"} replace>Back to Login</Link>
</Typography> </Typography>
{/*<Typography variant="subtitle2" gutterBottom>*/}
{/*Already have an account? <Link to={"/login"} replace>Back to Login</Link>*/}
{/*</Typography>*/}
<div style={{ <div style={{
display: 'flex', display: 'flex',
flexDirection: 'row' flexDirection: 'row'
@ -323,7 +323,7 @@ class RegisterPage extends React.Component {
<Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}> <Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}>
<TextField <TextField
id="name" id="name"
label="Full name" label="Nama Lengkap"
value={this.state.full_name} value={this.state.full_name}
onChange={this.handleChange('full_name')} onChange={this.handleChange('full_name')}
margin="normal" margin="normal"
@ -335,7 +335,7 @@ class RegisterPage extends React.Component {
<Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}> <Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}>
<TextField <TextField
id="phone" id="phone"
label="Phone Number" label="Nomer Telfon"
value={this.state.phone_number} value={this.state.phone_number}
onChange={this.handleChange('phone_number')} onChange={this.handleChange('phone_number')}
margin="normal" margin="normal"
@ -472,54 +472,54 @@ class RegisterPage extends React.Component {
{/*/>*/} {/*/>*/}
{/*</Grid>*/} {/*</Grid>*/}
<Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}> {/*<Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}>*/}
<TextField {/*<TextField*/}
id="password" {/*id="password"*/}
label="Password" {/*label="Password"*/}
value={this.state.password} {/*value={this.state.password}*/}
onChange={this.handleChange('password')} {/*onChange={this.handleChange('password')}*/}
margin="normal" {/*margin="normal"*/}
type={this.state.showPassword ? 'text' : 'password'} {/*type={this.state.showPassword ? 'text' : 'password'}*/}
variant="outlined" {/*variant="outlined"*/}
fullWidth {/*fullWidth*/}
InputProps={{ {/*InputProps={{*/}
endAdornment: ( {/*endAdornment: (*/}
<InputAdornment position="end"> {/*<InputAdornment position="end">*/}
<IconButton {/*<IconButton*/}
aria-label="Toggle password visibility" {/*aria-label="Toggle password visibility"*/}
onClick={this.viewPassword} {/*onClick={this.viewPassword}*/}
> {/*>*/}
{this.state.showPassword ? <VisibilityOff /> : <Visibility />} {/*{this.state.showPassword ? <VisibilityOff /> : <Visibility />}*/}
</IconButton> {/*</IconButton>*/}
</InputAdornment> {/*</InputAdornment>*/}
), {/*),*/}
}} {/*}}*/}
/> {/*/>*/}
</Grid> {/*</Grid>*/}
<Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}> {/*<Grid item xs={12} sm={12} md={6} style={{ paddingLeft: 5, paddingRight: 5 }}>*/}
<TextField {/*<TextField*/}
id="confirmPassword" {/*id="confirmPassword"*/}
label="Re-type Password" {/*label="Re-type Password"*/}
value={this.state.confirmPassword} {/*value={this.state.confirmPassword}*/}
onChange={this.handleChange('confirmPassword')} {/*onChange={this.handleChange('confirmPassword')}*/}
margin="normal" {/*margin="normal"*/}
type={this.state.showConfirmPassword ? 'text' : 'password'} {/*type={this.state.showConfirmPassword ? 'text' : 'password'}*/}
fullWidth {/*fullWidth*/}
variant="outlined" {/*variant="outlined"*/}
InputProps={{ {/*InputProps={{*/}
endAdornment: ( {/*endAdornment: (*/}
<InputAdornment position="end"> {/*<InputAdornment position="end">*/}
<IconButton {/*<IconButton*/}
aria-label="Toggle password visibility" {/*aria-label="Toggle password visibility"*/}
onClick={this.viewConfirmPassword} {/*onClick={this.viewConfirmPassword}*/}
> {/*>*/}
{this.state.showConfirmPassword ? <VisibilityOff style={{ color: this.state.password == '' ? this.state.confirmPassword == '' : this.state.password != this.state.confirmPassword ? 'red' : 'green' }} /> : <Visibility style={{ color: this.state.password == '' ? this.state.confirmPassword == '' : this.state.password != this.state.confirmPassword ? 'red' : 'green' }} />} {/*{this.state.showConfirmPassword ? <VisibilityOff style={{ color: this.state.password == '' ? this.state.confirmPassword == '' : this.state.password != this.state.confirmPassword ? 'red' : 'green' }} /> : <Visibility style={{ color: this.state.password == '' ? this.state.confirmPassword == '' : this.state.password != this.state.confirmPassword ? 'red' : 'green' }} />}*/}
</IconButton> {/*</IconButton>*/}
</InputAdornment> {/*</InputAdornment>*/}
), {/*),*/}
}} {/*}}*/}
/> {/*/>*/}
</Grid> {/*</Grid>*/}
</Grid> </Grid>
</div> </div>
@ -546,7 +546,7 @@ class RegisterPage extends React.Component {
<Button <Button
fullWidth fullWidth
variant="contained" style={{ backgroundColor: '#ffeb3b' }} onClick={this.register}> variant="contained" style={{ backgroundColor: '#ffeb3b' }} onClick={this.register}>
{this.state.isLoading ? <CircularProgress className={classes.progress} /> : "Sign Up"} {this.state.isLoading ? <CircularProgress className={classes.progress} /> : "Daftar"}
</Button> </Button>
</div> </div>
</Paper> </Paper>