OSDN Git Service

add the password field to create transactions page
authorZhiting Lin <zlin035@uottawa.ca>
Wed, 18 Jul 2018 11:35:49 +0000 (19:35 +0800)
committerZhiting Lin <zlin035@uottawa.ca>
Wed, 18 Jul 2018 11:35:49 +0000 (19:35 +0800)
src/features/transactions/components/New/AdvancedTransactionForm.jsx
src/features/transactions/components/New/NormalTransactionForm.jsx

index 928bbb2..fa1e702 100644 (file)
@@ -4,7 +4,8 @@ import {
   FieldLabel,
   TextField,
   SubmitIndicator,
-  ErrorBanner
+  ErrorBanner,
+  PasswordField
 } from 'features/shared/components'
 import {DropdownButton, MenuItem} from 'react-bootstrap'
 import {reduxForm} from 'redux-form'
@@ -178,8 +179,10 @@ class AdvancedTxForm extends React.Component {
 
         {(actions.length > 0 || this.state.showAdvanced) && <FormSection>
             <label className={styles.title}>{lang === 'zh' ? '密码' : 'Password'}</label>
-            <TextField placeholder={lang === 'zh' ? '请输入密码' : 'Please enter the password'} fieldProps={password}
-                       autoFocus={false} type={'password'}/>
+            <PasswordField
+              placeholder={lang === 'zh' ? '请输入密码' : 'Please enter the password'}
+              fieldProps={password}
+            />
           </FormSection>}
 
           <FormSection className={styles.submitSection}>
index 43b0ce2..e8b3c6f 100644 (file)
@@ -7,7 +7,8 @@ import {
   AmountUnitField,
   AmountInputMask,
   ErrorBanner,
-  SubmitIndicator
+  SubmitIndicator,
+  PasswordField
 } from 'features/shared/components'
 import {chainClient} from 'utility/environment'
 import {reduxForm} from 'redux-form'
@@ -266,8 +267,10 @@ class NormalTxForm extends React.Component {
             </table>
 
             <label className={styles.title}>{lang === 'zh' ? '密码' : 'Password'}</label>
-            <TextField placeholder={lang === 'zh' ? '请输入密码' : 'Please enter the password'} fieldProps={password}
-                       autoFocus={false} type={'password'}/>
+            <PasswordField
+              placeholder={lang === 'zh' ? '请输入密码' : 'Please enter the password'}
+              fieldProps={password}
+            />
           </FormSection>
 
           <FormSection className={styles.submitSection}>