|
1 | 1 | import React from "react";
|
2 | 2 | import { RouteComponentProps, withRouter } from "react-router-dom";
|
3 |
| -import { Form, Input, Button, Col, Row } from "antd"; |
| 3 | +import { Form, Input, Button, Col, Row, Card } from "antd"; |
4 | 4 | import { LockOutlined } from "@ant-design/icons";
|
5 | 5 | import Request from "libs/request";
|
6 | 6 | import messages from "messages";
|
@@ -49,79 +49,81 @@ function FinishResetPasswordView(props: Props) {
|
49 | 49 |
|
50 | 50 | return (
|
51 | 51 | <Row className="login-view" justify="center" align="middle">
|
52 |
| - <Col className="login-content"> |
53 |
| - <h3>Reset Password</h3> |
54 |
| - <Form onFinish={onFinish} form={form}> |
55 |
| - <FormItem |
56 |
| - hasFeedback |
57 |
| - name={["password", "password1"]} |
58 |
| - rules={[ |
59 |
| - { |
60 |
| - required: true, |
61 |
| - message: messages["auth.reset_new_password"], |
62 |
| - }, |
63 |
| - { |
64 |
| - min: 8, |
65 |
| - message: messages["auth.registration_password_length"], |
66 |
| - }, |
67 |
| - { |
68 |
| - validator: (_, value: string) => |
69 |
| - checkPasswordsAreMatching(value, ["password", "password2"]), |
70 |
| - }, |
71 |
| - ]} |
72 |
| - > |
73 |
| - <Password |
74 |
| - prefix={ |
75 |
| - <LockOutlined |
76 |
| - style={{ |
77 |
| - fontSize: 13, |
78 |
| - }} |
79 |
| - /> |
80 |
| - } |
81 |
| - placeholder="New Password" |
82 |
| - /> |
83 |
| - </FormItem> |
84 |
| - <FormItem |
85 |
| - hasFeedback |
86 |
| - name={["password", "password2"]} |
87 |
| - rules={[ |
88 |
| - { |
89 |
| - required: true, |
90 |
| - message: messages["auth.reset_new_password2"], |
91 |
| - }, |
92 |
| - { |
93 |
| - min: 8, |
94 |
| - message: messages["auth.registration_password_length"], |
95 |
| - }, |
96 |
| - { |
97 |
| - validator: (_, value: string) => |
98 |
| - checkPasswordsAreMatching(value, ["password", "password1"]), |
99 |
| - }, |
100 |
| - ]} |
101 |
| - > |
102 |
| - <Password |
103 |
| - prefix={ |
104 |
| - <LockOutlined |
105 |
| - style={{ |
106 |
| - fontSize: 13, |
107 |
| - }} |
108 |
| - /> |
109 |
| - } |
110 |
| - placeholder="Confirm New Password" |
111 |
| - /> |
112 |
| - </FormItem> |
113 |
| - <FormItem> |
114 |
| - <Button |
115 |
| - type="primary" |
116 |
| - htmlType="submit" |
117 |
| - style={{ |
118 |
| - width: "100%", |
119 |
| - }} |
| 52 | + <Col> |
| 53 | + <Card className="login-content"> |
| 54 | + <h3>Reset Password</h3> |
| 55 | + <Form onFinish={onFinish} form={form}> |
| 56 | + <FormItem |
| 57 | + hasFeedback |
| 58 | + name={["password", "password1"]} |
| 59 | + rules={[ |
| 60 | + { |
| 61 | + required: true, |
| 62 | + message: messages["auth.reset_new_password"], |
| 63 | + }, |
| 64 | + { |
| 65 | + min: 8, |
| 66 | + message: messages["auth.registration_password_length"], |
| 67 | + }, |
| 68 | + { |
| 69 | + validator: (_, value: string) => |
| 70 | + checkPasswordsAreMatching(value, ["password", "password2"]), |
| 71 | + }, |
| 72 | + ]} |
120 | 73 | >
|
121 |
| - Reset Password |
122 |
| - </Button> |
123 |
| - </FormItem> |
124 |
| - </Form> |
| 74 | + <Password |
| 75 | + prefix={ |
| 76 | + <LockOutlined |
| 77 | + style={{ |
| 78 | + fontSize: 13, |
| 79 | + }} |
| 80 | + /> |
| 81 | + } |
| 82 | + placeholder="New Password" |
| 83 | + /> |
| 84 | + </FormItem> |
| 85 | + <FormItem |
| 86 | + hasFeedback |
| 87 | + name={["password", "password2"]} |
| 88 | + rules={[ |
| 89 | + { |
| 90 | + required: true, |
| 91 | + message: messages["auth.reset_new_password2"], |
| 92 | + }, |
| 93 | + { |
| 94 | + min: 8, |
| 95 | + message: messages["auth.registration_password_length"], |
| 96 | + }, |
| 97 | + { |
| 98 | + validator: (_, value: string) => |
| 99 | + checkPasswordsAreMatching(value, ["password", "password1"]), |
| 100 | + }, |
| 101 | + ]} |
| 102 | + > |
| 103 | + <Password |
| 104 | + prefix={ |
| 105 | + <LockOutlined |
| 106 | + style={{ |
| 107 | + fontSize: 13, |
| 108 | + }} |
| 109 | + /> |
| 110 | + } |
| 111 | + placeholder="Confirm New Password" |
| 112 | + /> |
| 113 | + </FormItem> |
| 114 | + <FormItem> |
| 115 | + <Button |
| 116 | + type="primary" |
| 117 | + htmlType="submit" |
| 118 | + style={{ |
| 119 | + width: "100%", |
| 120 | + }} |
| 121 | + > |
| 122 | + Reset Password |
| 123 | + </Button> |
| 124 | + </FormItem> |
| 125 | + </Form> |
| 126 | + </Card> |
125 | 127 | </Col>
|
126 | 128 | </Row>
|
127 | 129 | );
|
|
0 commit comments