Browse Source

changes in register page

master
yoganandhan 10 months ago
parent
commit
2b5293f9a4
  1. 2
      src/main/java/com/gcc/crslogs/controller/ApiController.java
  2. 79
      src/main/java/com/gcc/crslogs/service/BirthAndDeathDetailsService.java
  3. 69
      src/main/resources/templates/modules/crslogspages/birthloginpage.html
  4. 7
      src/main/resources/templates/modules/crslogspages/death.html
  5. 69
      src/main/resources/templates/modules/crslogspages/deathloginpage.html

2
src/main/java/com/gcc/crslogs/controller/ApiController.java

@ -258,7 +258,7 @@ public ResponseEntity<?> fetchDeathCertificateSecurely(@RequestBody Map<String,
if (dod == null || dod.isEmpty() || sex == null || sex.isEmpty()) { if (dod == null || dod.isEmpty() || sex == null || sex.isEmpty()) {
Map<String, Object> error = new HashMap<>(); Map<String, Object> error = new HashMap<>();
error.put("status", false); error.put("status", false);
error.put("message", "DOB and Sex are mandatory.");
error.put("message", "dod and Sex are mandatory.");
return ResponseEntity.badRequest().body(error); return ResponseEntity.badRequest().body(error);
} }

79
src/main/java/com/gcc/crslogs/service/BirthAndDeathDetailsService.java

@ -31,12 +31,9 @@ import com.fasterxml.jackson.databind.ObjectMapper;
@Service @Service
public class BirthAndDeathDetailsService { public class BirthAndDeathDetailsService {
@Autowired @Autowired
private final RestTemplate restTemplate; private final RestTemplate restTemplate;
@Autowired @Autowired
private JdbcTemplate jdbcTemplate; private JdbcTemplate jdbcTemplate;
@ -44,11 +41,10 @@ public class BirthAndDeathDetailsService {
this.restTemplate = builder.build(); this.restTemplate = builder.build();
} }
// using for live // using for live
public Map<String, Object> fetchBirthCertificate(String dob, String sex, String regno, String childName, String fatherName, String motherName) throws Exception {
public Map<String, Object> fetchBirthCertificate(String dob, String sex, String regno, String childName,
String fatherName, String motherName) throws Exception {
Map<String, String> params = new LinkedHashMap(); // keep order Map<String, String> params = new LinkedHashMap(); // keep order
params.put("regno", regno != null ? regno : ""); params.put("regno", regno != null ? regno : "");
params.put("sex", sex); params.put("sex", sex);
@ -61,7 +57,8 @@ public class BirthAndDeathDetailsService {
String serviceInput = mapper.writeValueAsString(params); String serviceInput = mapper.writeValueAsString(params);
// Final raw URL — NOT encoded // Final raw URL — NOT encoded
String BirthCertificateapiUrl = "https://chennaicorporation.gov.in/gcc/Api/BirthCertificate_json.jsp?serviceinput=" + serviceInput;
String BirthCertificateapiUrl = "https://chennaicorporation.gov.in/gcc/Api/BirthCertificate_json.jsp?serviceinput="
+ serviceInput;
// System.out.println("⏩ Raw JSON: " + serviceInput); // System.out.println("⏩ Raw JSON: " + serviceInput);
// System.out.println("🌐 FINAL RAW URL: " + BirthCertificateapiUrl); // System.out.println("🌐 FINAL RAW URL: " + BirthCertificateapiUrl);
@ -72,19 +69,18 @@ public class BirthAndDeathDetailsService {
HttpEntity<String> entity = new HttpEntity<>(headers); HttpEntity<String> entity = new HttpEntity<>(headers);
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> response = restTemplate.exchange(BirthCertificateapiUrl, HttpMethod.GET, entity, String.class);
ResponseEntity<String> response = restTemplate.exchange(BirthCertificateapiUrl, HttpMethod.GET, entity,
String.class);
String rawJson = response.getBody(); String rawJson = response.getBody();
String cleanJson = sanitizeJsonResponse(rawJson); String cleanJson = sanitizeJsonResponse(rawJson);
// System.out.println("✅ API Raw Response: " + cleanJson); // System.out.println("✅ API Raw Response: " + cleanJson);
return mapper.readValue(cleanJson, new TypeReference<Map<String, Object>>() {});
return mapper.readValue(cleanJson, new TypeReference<Map<String, Object>>() {
});
} }
// to created our external api from restservices // to created our external api from restservices
public Map<String, Object> fetchLocalBirthCertificate( public Map<String, Object> fetchLocalBirthCertificate(
@ -92,6 +88,9 @@ public class BirthAndDeathDetailsService {
String apiUrl = "https://gccservices.chennaicorporation.gov.in/gccrestservices/api/birth-certificate/by-detailsnewforWeb"; String apiUrl = "https://gccservices.chennaicorporation.gov.in/gccrestservices/api/birth-certificate/by-detailsnewforWeb";
// String apiUrl =
// "http://localhost:8077/gccrestservices/api/birth-certificate/by-detailsnewforWeb";
MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
params.add("incident_date", dob); // yyyy-MM-dd params.add("incident_date", dob); // yyyy-MM-dd
params.add("gender", sex); params.add("gender", sex);
@ -116,7 +115,8 @@ public class BirthAndDeathDetailsService {
String rawJson = response.getBody(); String rawJson = response.getBody();
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
Map<String, Object> result = mapper.readValue(rawJson, new TypeReference<Map<String, Object>>() {});
Map<String, Object> result = mapper.readValue(rawJson, new TypeReference<Map<String, Object>>() {
});
// ✅ Only keep records that actually have a PDF link // ✅ Only keep records that actually have a PDF link
if (result.containsKey("certificate_details")) { if (result.containsKey("certificate_details")) {
@ -132,12 +132,6 @@ public class BirthAndDeathDetailsService {
return result; return result;
} }
// to created our external api from restservices // to created our external api from restservices
public Map<String, Object> fetchLocalDeathCertificate( public Map<String, Object> fetchLocalDeathCertificate(
@ -145,6 +139,9 @@ public class BirthAndDeathDetailsService {
String apiUrl = "https://gccservices.chennaicorporation.gov.in/gccrestservices/api/death-certificate/by-detailsnewforWeb"; String apiUrl = "https://gccservices.chennaicorporation.gov.in/gccrestservices/api/death-certificate/by-detailsnewforWeb";
// String apiUrl =
// "http://localhost:8077/gccrestservices/api/death-certificate/by-detailsnewforWeb";
MultiValueMap<String, String> params = new LinkedMultiValueMap<>(); MultiValueMap<String, String> params = new LinkedMultiValueMap<>();
params.add("incident_date", dod); // yyyy-MM-dd params.add("incident_date", dod); // yyyy-MM-dd
params.add("gender", sex); params.add("gender", sex);
@ -169,7 +166,8 @@ public class BirthAndDeathDetailsService {
String rawJson = response.getBody(); String rawJson = response.getBody();
ObjectMapper mapper = new ObjectMapper(); ObjectMapper mapper = new ObjectMapper();
Map<String, Object> result = mapper.readValue(rawJson, new TypeReference<Map<String, Object>>() {});
Map<String, Object> result = mapper.readValue(rawJson, new TypeReference<Map<String, Object>>() {
});
// ✅ Only keep records that actually have a PDF link // ✅ Only keep records that actually have a PDF link
if (result.containsKey("certificate_details")) { if (result.containsKey("certificate_details")) {
List<Map<String, Object>> details = (List<Map<String, Object>>) result.get("certificate_details"); List<Map<String, Object>> details = (List<Map<String, Object>>) result.get("certificate_details");
@ -184,14 +182,10 @@ public class BirthAndDeathDetailsService {
return result; return result;
} }
// using in live // using in live
public Map<String, Object> fetchDeathCertificate(String dod, String sex, String regno, String personName, String fatherName, String motherName) throws Exception {
public Map<String, Object> fetchDeathCertificate(String dod, String sex, String regno, String personName,
String fatherName, String motherName) throws Exception {
@SuppressWarnings("rawtypes") @SuppressWarnings("rawtypes")
Map<String, String> params = new LinkedHashMap(); // keep order Map<String, String> params = new LinkedHashMap(); // keep order
params.put("regno", regno != null ? regno : ""); params.put("regno", regno != null ? regno : "");
@ -205,7 +199,8 @@ public class BirthAndDeathDetailsService {
String serviceInput = mapper.writeValueAsString(params); String serviceInput = mapper.writeValueAsString(params);
// Final raw URL — NOT encoded // Final raw URL — NOT encoded
String DeathCertificateapiUrl = "https://chennaicorporation.gov.in/gcc/Api/DeathCertificate_json.jsp?serviceinput=" + serviceInput;
String DeathCertificateapiUrl = "https://chennaicorporation.gov.in/gcc/Api/DeathCertificate_json.jsp?serviceinput="
+ serviceInput;
// System.out.println("⏩ Raw JSON: " + serviceInput); // System.out.println("⏩ Raw JSON: " + serviceInput);
// System.out.println("🌐 FINAL RAW URL: " + DeathCertificateapiUrl); // System.out.println("🌐 FINAL RAW URL: " + DeathCertificateapiUrl);
@ -216,26 +211,26 @@ public class BirthAndDeathDetailsService {
HttpEntity<String> entity = new HttpEntity<>(headers); HttpEntity<String> entity = new HttpEntity<>(headers);
RestTemplate restTemplate = new RestTemplate(); RestTemplate restTemplate = new RestTemplate();
ResponseEntity<String> response = restTemplate.exchange(DeathCertificateapiUrl, HttpMethod.GET, entity, String.class);
ResponseEntity<String> response = restTemplate.exchange(DeathCertificateapiUrl, HttpMethod.GET, entity,
String.class);
// System.out.println("✅ API Raw Response: " + response.getBody()); // System.out.println("✅ API Raw Response: " + response.getBody());
String rawJson = response.getBody(); String rawJson = response.getBody();
String cleanJson = sanitizeJsonResponse(rawJson); String cleanJson = sanitizeJsonResponse(rawJson);
return mapper.readValue(cleanJson, new TypeReference<Map<String, Object>>() {});
return mapper.readValue(cleanJson, new TypeReference<Map<String, Object>>() {
});
} }
private String sanitizeJsonResponse(String rawJson) { private String sanitizeJsonResponse(String rawJson) {
if (rawJson == null) return "";
if (rawJson == null)
return "";
// Remove quote before parenthesis (fixes: "NAME" : "ABC "(LATE)") // Remove quote before parenthesis (fixes: "NAME" : "ABC "(LATE)")
String fixed = rawJson.replaceAll("\"\\s*\\(([^)]*)\\)\"", " ($1)\""); String fixed = rawJson.replaceAll("\"\\s*\\(([^)]*)\\)\"", " ($1)\"");
// Remove parenthesis and content outside of quotes (fixes: ... "ABC" (LATE) ... → ... "ABC" ...)
// Remove parenthesis and content outside of quotes (fixes: ... "ABC" (LATE) ...
// → ... "ABC" ...)
fixed = fixed.replaceAll("\"\\s*\\([^)]*\\)", "\""); fixed = fixed.replaceAll("\"\\s*\\([^)]*\\)", "\"");
return fixed return fixed
@ -253,10 +248,6 @@ public class BirthAndDeathDetailsService {
.replaceAll(":(\\s*)\"{2,}\"", ":\"\""); // handle `:"""` to `:""` .replaceAll(":(\\s*)\"{2,}\"", ":\"\""); // handle `:"""` to `:""`
} }
@Transactional @Transactional
public ResponseEntity<?> saveNewUser(String user_name, String user_address, String user_mobile) { public ResponseEntity<?> saveNewUser(String user_name, String user_address, String user_mobile) {
Map<String, Object> result = new HashMap(); Map<String, Object> result = new HashMap();
@ -274,18 +265,14 @@ public class BirthAndDeathDetailsService {
} }
} }
public boolean isUserRegistered(String mobile) { public boolean isUserRegistered(String mobile) {
String sql = "SELECT COUNT(*) FROM users WHERE user_mobile = ?"; String sql = "SELECT COUNT(*) FROM users WHERE user_mobile = ?";
Integer count = jdbcTemplate.queryForObject(sql, new Object[] { mobile }, Integer.class); Integer count = jdbcTemplate.queryForObject(sql, new Object[] { mobile }, Integer.class);
return count != null && count > 0; return count != null && count > 0;
} }
public ResponseEntity<?> saveCertificateLogs(String regNo, String eventDate, String url, String service, int userid) {
public ResponseEntity<?> saveCertificateLogs(String regNo, String eventDate, String url, String service,
int userid) {
String sql = "Insert into certificate_logs (regno, event_date, english_url, service, user_id) VALUES (?, ?, ?, ?, ?)"; String sql = "Insert into certificate_logs (regno, event_date, english_url, service, user_id) VALUES (?, ?, ?, ?, ?)";
Integer count = jdbcTemplate.update(sql, regNo, eventDate, url, service, userid); Integer count = jdbcTemplate.update(sql, regNo, eventDate, url, service, userid);
return count != null && count > 0 ? ResponseEntity.ok(count) : ResponseEntity.notFound().build(); return count != null && count > 0 ? ResponseEntity.ok(count) : ResponseEntity.notFound().build();
@ -296,6 +283,4 @@ public class BirthAndDeathDetailsService {
return jdbcTemplate.queryForMap(sql, mobNo); return jdbcTemplate.queryForMap(sql, mobNo);
} }
} }

69
src/main/resources/templates/modules/crslogspages/birthloginpage.html

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"> <html lang="en" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,7 +15,6 @@
<!-- <link th:href="@{/styles/loginpage.css}" rel="stylesheet" /> --> <!-- <link th:href="@{/styles/loginpage.css}" rel="stylesheet" /> -->
<style> <style>
/* Header Styling */ /* Header Styling */
.header { .header {
background-color: #134356; background-color: #134356;
@ -52,7 +52,8 @@
padding: 10px; padding: 10px;
display: none; display: none;
flex-direction: column; flex-direction: column;
z-index: 1000; /* Add z-index to bring the menu above other elements */
z-index: 1000;
/* Add z-index to bring the menu above other elements */
} }
.menu-dropdown a { .menu-dropdown a {
@ -111,7 +112,8 @@
} }
.bottom-container { .bottom-container {
margin-bottom: 50px; /* Adjust as needed */
margin-bottom: 50px;
/* Adjust as needed */
} }
@ -136,7 +138,8 @@
.menu-dropdown { .menu-dropdown {
right: 0; right: 0;
left: 0; left: 0;
z-index: 1000; /* Add z-index to bring the menu above other elements */
z-index: 1000;
/* Add z-index to bring the menu above other elements */
} }
} }
@ -147,24 +150,26 @@
.button-wrapper { .button-wrapper {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 20px; /* adds space from the top */
margin-top: 20px;
/* adds space from the top */
} }
#registersubmit { #registersubmit {
background-color: #0c4f63; background-color: #0c4f63;
border: none; border: none;
width: 150px; /* optional: set fixed width */
width: 150px;
/* optional: set fixed width */
} }
#submitBtn { #submitBtn {
background-color: #0c4f63; background-color: #0c4f63;
border: none; border: none;
width: 150px; /* optional: set fixed width */
width: 150px;
/* optional: set fixed width */
} }
</style> </style>
</head> </head>
<body style="background-color: #ebf1fa;"> <body style="background-color: #ebf1fa;">
<!-- Header Start--> <!-- Header Start-->
@ -204,20 +209,24 @@
<!-- First Card --> <!-- First Card -->
<!-- Register Card --> <!-- Register Card -->
<!-- Register Card --> <!-- Register Card -->
<div class="card register-card mx-auto mt-5" style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; display:none;">
<div class="card register-card mx-auto mt-5"
style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; display:none;">
<div class="card-body "> <div class="card-body ">
<h4 class="text-center mb-4" style="color: #004865;"><strong>Registration of Birth Certificate Download</strong></h4>
<h4 class="text-center mb-4" style="color: #004865;"><strong>Registration of Birth Certificate
Download</strong></h4>
<hr> <hr>
<!-- Name --> <!-- Name -->
<div class="form-group"> <div class="form-group">
<label for="name">Name</label><span class="text-danger">*</span> <label for="name">Name</label><span class="text-danger">*</span>
<input type="text" class="form-control " id="name" placeholder="Enter your name" oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
<input type="text" class="form-control " id="name" placeholder="Enter your name"
oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
</div> </div>
<!-- Phone --> <!-- Phone -->
<div class="form-group"> <div class="form-group">
<label for="phone">Mobile No</label><span class="text-danger">*</span> <label for="phone">Mobile No</label><span class="text-danger">*</span>
<input type="text" class="form-control" id="phone" placeholder="Enter Mobile number" oninput="validatePhoneNumber(this)">
<input type="text" class="form-control" id="phone" placeholder="Enter Mobile number"
oninput="validatePhoneNumber(this)">
</div> </div>
<!-- Address --> <!-- Address -->
@ -249,7 +258,8 @@
<div class="card login-card mx-auto mt-5" style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; " >
<div class="card login-card mx-auto mt-5"
style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; ">
<div class="card-body "> <div class="card-body ">
<h4 class="text-center mb-4" style="color: #004865;"><strong>Birth Certificate Download</strong></h4> <h4 class="text-center mb-4" style="color: #004865;"><strong>Birth Certificate Download</strong></h4>
<hr> <hr>
@ -257,10 +267,8 @@
<div class="form-group"> <div class="form-group">
<label for="phone">Mobile No</label> <label for="phone">Mobile No</label>
<span class="text-danger">*</span> <span class="text-danger">*</span>
<input type="text"
id="phoneNumber" class="form-control"
placeholder="Enter Registered Mobile number"
oninput="validatePhoneNumber(this)">
<input type="text" id="phoneNumber" class="form-control"
placeholder="Enter Registered Mobile number" oninput="validatePhoneNumber(this)">
</div> </div>
@ -286,16 +294,14 @@
<!-- OTP Modal --> <!-- OTP Modal -->
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog"
aria-labelledby="otpFormLabel" aria-hidden="true">
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<form action="" onsubmit="return verifyOtp(1); "> <!--1 mentioned for existing user login --> <form action="" onsubmit="return verifyOtp(1); "> <!--1 mentioned for existing user login -->
<div class="modal-header"> <div class="modal-header">
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP <h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP
Login</h6> Login</h6>
<button type="button" class="close" data-bs-dismiss="modal"
aria-label="Close"
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"
style="color: black; border: white; background-color: white;"> style="color: black; border: white; background-color: white;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
@ -303,8 +309,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="row "> <div class="row ">
<div class="mb-3" style="text-align: center;"> <div class="mb-3" style="text-align: center;">
<img src="https://gccservices.in/gcc/files/c_d/otp.png"
width="50%" alt="Mobileotp">
<img src="https://gccservices.in/gcc/files/c_d/otp.png" width="50%" alt="Mobileotp">
</div> </div>
</div> </div>
@ -320,13 +325,11 @@
<div class="row d-flex justify-content-center align-items-center"> <div class="row d-flex justify-content-center align-items-center">
<div class="mb-3 "> <div class="mb-3 ">
<div class="otp-input-box"> <div class="otp-input-box">
<input type="text" maxlength="1" class="otp-input" id="otp1"
required /> <input type="text" maxlength="1"
class="otp-input" id="otp2" required /> <input type="text"
maxlength="1" class="otp-input" id="otp3" required /> <input
<input type="text" maxlength="1" class="otp-input" id="otp1" required /> <input
type="text" maxlength="1" class="otp-input" id="otp2" required /> <input
type="text" maxlength="1" class="otp-input" id="otp3" required /> <input
type="text" maxlength="1" class="otp-input" id="otp4" required /> type="text" maxlength="1" class="otp-input" id="otp4" required />
<input type="text" maxlength="1" class="otp-input" id="otp5"
required />
<input type="text" maxlength="1" class="otp-input" id="otp5" required />
</div> </div>
</div> </div>
</div> </div>
@ -340,8 +343,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary" id="but">Verify <button type="submit" class="btn btn-primary" id="but">Verify
OTP</button> OTP</button>
</div> </div>
@ -523,7 +525,7 @@ $(document).ready(function () {
$('#name').val(''); $('#name').val('');
$('#phone').val(''); $('#phone').val('');
// $('#address').val(''); // $('#address').val('');
window.location.href = "/crs/loginpage";
window.location.href = "/crs/birth";
}); });
}, },
error: function (xhr) { error: function (xhr) {
@ -837,4 +839,5 @@ $(document).ready(function () {
</body> </body>
</html> </html>

7
src/main/resources/templates/modules/crslogspages/death.html

@ -704,7 +704,7 @@ $(document).ready(function () {
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
const today = new Date().toISOString().split("T")[0]; // yyyy-mm-dd format const today = new Date().toISOString().split("T")[0]; // yyyy-mm-dd format
document.getElementById("dateofbirth").setAttribute("max", today);
//document.getElementById("dateofbirth").setAttribute("max", today);
document.getElementById("dateofdeath").setAttribute("max", today); document.getElementById("dateofdeath").setAttribute("max", today);
}); });
@ -848,7 +848,7 @@ function validateCaptcha(type) {
document.addEventListener("DOMContentLoaded", function () { document.addEventListener("DOMContentLoaded", function () {
generateCaptcha("birth");
// generateCaptcha("birth");
generateCaptcha("death"); generateCaptcha("death");
}); });
@ -1029,10 +1029,11 @@ $.ajax({
contentType: 'application/json', contentType: 'application/json',
data: JSON.stringify(payload), data: JSON.stringify(payload),
success: function (response) { success: function (response) {
$('#pageLoader').hide(); $('#pageLoader').hide();
if (response && response.certificate_details && response.certificate_details.length > 0) { if (response && response.certificate_details && response.certificate_details.length > 0) {
let html = '<table id="deathDataTable" class="table table-bordered"><thead><tr>' +
let html = '<table id="deathDataTable" class="table table-bordered table-striped"><thead><tr>' +
'<th>S.No</th><th>Reg No</th><th>Person Name</th>' + '<th>S.No</th><th>Reg No</th><th>Person Name</th>' +
'<th>Father Name</th><th>Mother Name</th><th>DOD</th><th>Certificate Link</th></tr></thead><tbody>'; '<th>Father Name</th><th>Mother Name</th><th>DOD</th><th>Certificate Link</th></tr></thead><tbody>';

69
src/main/resources/templates/modules/crslogspages/deathloginpage.html

@ -1,5 +1,6 @@
<!DOCTYPE html> <!DOCTYPE html>
<html lang="en" xmlns:th="http://www.thymeleaf.org"> <html lang="en" xmlns:th="http://www.thymeleaf.org">
<head> <head>
<meta charset="UTF-8"> <meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0"> <meta name="viewport" content="width=device-width, initial-scale=1.0">
@ -14,7 +15,6 @@
<!-- <link th:href="@{/styles/loginpage.css}" rel="stylesheet" /> --> <!-- <link th:href="@{/styles/loginpage.css}" rel="stylesheet" /> -->
<style> <style>
/* Header Styling */ /* Header Styling */
.header { .header {
background-color: #134356; background-color: #134356;
@ -52,7 +52,8 @@
padding: 10px; padding: 10px;
display: none; display: none;
flex-direction: column; flex-direction: column;
z-index: 1000; /* Add z-index to bring the menu above other elements */
z-index: 1000;
/* Add z-index to bring the menu above other elements */
} }
.menu-dropdown a { .menu-dropdown a {
@ -111,7 +112,8 @@
} }
.bottom-container { .bottom-container {
margin-bottom: 50px; /* Adjust as needed */
margin-bottom: 50px;
/* Adjust as needed */
} }
@ -136,7 +138,8 @@
.menu-dropdown { .menu-dropdown {
right: 0; right: 0;
left: 0; left: 0;
z-index: 1000; /* Add z-index to bring the menu above other elements */
z-index: 1000;
/* Add z-index to bring the menu above other elements */
} }
} }
@ -147,24 +150,26 @@
.button-wrapper { .button-wrapper {
display: flex; display: flex;
justify-content: center; justify-content: center;
margin-top: 20px; /* adds space from the top */
margin-top: 20px;
/* adds space from the top */
} }
#registersubmit { #registersubmit {
background-color: #0c4f63; background-color: #0c4f63;
border: none; border: none;
width: 150px; /* optional: set fixed width */
width: 150px;
/* optional: set fixed width */
} }
#submitBtn { #submitBtn {
background-color: #0c4f63; background-color: #0c4f63;
border: none; border: none;
width: 150px; /* optional: set fixed width */
width: 150px;
/* optional: set fixed width */
} }
</style> </style>
</head> </head>
<body style="background-color: #ebf1fa;"> <body style="background-color: #ebf1fa;">
<!-- Header Start--> <!-- Header Start-->
@ -204,20 +209,24 @@
<!-- First Card --> <!-- First Card -->
<!-- Register Card --> <!-- Register Card -->
<!-- Register Card --> <!-- Register Card -->
<div class="card register-card mx-auto mt-5" style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; display:none;">
<div class="card register-card mx-auto mt-5"
style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; display:none;">
<div class="card-body "> <div class="card-body ">
<h4 class="text-center mb-4" style="color: #004865;"><strong>Registration of Death Certificate Download</strong></h4>
<h4 class="text-center mb-4" style="color: #004865;"><strong>Registration of Death Certificate
Download</strong></h4>
<hr> <hr>
<!-- Name --> <!-- Name -->
<div class="form-group"> <div class="form-group">
<label for="name">Name</label><span class="text-danger">*</span> <label for="name">Name</label><span class="text-danger">*</span>
<input type="text" class="form-control " id="name" placeholder="Enter your name" oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
<input type="text" class="form-control " id="name" placeholder="Enter your name"
oninput="this.value = this.value.replace(/[^a-zA-Z\s]/g, '')">
</div> </div>
<!-- Phone --> <!-- Phone -->
<div class="form-group"> <div class="form-group">
<label for="phone">Mobile No</label><span class="text-danger">*</span> <label for="phone">Mobile No</label><span class="text-danger">*</span>
<input type="text" class="form-control" id="phone" placeholder="Enter Mobile number" oninput="validatePhoneNumber(this)">
<input type="text" class="form-control" id="phone" placeholder="Enter Mobile number"
oninput="validatePhoneNumber(this)">
</div> </div>
<!-- Address --> <!-- Address -->
@ -249,7 +258,8 @@
<div class="card login-card mx-auto mt-5" style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; " >
<div class="card login-card mx-auto mt-5"
style="max-width: 400px; background-color: rgba(44, 84, 103, 0.1); backdrop-filter: blur(10px); border-radius: 20px; border: 1px solid #ffffff40; ">
<div class="card-body "> <div class="card-body ">
<h4 class="text-center mb-4" style="color: #004865;"><strong>Death Certificate Download</strong></h4> <h4 class="text-center mb-4" style="color: #004865;"><strong>Death Certificate Download</strong></h4>
<hr> <hr>
@ -257,10 +267,8 @@
<div class="form-group"> <div class="form-group">
<label for="phone">Mobile No</label> <label for="phone">Mobile No</label>
<span class="text-danger">*</span> <span class="text-danger">*</span>
<input type="text"
id="phoneNumber" class="form-control"
placeholder="Enter Registered Mobile number"
oninput="validatePhoneNumber(this)">
<input type="text" id="phoneNumber" class="form-control"
placeholder="Enter Registered Mobile number" oninput="validatePhoneNumber(this)">
</div> </div>
@ -286,16 +294,14 @@
<!-- OTP Modal --> <!-- OTP Modal -->
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog"
aria-labelledby="otpFormLabel" aria-hidden="true">
<div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true">
<div class="modal-dialog" role="document"> <div class="modal-dialog" role="document">
<div class="modal-content"> <div class="modal-content">
<form action="" onsubmit="return verifyOtp(1); "> <!--1 mentioned for existing user login --> <form action="" onsubmit="return verifyOtp(1); "> <!--1 mentioned for existing user login -->
<div class="modal-header"> <div class="modal-header">
<h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP <h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP
Login</h6> Login</h6>
<button type="button" class="close" data-bs-dismiss="modal"
aria-label="Close"
<button type="button" class="close" data-bs-dismiss="modal" aria-label="Close"
style="color: black; border: white; background-color: white;"> style="color: black; border: white; background-color: white;">
<span aria-hidden="true">&times;</span> <span aria-hidden="true">&times;</span>
</button> </button>
@ -303,8 +309,7 @@
<div class="modal-body"> <div class="modal-body">
<div class="row "> <div class="row ">
<div class="mb-3" style="text-align: center;"> <div class="mb-3" style="text-align: center;">
<img src="https://gccservices.in/gcc/files/c_d/otp.png"
width="50%" alt="Mobileotp">
<img src="https://gccservices.in/gcc/files/c_d/otp.png" width="50%" alt="Mobileotp">
</div> </div>
</div> </div>
@ -320,13 +325,11 @@
<div class="row d-flex justify-content-center align-items-center"> <div class="row d-flex justify-content-center align-items-center">
<div class="mb-3 "> <div class="mb-3 ">
<div class="otp-input-box"> <div class="otp-input-box">
<input type="text" maxlength="1" class="otp-input" id="otp1"
required /> <input type="text" maxlength="1"
class="otp-input" id="otp2" required /> <input type="text"
maxlength="1" class="otp-input" id="otp3" required /> <input
<input type="text" maxlength="1" class="otp-input" id="otp1" required /> <input
type="text" maxlength="1" class="otp-input" id="otp2" required /> <input
type="text" maxlength="1" class="otp-input" id="otp3" required /> <input
type="text" maxlength="1" class="otp-input" id="otp4" required /> type="text" maxlength="1" class="otp-input" id="otp4" required />
<input type="text" maxlength="1" class="otp-input" id="otp5"
required />
<input type="text" maxlength="1" class="otp-input" id="otp5" required />
</div> </div>
</div> </div>
</div> </div>
@ -340,8 +343,7 @@
</div> </div>
<div class="modal-footer"> <div class="modal-footer">
<button type="button" class="btn btn-secondary"
data-bs-dismiss="modal">Close</button>
<button type="button" class="btn btn-secondary" data-bs-dismiss="modal">Close</button>
<button type="submit" class="btn btn-primary" id="but">Verify <button type="submit" class="btn btn-primary" id="but">Verify
OTP</button> OTP</button>
</div> </div>
@ -523,7 +525,7 @@ $(document).ready(function () {
$('#name').val(''); $('#name').val('');
$('#phone').val(''); $('#phone').val('');
// $('#address').val(''); // $('#address').val('');
window.location.href = "/crs/loginpage";
window.location.href = "/crs/death";
}); });
}, },
error: function (xhr) { error: function (xhr) {
@ -837,4 +839,5 @@ $(document).ready(function () {
</body> </body>
</html> </html>
Loading…
Cancel
Save