import React from 'react'
-import { BaseNew, FormContainer, FormSection, TextField, RadioField } from 'features/shared/components'
+import { FormContainer, FormSection, TextField, RadioField } from 'features/shared/components'
import { reduxForm } from 'redux-form'
import {withNamespaces} from 'react-i18next'
import styles from './New.scss'
label= { t('asset.new') }
onSubmit={handleSubmit}
submitting={submitting}
- submitLabel={'N'}
+ submitLabel={t('commonWords.next')}
>
<FormSection title={t('asset.information')}>
<TextField title={t('form.symbol')} placeholder={t('asset.symbolPlaceholder')} fieldProps={symbol} />
<TextField title={t('form.decimals')} placeholder={t('asset.decimalPlaceholder')} fieldProps={decimals} />
<RadioField title={t('form.reissueTitle')} options={options} fieldProps={reissue} />
- <label >adition info</label>
+ <label >{t('asset.additionInfo')}</label>
<div className={styles.panel}>
{description.map((descript, index) =>
<div className={styles.subjectField}>
- <TextField title={'key'} fieldProps={descript.key}/>
- <TextField title={'value'} fieldProps={descript.value}/>
+ <TextField title={t('asset.additionInfoKey')} fieldProps={descript.key}/>
+ <TextField title={t('asset.additionInfoValue')} fieldProps={descript.value}/>
<button
className='btn btn-danger btn-xs'
tabIndex='-1'
type='button'
onClick={() => this.removeReceiverItem(index)}
>
- Remove
+ {t('commonWords.remove')}
</button>
</div>
className='btn btn-default'
onClick={this.addReceiverItem}
>
- Add Field
+ {t('commonWords.addField')}
</button>
</div>
</FormSection>
values.description.forEach((descr, index) => {
if (!values.description[index].value) {
- errors.description[index] = {...errors.description[index], value: t('asset.keysError')}
+ errors.description[index] = {...errors.description[index], value: t('asset.additionInfoValueError')}
}
if (!values.description[index].key) {
- errors.description[index] = {...errors.description[index], key: t('asset.keysError')}
+ errors.description[index] = {...errors.description[index], key: t('asset.additionInfoKeyError')}
}
})
"aliasPlaceholder":"Please entered asset alias",
"decimalsError":"Decimals is required.",
"decimalsTypeError":"Please enter a number.",
- "decimalsRangeError":"Please enter a decimals number smaller or equal to 16."
+ "decimalsRangeError":"Please enter a decimals number smaller or equal to 16.",
+ "additionInfo":"Additional Info",
+ "additionInfoKey":"Description",
+ "additionInfoValue":"Value",
+ "additionInfoKeyError":"Description is required.",
+ "additionInfoValueError":"Value is required."
},
"commonWords": {
"version": "Version",
"cancel": "Cancel",
"continue":"Continue",
"next":"Next",
- "previous":"Previous"
+ "previous":"Previous",
+ "addField":"Add Field"
},
"crumbName":{
"transaction": "transactions",
"aliasPlaceholder":"请输入资产别名",
"decimalsError":"精度是必须项",
"decimalsTypeError":"请输入数字",
- "decimalsRangeError":"精度的最大值是16。"
+ "decimalsRangeError":"精度的最大值是16。",
+ "additionInfo":"附加信息",
+ "additionInfoKey":"描述",
+ "additionInfoValue":"值",
+ "additionInfoKeyError":"描述是必须项。",
+ "additionInfoValueError":"值是必须项。"
},
"commonWords": {
"version": "版本号",
"cancel": "返回",
"continue":"继续",
"next":"向后",
- "previous":"向前"
+ "previous":"向前",
+ "addField":"添加项"
},
"crumbName":{
"transaction": "交易",