Browse Source

form changes

master
mohammedthaqi 2 years ago
parent
commit
63ff2a988b
  1. 4
      src/main/resources/application.properties
  2. BIN
      src/main/resources/static/images/gcclogo1.jpeg
  3. 144
      src/main/resources/templates/index.html

4
src/main/resources/application.properties

@ -1,8 +1,8 @@
spring.application.name=volunteersregistration spring.application.name=volunteersregistration
spring.datasource.url=jdbc:mysql://localhost:3306/volunteer
spring.datasource.url=jdbc:mysql://localhost:3306/volunteers
spring.datasource.username=root spring.datasource.username=root
spring.datasource.password=gccroot
spring.datasource.password=root
spring.jpa.hibernate.ddl-auto=update spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true spring.jpa.show-sql=true
spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver spring.datasource.driver-class-name=com.mysql.cj.jdbc.Driver

BIN
src/main/resources/static/images/gcclogo1.jpeg

After

Width: 325  |  Height: 435  |  Size: 38 KiB

144
src/main/resources/templates/index.html

@ -3,12 +3,27 @@
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<title>ChennaiCorporation</title>
<title>Chennai-Corporation</title>
<!-- Bootstrap CSS --> <!-- Bootstrap CSS -->
<link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet"> <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script> <script src="https://ajax.googleapis.com/ajax/libs/jquery/3.7.1/jquery.min.js"></script>
<!-- SweetAlert CSS --> <!-- SweetAlert CSS -->
<!--
<link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.css">
-->
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<!-- SweetAlert JS -->
<!--
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
-->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<style> <style>
/*for radio button style*/ /*for radio button style*/
.radio-group { .radio-group {
@ -69,10 +84,68 @@
label { label {
color: #858585; color: #858585;
} }
/* Header Styling */
.header {
background-color: #1d495a;
padding: 10px 20px;
display: flex;
align-items: center;
justify-content: space-between;
color: white;
font-family: Arial, sans-serif;
}
.header .logo {
display: flex;
align-items: center;
}
.header .logo img {
height: 60px;
}
.header .menu {
display: flex;
justify-content: center;
align-items: center;
flex-grow: 1;
margin-left: 20px;
}
.header .menu a {
color: white;
margin: 0 15px;
text-decoration: none;
}
.header .menu a:hover {
text-decoration: underline;
}
</style> </style>
</head> </head>
<body style="background-color: #ebf1fa;"> <body style="background-color: #ebf1fa;">
<!-- Header Section -->
<div class="header">
<!-- Left Logo -->
<div class="logo">
<img src="/images/gcclogo1.jpeg" alt="Greater Chennai Corporation Logo">
<span class="ml-2">GREATER CHENNAI CORPORATION</span>
</div>
<!-- Center Menu -->
<div class="menu">
<a href="https://chennaicorporation.gov.in/gcc/">Home</a>
<a href="https://chennaicorporation.gov.in/gcc/about-GCC/">About GCC</a>
<a href="https://chennaicorporation.gov.in/gcc/who-is-who/index_data.jsp">Who'sWho</a>
<a href="https://chennaicorporation.gov.in/gcc/council/about-council/">Council</a>
<a href="https://chennaicorporation.gov.in/gcc/tender/">Tender</a>
<a href="https://chennaicorporation.gov.in/gcc/department/">Departments</a>
<a href="https://chennaicorporation.gov.in/gcc/online-services/">Online Services</a>
</div>
</div>
<div class="container mt-5"> <div class="container mt-5">
<form onsubmit="return validateForm();"> <form onsubmit="return validateForm();">
@ -247,12 +320,12 @@
<h3>Employment Details</h3> <h3>Employment Details</h3>
<div class="form-row mb-4"> <div class="form-row mb-4">
<div class="col-md-6"> <div class="col-md-6">
<label for="occupation">Current Occupation</label>
<input type="text" class="form-control" id="occupation" placeholder="Enter Current Occupation...">
<label for="occupation">Company/NGO Name (Enter NA if not working)</label>
<input type="text" class="form-control" id="occupation" placeholder="Enter company/NGO...">
</div> </div>
<div class="col-md-6">
<div class="col-md-6" style="display:none;">
<label for="designation">Designation</label> <label for="designation">Designation</label>
<input type="text" class="form-control" id="designation" placeholder="Enter Designation..."> <input type="text" class="form-control" id="designation" placeholder="Enter Designation...">
@ -262,7 +335,7 @@
<h3>Other Information</h3> <h3>Other Information</h3>
<div class="form-row mb-4"> <div class="form-row mb-4">
<div class="col-md-6"> <div class="col-md-6">
<label for="ngoAny">NGO you are associated with,if any</label>
<label for="ngoAny">Company/NGO you are associated with,if any(NA otherwise) *</label>
<input type="text" class="form-control" id="ngoAny" placeholder=""> <input type="text" class="form-control" id="ngoAny" placeholder="">
</div> </div>
<div class="col-md-6"> <div class="col-md-6">
@ -299,14 +372,14 @@
<div class="col-md-6"> <div class="col-md-6">
<label for="cmpEmail">Email *</label>
<input type="text" class="form-control" id="cmpEmail" placeholder="Enter Company Email">
<label for="cmpEmail">Company Email ID</label>
<input type="text" class="form-control" id="cmpEmail" placeholder="Enter Company Email ID">
</div> </div>
</div> </div>
<div class="form-row mb-4">
<div class="form-row mb-4" style="display:none;">
<div class="col-md-6"> <div class="col-md-6">
<label for="cmpLandline">Phone</label> <label for="cmpLandline">Phone</label>
<div class="input-group mb-3"> <div class="input-group mb-3">
@ -424,14 +497,14 @@
<div class="col-md-6"> <div class="col-md-6">
<label for="ngoOrgEmail">Email *</label>
<input type="text" class="form-control" id="ngoOrgEmail" placeholder="Enter Email">
<label for="ngoOrgEmail">Company Email ID</label>
<input type="text" class="form-control" id="ngoOrgEmail" placeholder="Enter Email ID">
</div> </div>
</div> </div>
<div class="form-row mb-4">
<div class="form-row mb-4" style="display:none;">
<div class="col-md-6"> <div class="col-md-6">
<label for="oLandline">Phone</label> <label for="oLandline">Phone</label>
<div class="input-group mb-3"> <div class="input-group mb-3">
@ -672,14 +745,7 @@
</form> </form>
</div> </div>
<!-- Bootstrap JS -->
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
<!-- SweetAlert JS -->
<script src="https://cdnjs.cloudflare.com/ajax/libs/sweetalert/1.1.3/sweetalert.min.js"></script>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/3.5.1/jquery.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
<script> <script>
@ -732,6 +798,12 @@
let mobilePattern = /^[0-9]{10}$/; let mobilePattern = /^[0-9]{10}$/;
let pincodePattern = /^[0-9]{6}$/; let pincodePattern = /^[0-9]{6}$/;
function validateForm(){ function validateForm(){
var i = 0;
$(".zone-checkbox:checked").each(function() {
if( $(this).val()){
i++;
};
});
var category = document.getElementById("category").value; var category = document.getElementById("category").value;
if (category === "Individual") { if (category === "Individual") {
@ -749,6 +821,8 @@
// var occupation = document.getElementById("occupation").value= document.getElementById("occupation").value.trim(); // var occupation = document.getElementById("occupation").value= document.getElementById("occupation").value.trim();
// var designation = document.getElementById("designation").value= document.getElementById("designation").value.trim(); // var designation = document.getElementById("designation").value= document.getElementById("designation").value.trim();
let preVolSelected = document.querySelector('input[name="preVol"]:checked'); let preVolSelected = document.querySelector('input[name="preVol"]:checked');
var ngoAny = document.getElementById("ngoAny").value= document.getElementById("ngoAny").value.trim();
var dob = document.getElementById("dob").value= document.getElementById("dob").value.trim();
if(subcategory == -1){ if(subcategory == -1){
alert("Please Select SubCategory !"); alert("Please Select SubCategory !");
return false; return false;
@ -761,6 +835,10 @@
alert("Please enter a valid Email ID"); alert("Please enter a valid Email ID");
return false; return false;
} }
if(dob == undefined || dob == ""){
alert("Please enter a Date of birth");
return false;
}
if(!genderSelected){ if(!genderSelected){
alert("Please Select Gender !"); alert("Please Select Gender !");
return false; return false;
@ -806,6 +884,14 @@
alert("Please Select Previous Volunteer details !"); alert("Please Select Previous Volunteer details !");
return false; return false;
} }
if(ngoAny == undefined || ngoAny == ""){
alert("Please Enter Company/NGO details !");
return false;
}
if(i==0){
alert("Please select Preferred Area details !");
return false;
}
saveTheIndividualForm(); saveTheIndividualForm();
return false; return false;
} }
@ -854,6 +940,10 @@
alert("Please Select previous volunteers details"); alert("Please Select previous volunteers details");
return false; return false;
} }
if(i==0){
alert("Please select Preferred Area details !");
return false;
}
saveCorporateDetails(); saveCorporateDetails();
return false; return false;
} }
@ -869,6 +959,7 @@
var cmpPoc = document.getElementById("oPoc").value= document.getElementById("oPoc").value.trim(); var cmpPoc = document.getElementById("oPoc").value= document.getElementById("oPoc").value.trim();
var cmdPom = document.getElementById("oPom").value= document.getElementById("oPom").value.trim(); var cmdPom = document.getElementById("oPom").value= document.getElementById("oPom").value.trim();
var cmpPVolSelect = document.querySelector('input[name="oPvolY"]:checked'); var cmpPVolSelect = document.querySelector('input[name="oPvolY"]:checked');
var oPoE = document.getElementById("oPoE").value= document.getElementById("oPoE").value.trim();
if(cmpName== undefined || cmpName == ""){ if(cmpName== undefined || cmpName == ""){
alert("Please Enter Organisation Name"); alert("Please Enter Organisation Name");
@ -890,8 +981,8 @@
alert("Please Enter Point of Conduct Name"); alert("Please Enter Point of Conduct Name");
return false; return false;
} }
if (ngoOrgEmail === "" || !emailPattern.test(ngoOrgEmail)) {
alert("Please enter a valid Email ID");
if (oPoE === "" || !emailPattern.test(oPoE)) {
alert("Please enter Point of Conduct valid Email ID");
return false; return false;
} }
if(cmdPom == undefined || cmdPom == "" || !mobilePattern.test(cmdPom)){ if(cmdPom == undefined || cmdPom == "" || !mobilePattern.test(cmdPom)){
@ -902,6 +993,10 @@
alert("Please Select previous volunteers details"); alert("Please Select previous volunteers details");
return false; return false;
} }
if(i==0){
alert("Please select Preferred Area details !");
return false;
}
saveNGODetails(); saveNGODetails();
return false; return false;
@ -1050,8 +1145,11 @@
title: "Good job!", title: "Good job!",
text: "Thank you for registering as a volunteer \nwith the Greater Chennai Corporation for monsoon support! \nYour registration is successful, and your reference number is [GCC-"+id+"]. \nYou will be contacted once the final listing is complete and deployment details \nare confirmed. Together, we can help Chennai stay safe this monsoon", text: "Thank you for registering as a volunteer \nwith the Greater Chennai Corporation for monsoon support! \nYour registration is successful, and your reference number is [GCC-"+id+"]. \nYou will be contacted once the final listing is complete and deployment details \nare confirmed. Together, we can help Chennai stay safe this monsoon",
icon: "success" icon: "success"
})
//location.reload();
}).then((result) => {
if (result.isConfirmed) {
location.reload(); // Reload the page when "OK" is clicked
}
});
} }
</script> </script>

Loading…
Cancel
Save