Merge pull request #4230 from influxdata/wizard-bug/password-fields
Add password input text field to WizardTextInputpull/4225/head
commit
b4c3b7ce63
|
@ -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}
|
||||||
|
|
|
@ -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 && (
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in New Issue