|
1 | 1 | import React from "react" |
2 | | -import { Button, Steps } from "antd" |
| 2 | +import { Button, Form, Input, Steps } from "antd" |
3 | 3 | import { IdcardOutlined, LockOutlined, SafetyOutlined, UserOutlined } from "@ant-design/icons" |
4 | 4 | import { Navigate } from "react-router-dom" |
5 | | -import { LoginFormPage, ProFormText } from "@ant-design/pro-components" |
| 5 | +import { LoginFormPage } from "@ant-design/pro-components" |
6 | 6 | import AppContext from "../../core/components/context/AppContext" |
7 | 7 | import Preloader from "../../core/components/preloader/Preloader" |
8 | 8 | import Notification from "../../core/components/notification/Notification" |
@@ -125,48 +125,37 @@ export default class OnboardingPage extends React.Component<any, OnboardingPageS |
125 | 125 |
|
126 | 126 | return ( |
127 | 127 | <> |
128 | | - <ProFormText |
| 128 | + <Form.Item |
129 | 129 | name="name" |
130 | | - placeholder={i18n(MessageKey.CommonName)} |
131 | 130 | initialValue={values.name} |
132 | | - fieldProps={{ |
133 | | - size: "large", |
134 | | - prefix: <IdcardOutlined />, |
135 | | - }} |
136 | | - formItemProps={{ |
137 | | - validateStatus: validationResult.getStatus("name"), |
138 | | - help: validationResult.getMessage("name"), |
139 | | - }} |
| 131 | + validateStatus={validationResult.getStatus("name")} |
| 132 | + help={validationResult.getMessage("name")} |
140 | 133 | style={{ marginLeft: 20 }} |
141 | | - /> |
142 | | - <ProFormText |
| 134 | + > |
| 135 | + <Input placeholder={i18n(MessageKey.CommonName)} size="large" prefix={<IdcardOutlined />} /> |
| 136 | + </Form.Item> |
| 137 | + <Form.Item |
143 | 138 | name="username" |
144 | | - placeholder={i18n(MessageKey.CommonUsername)} |
145 | 139 | initialValue={values.username} |
146 | | - fieldProps={{ |
147 | | - size: "large", |
148 | | - prefix: <UserOutlined />, |
149 | | - }} |
150 | | - formItemProps={{ |
151 | | - validateStatus: validationResult.getStatus("username"), |
152 | | - help: validationResult.getMessage("username"), |
153 | | - }} |
| 140 | + validateStatus={validationResult.getStatus("username")} |
| 141 | + help={validationResult.getMessage("username")} |
154 | 142 | style={{ marginLeft: 20 }} |
155 | | - /> |
156 | | - <ProFormText.Password |
| 143 | + > |
| 144 | + <Input placeholder={i18n(MessageKey.CommonUsername)} size="large" prefix={<UserOutlined />} /> |
| 145 | + </Form.Item> |
| 146 | + <Form.Item |
157 | 147 | name="password" |
158 | | - placeholder={i18n(MessageKey.CommonPassword)} |
159 | 148 | initialValue={values.password} |
160 | | - fieldProps={{ |
161 | | - size: "large", |
162 | | - prefix: <LockOutlined />, |
163 | | - }} |
164 | | - formItemProps={{ |
165 | | - validateStatus: validationResult.getStatus("password"), |
166 | | - help: validationResult.getMessage("password"), |
167 | | - }} |
| 149 | + validateStatus={validationResult.getStatus("password")} |
| 150 | + help={validationResult.getMessage("password")} |
168 | 151 | style={{ marginLeft: 20 }} |
169 | | - /> |
| 152 | + > |
| 153 | + <Input.Password |
| 154 | + placeholder={i18n(MessageKey.CommonPassword)} |
| 155 | + size="large" |
| 156 | + prefix={<LockOutlined />} |
| 157 | + /> |
| 158 | + </Form.Item> |
170 | 159 | </> |
171 | 160 | ) |
172 | 161 | } |
|
0 commit comments