Merge pull request #4230 from influxdata/wizard-bug/password-fields

Add password input text field to WizardTextInput
pull/4225/head
Deniz Kusefoglu 2018-08-15 16:05:41 -07:00 committed by GitHub
commit b4c3b7ce63
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 1 deletions

View File

@ -15,6 +15,7 @@ interface Props {
valueModifier?: (value: string) => string
placeholder?: string
autoFocus?: boolean
type?: string
}
interface State {
@ -32,6 +33,7 @@ class WizardTextInput extends PureComponent<Props, State> {
}),
valueModifier: x => x,
autoFocus: false,
type: 'text',
}
constructor(props) {
@ -50,6 +52,7 @@ class WizardTextInput extends PureComponent<Props, State> {
value,
autoFocus,
label,
type,
} = this.props
let inputClass = ''
@ -64,7 +67,7 @@ class WizardTextInput extends PureComponent<Props, State> {
<div className="form-group col-xs-6">
<label htmlFor={label}>{label}</label>
<input
type="text"
type={type}
id={label}
className={`form-control input-sm ${inputClass}`}
value={value}

View File

@ -46,6 +46,7 @@ class KapacitorForm extends PureComponent<Props> {
<WizardTextInput
value={kapacitor.password}
label="Password"
type="password"
onChange={onChangeInput('password')}
/>
{this.isHTTPS && (

View File

@ -122,6 +122,7 @@ class SourceStep extends PureComponent<Props, State> {
value={source.password}
label="Password"
placeholder={this.passwordPlaceholder}
type="password"
onChange={this.onChangeInput('password')}
/>
<WizardTextInput