Skip to content

Commit

Permalink
Fix some bugs.
Browse files Browse the repository at this point in the history
  • Loading branch information
enavid committed Mar 17, 2022
1 parent 047a26b commit 3b213f9
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 16 deletions.
15 changes: 3 additions & 12 deletions client/js/signin.js
Original file line number Diff line number Diff line change
Expand Up @@ -42,20 +42,12 @@ function showError(input, message) {
small.innerText = message;
}

//Show success outline
function showSuccess(input) {
const formControl = input.parentElement;
formControl.className = 'form-control success';
}
//Check required fields
function checkRequired(inputArray) {
inputArray.forEach(function (input) {
if (input.value.trim() === '') {
showError(input, `${getFieldName(input)} is required`);
}
else {
showSuccess(input)
}
});
}

Expand All @@ -74,10 +66,9 @@ function checkLength(input, min, max) {
showError(input, `${getFieldName(input)} must be less than ${max} characters`);
return false;
}
else {
showSuccess(input);
return true;
}

return true;

}

//Send data to server
Expand Down
2 changes: 1 addition & 1 deletion client/public/style/sign.css
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
}

body{
background-color:#DDDDDD;
background-color:#E0E0E0;
font-family: 'Open Sans','sans-serif';
display: flex;
align-items: center;
Expand Down
6 changes: 3 additions & 3 deletions client/public/style/style.css
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
}

body {
background-color:#DDDDDD;
background-color:#E0E0E0;
font-family: 'Open Sans','sans-serif';
display: flex;
align-items: center;
Expand All @@ -21,7 +21,7 @@ body {
flex-direction: column;
width:500px;
height: 95vh;
background-color: #DDDDDD;
background-color: #F6F6F6;
background-attachment: fixed;
background-size: cover;
border-radius: 10px;
Expand Down Expand Up @@ -232,7 +232,7 @@ a {
background-color:#3498db;
}
#logout{
background-color:#3498db;
background-color:#555555;
color: white;
}
#addButton{
Expand Down

0 comments on commit 3b213f9

Please sign in to comment.