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

View File

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

View File

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