Skip to content

Commit

Permalink
Revert "fix(db & connection): make to show/hide the password when onl…
Browse files Browse the repository at this point in the history
…y creating db connection (apache#19694)"

This reverts commit 1d043e5.
  • Loading branch information
sadpandajoe committed May 13, 2022
1 parent 84a96d7 commit f378eaf
Showing 1 changed file with 2 additions and 26 deletions.
28 changes: 2 additions & 26 deletions superset-frontend/src/components/Form/LabeledErrorBoundInput.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,7 @@
* under the License.
*/
import React from 'react';
import { Input, Tooltip } from 'antd';
import { EyeInvisibleOutlined, EyeOutlined } from '@ant-design/icons';
import { Input } from 'antd';
import { styled, css, SupersetTheme } from '@superset-ui/core';
import InfoTooltip from 'src/components/InfoTooltip';
import errorIcon from 'src/assets/images/icons/error.svg';
Expand All @@ -44,10 +43,6 @@ const StyledInput = styled(Input)`
margin: ${({ theme }) => `${theme.gridUnit}px 0 ${theme.gridUnit * 2}px`};
`;

const StyledInputPassword = styled(Input.Password)`
margin: ${({ theme }) => `${theme.gridUnit}px 0 ${theme.gridUnit * 2}px`};
`;

const alertIconStyles = (theme: SupersetTheme, hasError: boolean) => css`
.ant-form-item-children-icon {
display: none;
Expand Down Expand Up @@ -119,26 +114,7 @@ const LabeledErrorBoundInput = ({
help={errorMessage || helpText}
hasFeedback={!!errorMessage}
>
{props.name === 'password' ? (
<StyledInputPassword
{...props}
{...validationMethods}
iconRender={visible =>
visible ? (
<Tooltip title="Hide password.">
<EyeInvisibleOutlined />
</Tooltip>
) : (
<Tooltip title="Show password.">
<EyeOutlined />
</Tooltip>
)
}
role="textbox"
/>
) : (
<StyledInput {...props} {...validationMethods} />
)}
<StyledInput {...props} {...validationMethods} />
</FormItem>
</StyledFormGroup>
);
Expand Down

0 comments on commit f378eaf

Please sign in to comment.