Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

added kunal folder #74

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all 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
Binary file modified .DS_Store
Binary file not shown.
77 changes: 77 additions & 0 deletions KunalAcharya/LoginPageTask/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,77 @@
<!-- THE BOILERPLATE SHOULD NOT BE REMOVED -->
<!-- Proper naming convention should be used while naming id attributes. -->
<!-- ADDING A SUCCESS PAGE FOR THE SAME WILL BOOST YOUR CHANCES -->
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<title>Login</title>
<meta name="viewport" content="width=device-width, initial-scale=1">
<link rel="stylesheet" type="text/css" media="screen" href="static/css/main.css">
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.4.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.4.1/js/bootstrap.min.js"></script>
<script src="js/index.js"></script>
</head>
<!-- <body> -->
<!-- <img src="https://incubateind.com/images/IncubateIND%20Black.png" class="logo" alt=""> -->
<!-- Beautify This -->
<!-- Beautify Ends -->
<!-- </body> -->
<body>
<div class="container">
<div class="row">
<div class="col-md-6 mx-auto">
<div id="main">
<div class="signupForm ">
<div class="logo mb-3">
<div class="col-md-12 text-center">
<h1>Signup</h1>
</div>
</div>
<form onsubmit="save()" name="signup">
<div class="form-group">
<label for="uName">User Name</label>
<input type="text" name="uName" class="form-control" id="uName" placeholder="Enter User Name">
</div>
<div class="form-group">
<label for="email">Email address</label>
<input type="email" name="email" class="form-control" id="email" placeholder="Enter email">
</div>
<div class="form-group">
<label for="phone">Phone Number</label>
<input type="phone" name="phone" class="form-control" id="phone" placeholder="Enter phone">
</div>
<div class="form-group">
<label for="pwd">Password</label>
<input type="password" name="password" id="password" class="form-control" placeholder="Enter Password">
</div>
<div class="form-group">
<label for="cnfPwd">Password</label>
<input type="password" name="cnfPassword" id="cnfPassword" class="form-control" placeholder="Confirm Password">
</div>
<div class="form-group">
<label for="comment">Comment</label>
<textarea name="comment" id="comment" class="form-control" rows="5" placeholder="Comment"></textarea>
</div>
<div class="form-group">
<label for="comment">Age</label>
<label class="radio-inline"><input type="radio" name="optradio" id="belowEighteen" checked>Below Eighteen</label>
<label class="radio-inline"><input type="radio" name="optradio" id="eighteen">Eighteen</label>
<label class="radio-inline"><input type="radio" name="optradio" id="aboveEighteen">Above Eighteen</label>
</div>
<div class="col-md-12 text-center ">
<button type="submit" class=" btn btn-block mybtn btn-primary tx-tfm">Submit</button>
</div>

</form>


</div>
</div>
</div>
</div>
</div>
</body>
</html>
80 changes: 80 additions & 0 deletions KunalAcharya/LoginPageTask/js/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,80 @@
save = function(){
var userName = document.getElementById("uName").value;
if (isBlankText(userName)){
alert("UserName can't be blank!!!!");
return;
}
var emailId = document.getElementById("email").value;
isValidEmailAdress(emailId);
var phoneNumber = document.getElementById("phone").value;
if(!isValidPhoneNumber(phoneNumber)){
alert("Please Enter Valid Indian Phone Number");
return;
}
var password = document.getElementById("password").value;
if (isBlankText(password)){
alert("Password can't be blak");
return;
}
if (password.length < 6){
alert("Please enter password greater than 6 character!!!")
return
}
var confirmedPassword = document.getElementById("cnfPassword").value;


if (!isTwoTextSame(password,confirmedPassword)){
alert("Please enter same password!!!!!")
return;
};

if(document.getElementById("belowEighteen").checked){
var age = "Below 18"
}
if(document.getElementById("eighteen").checked){
var age = "18"
}
if(document.getElementById("aboveEighteen").checked){
var age = "Above 18"
}
// window.open("~/success.html")
return;
}

function isBlankText(text){
if (text.localeCompare("") == 0){
return true;
}
return false;
}

function isTwoTextSame(text1, text2){
if (text1.localeCompare(text2) == 0){
return true;
};
return false;
}

function isValidPhoneNumber(phoneNumber){
if (isBlankText(phoneNumber)){
alert("Phone number cant be blank")
return;
}
var phoneRegex = /^\d{10}$/;
if (phoneRegex.test(phoneNumber)){
return true;
}
return false;
}

function isValidEmailAdress(emailId){
if(isBlankText(emailId)){
alert("Email can't be blank");
return;
}
var pattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,4}$/;
if (pattern.test(emailId)){
return true;
}
return false;
}
40 changes: 40 additions & 0 deletions KunalAcharya/LoginPageTask/static/css/main.css
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
body{
padding-top:4.2rem;
padding-bottom:4.2rem;
background:rgba(0, 0, 0, 0.76);
}
a{
text-decoration:none !important;
}
h1,h2,h3{
font-family: cursive;
}
.signupForm{
position: relative;
display: -ms-flexbox;
display: flex;
padding: 1rem;
-ms-flex-direction: column;
flex-direction: column;
width: 100%;
pointer-events: auto;
background-color: #fff;
background-clip: padding-box;
border: 1px solid rgba(0,0,0,.2);
border-radius: 1.1rem;
outline: 0;
max-width: 500px;
top: 50%;
left: 50%;
}
.tx-tfm{
text-transform:uppercase;
}
.mybtn{
border-radius:50px;
}

form .error {
color: #ff0000;
}
#second{display:none;}
5 changes: 5 additions & 0 deletions KunalAcharya/LoginPageTask/success.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
<html>
<body>

</body>
</html>
7 changes: 7 additions & 0 deletions KunalAcharya/MyDetails.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Name - Kunal Acharya.
College Name - M.B.M. Engineering College Jodhpur, Rajasthan.
Stream - Electronics And Computer Science.
Year Of Study - 3rd Year.
Passing Year - 2021.
Current Location - Jodhpur Rajasthan.
Home City - Bikaner Rajasthan.
32 changes: 32 additions & 0 deletions KunalAcharya/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
##Author Kunal Acharya
##Date 2020-03-25

Signup Page

Description

HTML and Javascript based signup page

Assumptions
1.The input Phone Number is Indian (10 digits)


Tehnology:

HTML:

1. HTML.

2. CSS.

3. Javascript.


Setup:

Fork the repository from the github.


Run:

Click on the Index.html file open it on Google-Chrome browser(recommended).