Move search result member into its own object
This commit is contained in:
@@ -17,7 +17,7 @@ function ChangePasswordForm(props) {
|
||||
|
||||
const handleSubmit = (e) => {
|
||||
setLoading(true);
|
||||
requester('/rest-auth/password/change/', 'POST', props.token, input)
|
||||
requester('/password/change/', 'POST', props.token, input)
|
||||
.then(res => {
|
||||
setError({});
|
||||
history.push('/');
|
||||
@@ -32,7 +32,7 @@ function ChangePasswordForm(props) {
|
||||
const makeProps = (name) => ({
|
||||
name: name,
|
||||
onChange: handleChange,
|
||||
value: input[name],
|
||||
value: input[name] || '',
|
||||
error: error[name],
|
||||
});
|
||||
|
||||
@@ -43,16 +43,19 @@ function ChangePasswordForm(props) {
|
||||
<Form.Input
|
||||
label='Old Password'
|
||||
type='password'
|
||||
required
|
||||
{...makeProps('old_password')}
|
||||
/>
|
||||
<Form.Input
|
||||
label='New Password'
|
||||
type='password'
|
||||
required
|
||||
{...makeProps('new_password1')}
|
||||
/>
|
||||
<Form.Input
|
||||
label='Confirm Password'
|
||||
type='password'
|
||||
required
|
||||
{...makeProps('new_password2')}
|
||||
/>
|
||||
|
||||
@@ -139,6 +142,11 @@ export function AccountForm(props) {
|
||||
required
|
||||
{...makeProps('city')}
|
||||
/>
|
||||
<Form.Input
|
||||
label='Postal Code'
|
||||
required
|
||||
{...makeProps('postal_code')}
|
||||
/>
|
||||
|
||||
<Form.Field>
|
||||
<label>Are you under 18 years old?</label>
|
||||
|
||||
Reference in New Issue
Block a user