Untitled

mail@pastecode.io avatar
unknown
plain_text
a year ago
4.3 kB
1
Indexable
Never
<!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>JSP Registration Form</title>

<!-- Font Icon -->
<link rel="stylesheet"
	href="fonts/material-icon/css/material-design-iconic-font.min.css">

<!-- Main css -->
<link rel="stylesheet" href="boostrap.min.css">
</head>
<body>
<input type="hidden" id="status" value="<%= request.getAttribute("status") %>">

	<div class="main">


		<!-- Sign up form -->
		<section class="signup">
			<div class="container">
				<div class="signup-content">
					<div class="signup-form">
						<h2 class="form-title">Sign up</h2>
		
					
						<form method="post" action="register" class="register-form" id="register-form">
    <div class="form-group">

        <label for="name"><i class="zmdi zmdi-account material-icons-name"></i></label>
        <input type="text" name="name" id="name" placeholder="Your Name"  />
        <span class="error-message" id="name-error"></span>
    </div>
    <div class="form-group">
        <label for="email"><i class="zmdi zmdi-email"></i></label>
        <input type="email" name="email" id="email" placeholder="Your Email" />
        <span class="error-message" id="email-error"></span>
    </div>
    <div class="form-group">
        <label for="pass"><i class="zmdi zmdi-lock"></i></label>
        <input type="password" name="pass" id="pass" placeholder="Password"  />
        <span class="error-message" id="pass-error"></span>
    </div>
    <div class="form-group">
        <label for="re-pass"><i class="zmdi zmdi-lock-outline"></i></label>
        <input type="password" name="re_pass" id="re_pass" placeholder="Repeat your password"  />
        <span class="error-message" id="repass-error"></span>
    </div>
    <div class="form-group">
        <label for="contact"><i class="zmdi zmdi-lock-outline"></i></label>
        <input type="text" name="contact" id="contact" placeholder="Contact no"  />
        <span class="error-message" id="contact-error"></span>
    </div>
    <div class="form-group">
        <input type="checkbox" name="agree-term" id="agree-term" class="agree-term"  />
        <label for="agree-term" class="label-agree-term"  ><span><span></span></span>I agree all statements in <a href="#" class="term-service">Terms of service</a></label>
        <span class="error-message" id="agree-error"></span>
    </div>
    <div class="form-group form-button">
        <input type="submit" name="signup" id="signup" class="form-submit" value="register" />
    </div>
</form>
						
						
				</div>
					<div class="signup-image">
						<figure>
							<img src="images/signup-image.jpg" alt="sing up image">
						</figure>
						<a href="login.jsp" class="signup-image-link">I am already a
							member</a>
					</div>
				</div>
			</div>
		</section>


	</div>
	<!-- JS -->
	<script src="vendor/jquery/jquery.min.js"></script>
	<script src="js/main.js"></script>
	<script src="
https://cdn.jsdelivr.net/npm/sweetalert2@11.7.2/dist/sweetalert2.all.min.js
"></script>
<link href="
https://cdn.jsdelivr.net/npm/sweetalert2@11.7.2/dist/sweetalert2.min.css
" rel="stylesheet">

	
	<script>
	var status = document.getElementById("status").value;
	
	if(status == "success" ){
		Swal.fire(
				  'Success!',
				  'You have successfully created your account!',
				  'success'
				);
	} 
	if(status == "invalidName" ){
		Swal.fire(
				  'Sorry!',
				  'Please Enter Name',
				  'error'
				);
	}
	if(status == "invalidEmail" ){
		Swal.fire(
				  'Sorry!',
				  'Please Enter Email',
				  'error'
				);
	}
	if(status == "invalidUpwd" ){
		Swal.fire(
				  'Sorry!',
				  'Please Enter Password',
				  'error'
				);
	}
	if(status == "invalidConfirmPassword" ){
		Swal.fire(
				  'Sorry!',
				  'Password does not match!',
				  'error'
				);
	}
	if(status == "invalidMobile" ){
		Swal.fire(
				  'Sorry!',
				  'Please Enter Mobile Number',
				  'error'
				);
	}
	if(status == "invalidMobileLength" ){
		Swal.fire(
				  'Sorry!',
				  'Mobile Number should consist of 11 digits',
				  'error'
				);
	}
   </script>
	

</body>
</html>