👽 Corrections RuleValueVignette et Input
parent
8e73437b29
commit
19c7c8f918
|
@ -1,4 +1,5 @@
|
|||
import React, { Component } from 'react'
|
||||
import { Trans, translate } from 'react-i18next'
|
||||
import PropTypes from 'prop-types'
|
||||
import { FormDecorator } from './FormDecorator'
|
||||
import classnames from 'classnames'
|
||||
|
@ -7,6 +8,7 @@ import { Field } from 'redux-form'
|
|||
import SendButton from './SendButton'
|
||||
|
||||
@FormDecorator('input')
|
||||
@translate()
|
||||
export default class Input extends Component {
|
||||
static contextTypes = {
|
||||
i18n: PropTypes.object.isRequired
|
||||
|
@ -25,8 +27,9 @@ export default class Input extends Component {
|
|||
suffixed = answerSuffix != null,
|
||||
inputError = dirty && error,
|
||||
submitDisabled = !dirty || inputError,
|
||||
{ i18n } = this.context
|
||||
attributes['placeholder'] = i18n.t(attributes['placeholder']);
|
||||
{ i18n } = this.context,
|
||||
transformedAttributes = Object.assign({}, attributes)
|
||||
transformedAttributes['placeholder'] = i18n.t(attributes['placeholder'])
|
||||
|
||||
return (
|
||||
<span>
|
||||
|
@ -40,7 +43,7 @@ export default class Input extends Component {
|
|||
{...input}
|
||||
className={classnames({ suffixed })}
|
||||
id={'step-' + dottedName}
|
||||
{...attributes}
|
||||
{...transformedAttributes}
|
||||
style={
|
||||
!active
|
||||
? { border: '2px dashed #ddd' }
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
import React from 'react'
|
||||
import { Trans, translate } from 'react-i18next'
|
||||
import { Trans } from 'react-i18next'
|
||||
import { Link } from 'react-router-dom'
|
||||
import { encodeRuleName } from 'Engine/rules'
|
||||
import classNames from 'classnames'
|
||||
|
@ -8,7 +8,6 @@ import { humanFigure } from '../../utils'
|
|||
import './RuleValueVignette.css'
|
||||
import ReactCSSTransitionGroup from 'react-addons-css-transition-group'
|
||||
|
||||
@translate()
|
||||
export default ({
|
||||
name,
|
||||
type,
|
||||
|
|
Loading…
Reference in New Issue