Skip to content

Commit

Permalink
Signup page Bugs (#3324)
Browse files Browse the repository at this point in the history
* PBENCH-1096
Sign-up page
Bugs on Signup page
  • Loading branch information
MVarshini authored Mar 13, 2023
1 parent 8287b2c commit 87d739a
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 19 deletions.
9 changes: 9 additions & 0 deletions dashboard/src/modules/components/AuthComponent/LoginForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,15 @@ const LoginForm = () => {
</Button>
</div>
<NoLoginComponent />
<div className="orText text-center">-or-</div>
<div className="text-center">
<Button
variant="link"
onClick={() => navigate(APP_ROUTES.AUTH_SIGNUP)}
>
Sign up
</Button>
</div>
</CardFooter>
</Card>
);
Expand Down
10 changes: 5 additions & 5 deletions dashboard/src/modules/components/AuthComponent/SignupForm.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ const SignupForm = () => {
}, [validateForm, userDetails, dispatch, endpoints]);

const checkPasswordError = (password, cnfPassword) => {
if (password !== cnfPassword) {
if (cnfPassword.length > 1 && password !== cnfPassword) {
setErrors({
...errors,
passwordConfirm: "The above passwords do not match!",
Expand Down Expand Up @@ -157,16 +157,16 @@ const SignupForm = () => {
</CardTitle>
<CardBody>
<Form>
{signupFormData.map((formItem, index) => {
{signupFormData.map((formItem) => {
return (
<FormGroup
key={index}
key={formItem.id}
label={formItem.label}
isRequired={formItem.isRequired}
fieldId={formItem.id}
>
<div className="password-holder">
{formItem.name === "password" ? (
{["password", "passwordConfirm"].includes(formItem.name) ? (
<PasswordTextInput
isRequired={formItem.isRequired}
isShowPassword={showPassword}
Expand All @@ -188,7 +188,7 @@ const SignupForm = () => {
onChange={(val) => changeHandler(val, formItem.name)}
/>
)}
{formItem.name === "password" && (
{["password", "passwordConfirm"].includes(formItem.name) && (
<Button
variant="control"
onClick={onShowPassword}
Expand Down
20 changes: 9 additions & 11 deletions dashboard/src/modules/components/AuthComponent/index.less
Original file line number Diff line number Diff line change
Expand Up @@ -31,9 +31,7 @@
.signup-card {
height: 80%;
overflow-y: scroll;
padding: 0 2vh;
-ms-overflow-style: none;
scrollbar-width: none;
padding: 0 2vh;

.contraints-container {
padding: 1vh;
Expand All @@ -50,11 +48,15 @@
.error {
color: red;
font-size: var(--pf-global--FontSize--sm);
}
::-webkit-scrollbar {
display: none;
}
}
}
.orText {
padding: 1vh;
}
.text-center {
text-align: center;
}

}
.auth-card {
.pf-c-card__body {
Expand Down Expand Up @@ -91,9 +93,5 @@
}
}
}
::-webkit-scrollbar {
width: 0px;
background: transparent; /* make scrollbar transparent */
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@ export const signupFormData = [
},
];


export const passwordConstraintsText = [
{
label: "characters",
Expand All @@ -66,5 +65,5 @@ export const passwordConstraintsText = [
{
label: "1 uppercase letter",
name: "passwordBlockLetter",
}
]
},
];

0 comments on commit 87d739a

Please sign in to comment.