Skip to content
Open
Show file tree
Hide file tree
Changes from 10 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Shivani_Bansal/WebApp/assets/css/login.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
.card{
background-color: aliceblue;
}

body{
padding: 10% 30%;
}
46 changes: 46 additions & 0 deletions Shivani_Bansal/WebApp/assets/scripts/signup.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
function sendJSON(){
let name = document.getElementById("exampleInputName1").value;
console.log(name);
let username = document.getElementById("exampleInputUsername1").value;

let role = document.getElementById("exampleInputRole1").value
let email = document.getElementById("exampleInputEmail1").value
let password = document.getElementById("exampleInputPassword1").value
let projectID = document.getElementById("exampleInputProjectID1").value


console.log(name)

// var obj = {
// firstName: 'Himanshu',
// lastName: "Bansal",

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

remove commented code


// }

//Creating a XHR request
var xhr=new XMLHttpRequest();
let url = "https://localhost:44371/api/signup";

//open a connection
xhr.open("POST", url, true);

//set the request header that which type is being send
xhr.setRequestHeader("Content-Type", "application/json");

//creating a state change callback
xhr.onreadystatechange = function() {
if (xhr.readyState==4 && xhr.readyState==200){
alert("successfuly registered");

}
}

//conerting JSON data to string
var data = JSON.stringify({"Name":name, "Username":username, "Role":role, "Email":email, "Password":password, "ProjectID":projectID})


//sending data with request
xhr.send(data);

event.preventDefault();
}
34 changes: 34 additions & 0 deletions Shivani_Bansal/WebApp/login.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href=".\assets\css\login.css">
</head>
<body class="px-30">
<div class="card" >
<div class="card-body">
<h5 class="card-title">Login Page</h5>
<form>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">
<small id="emailHelp" class="form-text text-muted">We'll never share your email with anyone else.</small>
</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>
<div class="form-group form-check">
<input type="checkbox" class="form-check-input" id="exampleCheck1">
<label class="form-check-label" for="exampleCheck1">Check me out</label>
</div>
<button type="submit" class="btn btn-primary">Login</button>
</form>
</div>
</div>
</body>
</html>
55 changes: 55 additions & 0 deletions Shivani_Bansal/WebApp/signup.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Document</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.4.1/css/bootstrap.min.css" integrity="sha384-Vkoo8x4CGsO3+Hhxv8T/Q5PaXtkKtu6ug5TOeNV6gBiFeWPGFN9MuhOf23Q9Ifjh" crossorigin="anonymous">
<link rel="stylesheet" href=".\assets\css\login.css">
</head>
<body class="px-30">
<div class="card" >
<div class="card-body">
<h5 class="card-title">Sign up Page</h5>
<form>
<div class="form-group">
<label for="exampleInputName1">Name</label>
<input type="text" class="form-control" id="exampleInputName1" >

</div>
<div class="form-group">
<label for="exampleInputUsername1">Username</label>
<input type="text" class="form-control" id="exampleInputUsername1" >

</div>
<div class="form-group">
<label for="exampleInputRole1">Role</label>
<input type="text" class="form-control" id="exampleInputRole1">

</div>
<div class="form-group">
<label for="exampleInputEmail1">Email address</label>
<input type="email" class="form-control" id="exampleInputEmail1" aria-describedby="emailHelp">

</div>
<div class="form-group">
<label for="exampleInputPassword1">Password</label>
<input type="password" class="form-control" id="exampleInputPassword1">
</div>

<div class="form-group">
<label for="exampleInputProjectID1">ProjectID</label>
<input type="text" class="form-control" id="exampleInputProjectID1">
</div>



<button onclick="sendJSON()" class="btn btn-primary">Register</button>
</form>
</div>
</div>
<script src=".\assets\scripts\signup.js"></script>

</body>
</html>
3 changes: 3 additions & 0 deletions Shivani_Bansal/calculator/.vs/ProjectSettings.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"CurrentProjectSetting": null
}
6 changes: 6 additions & 0 deletions Shivani_Bansal/calculator/.vs/VSWorkspaceState.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"ExpandedNodes": [
""
],
"PreviewInSolutionExplorer": false
}
Binary file added Shivani_Bansal/calculator/.vs/calculator/v15/.suo
Binary file not shown.
Binary file added Shivani_Bansal/calculator/.vs/slnx.sqlite
Binary file not shown.
Binary file not shown.
Binary file added Shivani_Bansal/company/.vs/company/v15/.suo
Binary file not shown.
Empty file.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Loading