Both Volunteers and C and D Waste included in this project
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

2508 lines
89 KiB

​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
​
  1. <!DOCTYPE html>
  2. <html xmlns:th="http://www.thymeleaf.org">
  3. <head>
  4. <meta charset="UTF-8">
  5. <title>GCC - Volunteers</title>
  6. <!-- Links to Bootstrap CSS and JS, jQuery, and SweetAlert -->
  7. <!-- Bootstrap CSS -->
  8. <link href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css" rel="stylesheet">
  9. <!-- jQuery (Only load it once) -->
  10. <script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
  11. <!-- Popper.js (Required for Bootstrap 4) -->
  12. <script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.11.0/umd/popper.min.js"></script>
  13. <!-- Bootstrap JS -->
  14. <script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
  15. <!-- SweetAlert JS (optional if you plan to use it) -->
  16. <script src="https://cdn.jsdelivr.net/npm/sweetalert2@11"></script>
  17. <style>
  18. /*for radio button style*/
  19. .radio-group {
  20. display: flex;
  21. align-items: center;
  22. /* Ensures all items are aligned to the center */
  23. }
  24. .radio-item {
  25. display: flex;
  26. align-items: center;
  27. margin-right: 20px;
  28. /* Adds space between each radio item */
  29. }
  30. .radio-item input[type="radio"] {
  31. margin-right: 10px;
  32. /* Adds space between the radio button and its label */
  33. vertical-align: middle;
  34. /* Ensures vertical alignment */
  35. }
  36. .radio-item label {
  37. margin: 0;
  38. /* Removes any default margins that might affect alignment */
  39. }
  40. /*for radio button style*/
  41. /*checkbox style*/
  42. .zone-checkbox-label {
  43. display: inline-block;
  44. padding: 10px 15px;
  45. border: 1px solid #ccc;
  46. border-radius: 8px;
  47. background-color: #f8f9fa;
  48. font-size: 16px;
  49. cursor: pointer;
  50. text-align: center;
  51. width: 100%;
  52. height:80px;
  53. }
  54. .zone-checkbox {
  55. margin-right: 10px;
  56. }
  57. .form-check {
  58. display: flex;
  59. align-items: center;
  60. margin-bottom: 10px;
  61. }
  62. .form-check-input {
  63. transform: scale(1.5);
  64. }
  65. /*checkbox style*/
  66. label {
  67. color: #858585;
  68. }
  69. /* Header Styling */
  70. /* .header {
  71. background-color: #1d495a;
  72. padding: 10px 20px;
  73. display: flex;
  74. align-items: center;
  75. justify-content: space-between;
  76. color: white;
  77. font-family: Arial, sans-serif;
  78. }
  79. .header .logo {
  80. display: flex;
  81. align-items: center;
  82. }
  83. .header .logo img {
  84. height: 60px;
  85. }
  86. .header .menu {
  87. display: flex;
  88. justify-content: center;
  89. align-items: center;
  90. flex-grow: 1;
  91. margin-left: 20px;
  92. }
  93. .header .menu a {
  94. color: white;
  95. margin: 0 15px;
  96. text-decoration: none;
  97. }
  98. .header .menu a:hover {
  99. text-decoration: underline;
  100. } */
  101. .req {
  102. color: red;
  103. }
  104. /* otp*/
  105. .otp-input-box {
  106. display: flex;
  107. justify-content: center;
  108. gap: 10px;
  109. /* Adjust spacing between the inputs */
  110. }
  111. .otp-input {
  112. width: 50px;
  113. /* Width for a square input */
  114. height: 50px;
  115. /* Height for a square input */
  116. font-size: 24px;
  117. /* Make the digits larger */
  118. text-align: center;
  119. /* Center the digit inside the box */
  120. border: 1px solid #ccc;
  121. /* Optional: add a border */
  122. border-radius: 5px;
  123. /* Optional: rounded corners */
  124. outline: none;
  125. /* Remove default focus outline */
  126. transition: border-color 0.3s ease;
  127. }
  128. .otp-input:focus {
  129. border-color: #007bff;
  130. /* Change border color on focus */
  131. }
  132. /* otp*/
  133. /*send otp styles*/
  134. .input-group .form-control {
  135. border-right: 0;
  136. /* Remove right border of the input to blend with the button */
  137. }
  138. .input-group-append .btn {
  139. border-left: 0;
  140. /* Remove left border of the button */
  141. }
  142. @media (max-width: 768px) {
  143. .zone-checkbox-label {
  144. font-size: 14px;
  145. }
  146. }
  147. .volunteer-header {
  148. position: relative;
  149. color: #1d4859;
  150. min-height: 58px;
  151. display: flex;
  152. align-items: center;
  153. justify-content: center;
  154. }
  155. .volunteer-title {
  156. margin: 0;
  157. text-align: center;
  158. }
  159. .language-buttons {
  160. position: absolute;
  161. right: 15px;
  162. top: 50%;
  163. transform: translateY(-50%);
  164. display: flex;
  165. gap: 5px;
  166. }
  167. .language-buttons .btn {
  168. border-color: #1d4859;
  169. color: #1d4859;
  170. }
  171. .language-buttons .btn:hover {
  172. background-color: #1d4859;
  173. color: white;
  174. }
  175. .language-buttons .btn.active,
  176. .language-buttons .btn-primary {
  177. background-color: #1d4859;
  178. border-color: #1d4859;
  179. color: white;
  180. }
  181. </style>
  182. </head>
  183. <body style="background-color: #ebf1fa;">
  184. <h1 style="display: none;">GCC Volunteers</h1>
  185. <h1 style="display: none;">GCC Volunteers Registration</h1>
  186. <h1 style="display: none;">Chennai Volunteers </h1>
  187. <h1 style="display: none;">Volunteers </h1>
  188. <!--
  189. <div class="header">
  190. <div class="logo">
  191. <img src="https://gccservices.in/gcc/assets/images/logo.png" alt="Greater Chennai Corporation Logo">
  192. <span class="ml-2">GREATER CHENNAI CORPORATION</span>
  193. </div>
  194. <div class="menu">
  195. <a href="https://chennaicorporation.gov.in/gcc/">Home</a>
  196. <a href="https://chennaicorporation.gov.in/gcc/about-GCC/">About GCC</a>
  197. <a href="https://chennaicorporation.gov.in/gcc/who-is-who/index_data.jsp">Who'sWho</a>
  198. <a href="https://chennaicorporation.gov.in/gcc/council/about-council/">Council</a>
  199. <a href="https://chennaicorporation.gov.in/gcc/tender/">Tender</a>
  200. <a href="https://chennaicorporation.gov.in/gcc/department/">Departments</a>
  201. <a href="https://chennaicorporation.gov.in/gcc/online-services/">Online Services</a>
  202. </div>
  203. </div>
  204. -->
  205. <!-- Header Start-->
  206. <div class="container-fluid mt-5">
  207. <div id="loader" style="display: none; text-align: center;">
  208. <img src="/images/Thin broken ring.gif" alt="Loading..." />
  209. </div>
  210. <!-- <form onsubmit="return validateForm();" id="myForm"> -->
  211. <form id="myForm">
  212. <!-- Dropdowns for selecting category and subcategory -->
  213. <!-- Bootstrap Card for displaying uploaded details -->
  214. <div class="card" style="background-color: white;">
  215. <div class="card-header volunteer-header">
  216. <!-- <h3 class="volunteer-title">
  217. ஜிசிசி தன்னார்வலர்கள்
  218. </h3> -->
  219. <div class="language-buttons">
  220. <a href="/volunteer"
  221. class="btn btn-sm btn-outline-primary">
  222. English
  223. </a>
  224. <a href="/volunteer/index_tamil"
  225. class="btn btn-sm btn-primary">
  226. தமிழ்
  227. </a>
  228. </div>
  229. </div>
  230. <div class="card-body">
  231. <div class="form-row mb-4">
  232. <div class="col-lg-12 col-md-12 mb-3">
  233. <label for="category">வகையைத் தேர்ந்தெடுக்கவும் <span class="req">*</span></label>
  234. <select class="form-control" id="category" onchange="handleCategoryChange()">
  235. <!-- <option value="-1">Select</option>
  236. <option value="Individual">Individual</option>
  237. <option value="Corporate">Corporate</option>
  238. <option value="NGO">NGO/Other Associations</option> -->
  239. </select>
  240. <span class="text-danger" id="categoryError"></span>
  241. </div>
  242. <div class="col-lg-12 col-md-12 mb-3">
  243. <label for="subcategory">துணைப் பிரிவைத் தேர்ந்தெடுக்கவும் <span class="req">*</span></label>
  244. <select class="form-control" id="subcategory">
  245. <!-- <option value="-1">Select</option> -->
  246. </select>
  247. <span class="text-danger" id="subcategoryError"></span>
  248. </div>
  249. </div>
  250. <input type="hidden" class="form-control" id="ref" th:value="${ref}">
  251. <!-- Individual Form -->
  252. <div class="individual-form" id="individual">
  253. <h3>தொடர்பு விவரங்கள்</h3>
  254. <div class="form-row mb-4">
  255. <div class="col-lg-12 col-md-12 mb-3">
  256. <label for="name">பெயர்<span class="req">*</span></label>
  257. <input type="text" class="form-control" id="name" placeholder="பெயரை உள்ளிடவும்">
  258. <span class="text-danger" id="nameError"></span>
  259. </div>
  260. <!-- <div class="col-lg-12 col-md-12 mb-3">
  261. <label for="aadhar">Aadhar Number<span class="req">*</span></label>
  262. <input type="text" class="form-control" id="aadhar" maxlength="12"
  263. placeholder="Enter Aadhar No... " oninput="validateAadhar()">
  264. <span class="text-danger" id="aadharError"></span>
  265. </div> -->
  266. </div>
  267. <div class="form-row mb-4">
  268. <div class="col-lg-12 col-md-12 mb-3">
  269. <label for="email">மின்னஞ்சல் </label>
  270. <input type="text" class="form-control" id="email" placeholder="மின்னஞ்சலை உள்ளிடவும்">
  271. </div>
  272. <div class="col-lg-12 col-md-12 mb-3">
  273. <label for="dob">பிறந்த தேதி <span class="req">*</span></label>
  274. <input type="date" class="form-control" id="dob" onchange="validateAge()">
  275. <span class="text-danger" id="dobError"></span>
  276. </div>
  277. </div>
  278. <div class="form-row mb-4">
  279. <div class="col-lg-12 col-md-12 mb-3">
  280. <label for="gender">பாலினம்<span class="req">*</span></label>
  281. <div class="radio-group">
  282. <div class="radio-item">
  283. <input type="radio" id="male" name="gender" value="male" checked>
  284. <label for="male">ஆண்</label>
  285. </div>
  286. <div class="radio-item">
  287. <input type="radio" id="female" name="gender" value="female">
  288. <label for="female">பெண்</label>
  289. </div>
  290. <div class="radio-item">
  291. <input type="radio" id="others" name="gender" value="others">
  292. <label for="others">மற்றவர்கள்</label>
  293. </div>
  294. </div>
  295. <span class="text-danger" id="genderError"></span>
  296. </div>
  297. <div class="col-lg-12 col-md-12 mb-3">
  298. <label for="mobile">மொபைல்<span class="req">*</span></label>
  299. <div class="input-group mb-3">
  300. <div class="input-group-prepend">
  301. <span class="input-group-text" id="basic">+91</span>
  302. </div>
  303. <input type="text" class="form-control" id="mobile"
  304. placeholder="வாட்ஸ்அப் மொபைல் எண்ணை உள்ளிடவும்" aria-label="Mobile"
  305. aria-describedby="basic-addon1">
  306. <button class="btn btn-primary" id="sendOtpButton">
  307. <i class="fa fa-mobile-phone"></i> OTP அனுப்பு
  308. </button>
  309. <button class="btn btn-success" id="verifiedOTP" style="display:none" disabled>
  310. <i class="fa fa-mobile-phone"></i> OTP சரிபார்க்கப்பட்டது
  311. </button>
  312. </div>
  313. <span class="text-danger" id="mobileError"></span>
  314. </div>
  315. </div>
  316. <div class="form-row mb-4">
  317. <!-- <div class="col-lg-12 col-md-12 mb-3">
  318. <label for="phone">Phone</label>
  319. <div class="input-group mb-3">
  320. <div class="input-group-prepend">
  321. <span class="input-group-text" id="basic2">044</span>
  322. </div>
  323. <input type="text" class="form-control" id="landline"
  324. placeholder="Enter Landline Number" aria-label="Mobile"
  325. aria-describedby="basic-addon1" minlength="10" maxlength="10"
  326. pattern="[6-9]{1}[0-9]{9}">
  327. </div>
  328. </div> -->
  329. <div class="col-lg-12 col-md-12 mb-3">
  330. <label for="district">மாவட்டம் </label>
  331. <input type="text" class="form-control" id="district" value="Chennai" disabled>
  332. </div>
  333. </div>
  334. <div class="form-row mb-4">
  335. <div class="col-lg-12 col-md-12 mb-3">
  336. <label for="address">முகவரி <span class="req">*</span></label>
  337. <input type="text" class="form-control" id="address" placeholder="முகவரியை உள்ளிடவும்...">
  338. <span class="text-danger" id="addressError"></span>
  339. </div>
  340. <div class="col-lg-12 col-md-12 mb-3">
  341. <label for="pincode">அஞ்சல் குறியீடு<span class="req">*</span></label>
  342. <input type="text" class="form-control" minlength="6" maxlength="6" pattern="[0-9]{6}"
  343. id="pincode" placeholder="அஞ்சல் குறியீட்டை உள்ளிடவும்...">
  344. <span class="text-danger" id="pincodeError"></span>
  345. </div>
  346. </div>
  347. <!-- <div class="form-row mb-4">
  348. <div class="col-lg-12 col-md-12 mb-3">
  349. <label for="bloodgroup">Blood Group<span class="req">*</span></label>
  350. <select class="form-control" id="bloodgroup" name="bloodgroup">
  351. <option value="-1">Select Blood Group</option>
  352. <option value="A+">A+</option>
  353. <option value="A-">A-</option>
  354. <option value="B+">B+</option>
  355. <option value="B-">B-</option>
  356. <option value="O+">O+</option>
  357. <option value="O-">O-</option>
  358. <option value="AB+">AB+</option>
  359. <option value="AB-">AB-</option>
  360. </select>
  361. <span class="text-danger" id="addressError"></span>
  362. </div>
  363. </div> -->
  364. <!-- <h3>Education Qualification Details</h3>
  365. <div class="form-row mb-4">
  366. <div class="col-lg-12 col-md-12 mb-3">
  367. <label for="edu">Qualification<span class="req">*</span></label>
  368. <input type="text" class="form-control" id="edu"
  369. placeholder="Enter Highest Qualification Obtained">
  370. <span class="text-danger" id="eduError"></span>
  371. </div>
  372. <div class="col-lg-12 col-md-12 mb-3">
  373. <label for="college">College/Institution Name<span class="req">*</span></label>
  374. <input type="text" class="form-control" id="college" placeholder="Enter College Name ">
  375. <span class="text-danger" id="collegeError"></span>
  376. </div>
  377. </div>
  378. <div class="form-row mb-4">
  379. <div class="col-lg-12 col-md-12 mb-3">
  380. <label for="nss">NSS Cadet<span class="req">*</span></label>
  381. <div class="radio-group">
  382. <div class="radio-item">
  383. <input type="radio" id="nssY" name="nss" value="true" checked>
  384. <label for="nssY">Yes</label>
  385. </div>
  386. <div class="radio-item">
  387. <input type="radio" id="nssN" name="nss" value="false">
  388. <label for="nssN">No</label>
  389. </div>
  390. </div>
  391. <span class="text-danger" id="nssError"></span>
  392. </div>
  393. <div class="col-lg-12 col-md-12 mb-3">
  394. <label for="ncc">NCC Cadet<span class="req">*</span></label>
  395. <div class="radio-group">
  396. <div class="radio-item">
  397. <input type="radio" id="nccY" name="ncc" value="true" checked>
  398. <label for="male">Yes</label>
  399. </div>
  400. <div class="radio-item">
  401. <input type="radio" id="nccN" name="ncc" value="false">
  402. <label for="female">No</label>
  403. </div>
  404. </div>
  405. <span class="text-danger" id="nccError"></span>
  406. </div>
  407. </div> -->
  408. <!-- <h3>Employment Details</h3>
  409. <div class="form-row mb-4">
  410. <div class="col-lg-12 col-md-12 mb-3">
  411. <label for="occupation">Company/NGO Name (Enter NA if not working)</label>
  412. <input type="text" class="form-control" id="occupation"
  413. placeholder="Enter company/NGO...">
  414. </div>
  415. <div class="col-lg-12 col-md-12 mb-3" style="display:none;">
  416. <label for="designation">Designation</label>
  417. <input type="text" class="form-control" id="designation"
  418. placeholder="Enter Designation...">
  419. </div>
  420. </div> -->
  421. <!-- <h3>Other Information</h3> -->
  422. <div class="form-row mb-4">
  423. <!-- <div class="col-lg-12 col-md-12 mb-3">
  424. <label for="ngoAny">Company/NGO you are associated with,if any(NA otherwise)<span
  425. class="req">*</span></label>
  426. <input type="text" class="form-control" id="ngoAny" placeholder="">
  427. <span class="text-danger" id="ngoAnyError"></span>
  428. </div> -->
  429. <div class="col-lg-12 col-md-12 mb-3">
  430. <label for="prevol"><strong>நீங்கள் இதற்கு முன்பு ஏதேனும் அவசரகாலச் சூழ்நிலையில் தன்னார்வத் தொண்டு செய்திருக்கிறீர்களா?</strong><span
  431. class="req">*</span></label>
  432. <div class="radio-group">
  433. <div class="radio-item">
  434. <input type="radio" id="preVolY" name="preVol" value="true" checked>
  435. <label for="preVolY">ஆம்</label>
  436. </div>
  437. <div class="radio-item">
  438. <input type="radio" id="preVolN" name="preVol" value="false">
  439. <label for="preVolN">இல்லை</label>
  440. </div>
  441. </div>
  442. <span class="text-danger" id="prevolError"></span>
  443. </div>
  444. </div>
  445. <div class="form-row mb-4">
  446. <div class="col-lg-12 col-md-12 mb-3">
  447. <label for="docs">
  448. ஆவணம்<span class="req">*</span>
  449. </label>
  450. <select class="form-control" id="docs">
  451. </select>
  452. <span class="text-danger" id="docsError"></span>
  453. </div>
  454. </div>
  455. <!-- Dynamic fields -->
  456. <div class="form-row" id="documentFields"></div>
  457. </div>
  458. <!-- Individual Form -->
  459. <!-- Corporate Form -->
  460. <div class="corporate-form" id="corporate">
  461. <h3>தொடர்பு விவரங்கள்</h3>
  462. <div class="form-row mb-4">
  463. <div class="col-lg-12 col-md-12 mb-3">
  464. <label for="cmpName">நிறுவனத்தின் பெயர் <span class="req">*</span></label>
  465. <input type="text" class="form-control" id="cmpName" placeholder="நிறுவனத்தின் பெயரை உள்ளிடவும்">
  466. <span class="text-danger" id="cmpNameError"></span>
  467. </div>
  468. <div class="col-lg-12 col-md-12 mb-3">
  469. <label for="cmpEmail">நிறுவன மின்னஞ்சல் ஐடி</label>
  470. <input type="text" class="form-control" id="cmpEmail" placeholder="நிறுவன மின்னஞ்சல் முகவரியை உள்ளிடவும்">
  471. <span class="text-danger" id="cmpEmailError"></span>
  472. </div>
  473. </div>
  474. <div class="form-row mb-4" style="display:none;">
  475. <div class="col-lg-12 col-md-12 mb-3">
  476. <label for="cmpLandline">Phone</label>
  477. <div class="input-group mb-3">
  478. <div class="input-group-prepend">
  479. <span class="input-group-text" id="basic-ad">044</span>
  480. </div>
  481. <input type="text" class="form-control" id="cmpLandline"
  482. placeholder="Enter LandLine Number" aria-label="Mobile"
  483. aria-describedby="basic-addon1">
  484. </div>
  485. </div>
  486. <div class="col-lg-12 col-md-12 mb-3">
  487. <label for="cmpMobile">Mobile</label>
  488. <div class="input-group mb-3">
  489. <div class="input-group-prepend">
  490. <span class="input-group-text" id="basic-on1">+91</span>
  491. </div>
  492. <input type="text" class="form-control" id="cmpMobile"
  493. placeholder="Enter Mobile Number" aria-label="Mobile"
  494. aria-describedby="basic-addon1" minlength="10" maxlength="10"
  495. pattern="[6-9]{1}[0-9]{9}">
  496. </div>
  497. </div>
  498. </div>
  499. <div class="form-row mb-4">
  500. <div class="col-lg-12 col-md-12 mb-3">
  501. <label for="cmpDistrict">மாவட்டம் </label>
  502. <input type="text" class="form-control" id="cmpDistrict" value="Chennai" disabled>
  503. </div>
  504. </div>
  505. <div class="form-row mb-4">
  506. <div class="col-lg-12 col-md-12 mb-3">
  507. <label for="cmpAddress">முகவரி <span class="req">*</span></label>
  508. <input type="text" class="form-control" id="cmpAddress" placeholder="முகவரியை உள்ளிடவும்...">
  509. <span class="text-danger" id="cmpAddressError"></span>
  510. </div>
  511. <div class="col-lg-12 col-md-12 mb-3">
  512. <label for="cmpPincode">அஞ்சல் குறியீடு <span class="req">*</span></label>
  513. <input type="text" class="form-control" id="cmpPincode" minlength="6" maxlength="6"
  514. pattern="[0-9]{6}" placeholder="அஞ்சல் குறியீட்டை உள்ளிடவும்...">
  515. <span class="text-danger" id="cmpPincodeError"></span>
  516. </div>
  517. </div>
  518. <h4 class="">உங்கள் நிறுவனத்திலிருந்து தன்னார்வலர்களின் எண்ணிக்கை <span class="req">*</span></h4>
  519. <div class="form-row mb-4">
  520. <div class="col-lg-12 col-md-12 mb-3">
  521. <input type="number" class="form-control" id="cmpNov">
  522. <span class="text-danger" id="cmpNovError"></span>
  523. </div>
  524. </div>
  525. <h4>நிறுவனத்தில் தொடர்பு கொள்ள வேண்டிய நபர்</h4>
  526. <div class="form-row mb-4">
  527. <div class="col-lg-12 col-md-12 mb-3">
  528. <label for="cmpPoc">பெயர் <span class="req">*</span></label>
  529. <input type="text" class="form-control" id="cmpPoc" placeholder="பெயரை உள்ளிடவும்">
  530. <span class="text-danger" id="cmpPocError"></span>
  531. </div>
  532. <div class="col-lg-12 col-md-12 mb-3">
  533. <label for="cmdPod">பதவிப்பெயர் <span class="req">*</span></label>
  534. <input type="text" class="form-control" id="cmdPod" placeholder="பதவியை உள்ளிடவும்...">
  535. <span class="text-danger" id="cmdPodError"></span>
  536. </div>
  537. </div>
  538. <div class="form-row mb-4">
  539. <div class="col-lg-12 col-md-12 mb-3">
  540. <label for="cmdPoE">மின்னஞ்சல் முகவரி<span class="req">*</span></label>
  541. <input type="text" class="form-control" id="cmdPoE" placeholder="மின்னஞ்சல் முகவரியை உள்ளிடவும்...">
  542. <span class="text-danger" id="cmdPoEError"></span>
  543. </div>
  544. <div class="col-lg-12 col-md-12 mb-3">
  545. <label for="cmdPom">தொலைபேசி எண்<span class="req">*</span></label>
  546. <input type="text" class="form-control" id="cmdPom" placeholder="கைபேசி எண்ணை உள்ளிடவும்...">
  547. <span class="text-danger" id="cmdPomError"></span>
  548. </div>
  549. </div>
  550. <div class="form-row mb-4">
  551. <div class="col-lg-12 col-md-12 mb-3">
  552. <label for="comprevol">உங்கள் நிறுவனம் இதற்கு முன்னர் ஏதேனும் அவசரகாலச் சூழ்நிலையில் தன்னார்வத் தொண்டு செய்துள்ளதா?<span class="req">*</span></label>
  553. <div class="radio-group">
  554. <div class="radio-item">
  555. <input type="radio" id="cmpVolY" name="cmpPVol" value="true" checked>
  556. <label for="cmpVolY">ஆம் </label>
  557. </div>
  558. <div class="radio-item">
  559. <input type="radio" id="cmpVolN" name="cmpPVol" value="false">
  560. <label for="cmpVolN">இல்லை</label>
  561. </div>
  562. </div>
  563. <span class="text-danger" id="comprevolError"></span>
  564. </div>
  565. </div>
  566. </div>
  567. <!-- Corporate Form -->
  568. <!-- NGO Form -->
  569. <div class="ngo-form" id="ngo">
  570. <h3>தொடர்பு விவரங்கள்</h3>
  571. <div class="form-row mb-4">
  572. <div class="col-lg-12 col-md-12 col-sm-12 mb-3">
  573. <label for="ngoOrgName">நிறுவனத்தின் பெயர் <span class="req">*</span></label>
  574. <input type="text" class="form-control" id="ngoOrgName" placeholder="பெயரை உள்ளிடவும்">
  575. <span class="text-danger" id="ngoOrgNameError"></span>
  576. </div>
  577. <div class="col-lg-12 col-md-12 mb-3">
  578. <label for="ngoOrgEmail">நிறுவன மின்னஞ்சல் ஐடி</label>
  579. <input type="text" class="form-control" id="ngoOrgEmail" placeholder="மின்னஞ்சல் முகவரியை உள்ளிடவும்">
  580. <span class="text-danger" id="ngoOrgEmailError"></span>
  581. </div>
  582. </div>
  583. <div class="form-row mb-4" style="display:none;">
  584. <div class="col-lg-12 col-md-12 mb-3">
  585. <label for="oLandline">Phone</label>
  586. <div class="input-group mb-3">
  587. <div class="input-group-prepend">
  588. <span class="input-group-text" id="basic-aon1">044</span>
  589. </div>
  590. <input type="text" class="form-control" id="oLandline"
  591. placeholder="Enter Landline Number" aria-label="Mobile"
  592. aria-describedby="basic-addon1">
  593. </div>
  594. </div>
  595. <div class="col-lg-12 col-md-12 mb-3">
  596. <label for="oMobile">Mobile</label>
  597. <div class="input-group mb-3">
  598. <div class="input-group-prepend">
  599. <span class="input-group-text" id="basic-addon1">+91</span>
  600. </div>
  601. <input type="text" class="form-control" id="oMobile"
  602. placeholder="Enter Mobile Number" aria-label="Mobile"
  603. aria-describedby="basic-addon1">
  604. </div>
  605. </div>
  606. </div>
  607. <div class="form-row mb-4">
  608. <div class="col-lg-12 col-md-12 mb-3">
  609. <label for="oDistrict">மாவட்டம் </label>
  610. <input type="text" class="form-control" id="oDistrict" value="Chennai" disabled>
  611. </div>
  612. </div>
  613. <div class="form-row mb-4">
  614. <div class="col-lg-12 col-md-12 mb-3">
  615. <label for="oAddress">முகவரி <span class="req">*</span></label>
  616. <input type="text" class="form-control" id="oAddress" placeholder="முகவரியை உள்ளிடவும்...">
  617. <span class="text-danger" id="oAddressError"></span>
  618. </div>
  619. <div class="col-lg-12 col-md-12 mb-3">
  620. <label for="oPincode">அஞ்சல் குறியீடு<span class="req">*</span></label>
  621. <input type="picode" class="form-control" id="oPincode" minlength="6" maxlength="6"
  622. pattern="[0-9]{6}" placeholder="அஞ்சல் குறியீட்டை உள்ளிடவும்...">
  623. <span class="text-danger" id="oPincodeError"></span>
  624. </div>
  625. </div>
  626. <h4 class="volorg">உங்கள் அமைப்பிலிருந்து தன்னார்வலர்களின் எண்ணிக்கை<span class="req">*</span></h4>
  627. <div class="form-row mb-4">
  628. <div class="col-lg-12 col-md-12 mb-3">
  629. <input type="number" class="form-control" id="oNvol">
  630. <span class="text-danger" id="oNvolError"></span>
  631. </div>
  632. </div>
  633. <h4>நிறுவனத்தில் தொடர்பு கொள்ள வேண்டிய நபர் </h4>
  634. <div class="form-row mb-4">
  635. <div class="col-lg-12 col-md-12 mb-3">
  636. <label for="oPoc">பெயர் <span class="req">*</span></label>
  637. <input type="text" class="form-control" id="oPoc" placeholder="நபரின் பெயர்">
  638. <span class="text-danger" id="oPocError"></span>
  639. </div>
  640. <div class="col-lg-12 col-md-12 mb-3">
  641. <label for="oPod">பதவிப்பெயர்<span class="req">*</span></label>
  642. <input type="text" class="form-control" id="oPod" placeholder="பதவியை உள்ளிடவும்...">
  643. <span class="text-danger" id="oPodError"></span>
  644. </div>
  645. </div>
  646. <div class="form-row mb-4">
  647. <div class="col-lg-12 col-md-12 mb-3">
  648. <label for="oPoe">மின்னஞ்சல் முகவரி<span class="req">*</span></label>
  649. <input type="text" class="form-control" id="oPoE" placeholder="மின்னஞ்சல் முகவரியை உள்ளிடவும்...">
  650. <span class="text-danger" id="oPoeError"></span>
  651. </div>
  652. <div class="col-lg-12 col-md-12 mb-3">
  653. <label for="oPom">தொலைபேசி எண் <span class="req">*</span></label>
  654. <input type="text" class="form-control" id="oPom" placeholder="தொலைபேசி எண்ணை உள்ளிடவும்...">
  655. <span class="text-danger" id="oPomError"></span>
  656. </div>
  657. </div>
  658. <div class="form-row mb-4">
  659. <div class="col-lg-12 col-md-12 mb-3">
  660. <label for="oPvolY">உங்கள் அமைப்பு இதற்கு முன்னர் ஏதேனும் அவசரகாலச் சூழ்நிலைகளில் தன்னார்வத் தொண்டு செய்துள்ளதா?<span class="req">*</span></label>
  661. <div class="radio-group">
  662. <div class="radio-item">
  663. <input type="radio" id="oPvolY" name="oPvolY" value="true" checked>
  664. <label for="male">ஆம் </label>
  665. </div>
  666. <div class="radio-item">
  667. <input type="radio" id="oPvolN" name="oPvolY" value="false">
  668. <label for="female">இல்லை</label>
  669. </div>
  670. </div>
  671. <span class="text-danger" id="oPvolYError"></span>
  672. </div>
  673. </div>
  674. </div>
  675. <!-- NGO Form -->
  676. <div class="form-row">
  677. <div class="col-lg-12 col-md-12 mb-3">
  678. <label for="expertise">நிபுணத்துவத் துறை<span class="req">*</span></label>
  679. <select class="form-control" id="expertise">
  680. </select>
  681. <span class="text-danger" id="expertiseError"></span>
  682. </div>
  683. <!-- Dynamic Other Expertise field -->
  684. <div class="col-lg-12 col-md-12 mb-3" id="otherExpertiseContainer" style="display:none;">
  685. <label for="otherExpertise">
  686. மற்ற நிபுணத்துவத்தைக் குறிப்பிடவும்<span class="req">*</span>
  687. </label>
  688. <input type="text"
  689. class="form-control"
  690. id="other_expertise"
  691. placeholder="மற்ற நிபுணத்துவத்தைக் குறிப்பிடவும்"
  692. autocomplete="off">
  693. <span class="text-danger" id="otherExpertiseError"></span>
  694. </div>
  695. <div class="col-lg-12 col-md-12 mb-3">
  696. <label for="ephno">அவசரக்காலத் தொலைபேசி எண்<span class="req">*</span></label>
  697. <input type="text" class="form-control" id="ephno" placeholder="அவசரக்காலத் தொலைபேசி எண்" maxlength="10" inputmode="numeric" autocomplete="off" required="required">
  698. <span class="text-danger" id="ephnoError"></span>
  699. </div>
  700. </div>
  701. <!-- Preferred area of work checkboxes -->
  702. <h5>விருப்பமான பணியிடம்<span class="req">*</span></h5>
  703. <div class="form-check mb-3">
  704. <input class="form-check-input zone-checkbox" type="checkbox" id="anyArea" name="anyArea"
  705. value="0-any" onclick="checkAnyArea()">
  706. <label class="form-check-label" for="anyArea">சென்னையில் எந்தப் பகுதியிலும்</label>
  707. <span class="text-danger" id="anyAreaError"></span>
  708. </div>
  709. <div class="container mt-5">
  710. <!-- First Row of Zones -->
  711. <div class="form-row">
  712. <div class="col-6">
  713. <div class="form-check">
  714. <input class="form-check-input zone-checkbox" type="checkbox" id="zone1"
  715. name="zone1" value="1-Thiruvottiyur" onclick="checkAnyArea()">
  716. <label class="zone-checkbox-label" for="zone1">மண்டலம் 1 <br> (திருவொற்றியூர்)</label>
  717. </div>
  718. </div>
  719. <div class="col-6">
  720. <div class="form-check">
  721. <input class="form-check-input zone-checkbox" type="checkbox" id="zone2"
  722. name="zone2" value="2-Manali" onclick="checkAnyArea()">
  723. <label class="zone-checkbox-label" for="zone2">மண்டலம் 2 <br> (மணலி)</label>
  724. </div>
  725. </div>
  726. <div class="col-6">
  727. <div class="form-check">
  728. <input class="form-check-input zone-checkbox" type="checkbox" id="zone3"
  729. name="zone3" value="3-Madhavaram" onclick="checkAnyArea()">
  730. <label class="zone-checkbox-label" for="zone3">மண்டலம் 3 <br>(மாதவரம்)</label>
  731. </div>
  732. </div>
  733. <div class="col-6">
  734. <div class="form-check">
  735. <input class="form-check-input zone-checkbox" type="checkbox" id="zone4"
  736. name="zone4" value="4-Tondiarpet" onclick="checkAnyArea()">
  737. <label class="zone-checkbox-label" for="zone4">மண்டலம் 4 <br>(தண்டையார்பேட்டை)</label>
  738. </div>
  739. </div>
  740. </div>
  741. <!-- Second Row of மண்டலம்s -->
  742. <div class="form-row mt-2">
  743. <div class="col-6">
  744. <div class="form-check">
  745. <input class="form-check-input zone-checkbox" type="checkbox" id="zone5"
  746. name="zone5" value="5-Royapuram" onclick="checkAnyArea()">
  747. <label class="zone-checkbox-label" for="zone5">மண்டலம் 5<br> (ராயபுரம்)</label>
  748. </div>
  749. </div>
  750. <div class="col-6">
  751. <div class="form-check">
  752. <input class="form-check-input zone-checkbox" type="checkbox" id="zone6"
  753. name="zone6" value="6-ThiruViKa Nagar" onclick="checkAnyArea()">
  754. <label class="zone-checkbox-label" for="zone6">மண்டலம் 6 <br>(திரு-வி-க நகர்)</label>
  755. </div>
  756. </div>
  757. <div class="col-6">
  758. <div class="form-check">
  759. <input class="form-check-input zone-checkbox" type="checkbox" id="zone7"
  760. name="zone7" value="7-Ambattur" onclick="checkAnyArea()">
  761. <label class="zone-checkbox-label" for="zone7">மண்டலம் 7<br> (அம்பத்தூர்)</label>
  762. </div>
  763. </div>
  764. <div class="col-6">
  765. <div class="form-check">
  766. <input class="form-check-input zone-checkbox" type="checkbox" id="zone8"
  767. name="zone8" value="8-Anna Nagar" onclick="checkAnyArea()">
  768. <label class="zone-checkbox-label" for="zone8">மண்டலம் 8<br> (அண்ணா நகர்)</label>
  769. </div>
  770. </div>
  771. </div>
  772. <!-- Third Row of மண்டலம்s -->
  773. <div class="form-row mt-2">
  774. <div class="col-6">
  775. <div class="form-check">
  776. <input class="form-check-input zone-checkbox" type="checkbox" id="zone9"
  777. name="zone9" value="9-Teynampet" onclick="checkAnyArea()">
  778. <label class="zone-checkbox-label" for="zone9">மண்டலம் 9 <br>(தேனாம்பேட்டை)</label>
  779. </div>
  780. </div>
  781. <div class="col-6">
  782. <div class="form-check">
  783. <input class="form-check-input zone-checkbox" type="checkbox" id="zone10"
  784. name="zone10" value="10-Kodambakkam" onclick="checkAnyArea()">
  785. <label class="zone-checkbox-label" for="zone10">மண்டலம் 10<br> (கோடம்பாக்கம்)</label>
  786. </div>
  787. </div>
  788. <div class="col-6">
  789. <div class="form-check">
  790. <input class="form-check-input zone-checkbox" type="checkbox" id="zone11"
  791. name="zone11" value="11-Valasarvakkam" onclick="checkAnyArea()">
  792. <label class="zone-checkbox-label" for="zone11">மண்டலம் 11<br> (வளசரவாக்கம்)</label>
  793. </div>
  794. </div>
  795. <div class="col-6">
  796. <div class="form-check">
  797. <input class="form-check-input zone-checkbox" type="checkbox" id="zone12"
  798. name="zone12" value="12-Alandur" onclick="checkAnyArea()">
  799. <label class="zone-checkbox-label" for="zone12">மண்டலம் 12<br> (ஆலந்தூர்)</label>
  800. </div>
  801. </div>
  802. </div>
  803. <!-- Fourth Row of மண்டலம்s -->
  804. <div class="form-row mt-2">
  805. <div class="col-6">
  806. <div class="form-check">
  807. <input class="form-check-input zone-checkbox" type="checkbox" id="zone13"
  808. name="zone13" value="13-Adyar" onclick="checkAnyArea()">
  809. <label class="zone-checkbox-label" for="zone13">மண்டலம் 13<br> (அடையார்)</label>
  810. </div>
  811. </div>
  812. <div class="col-6">
  813. <div class="form-check">
  814. <input class="form-check-input zone-checkbox" type="checkbox" id="zone14"
  815. name="zone14" value="14-Perungudi" onclick="checkAnyArea()">
  816. <label class="zone-checkbox-label" for="zone14">மண்டலம் 14<br> (பெருங்குடி)</label>
  817. </div>
  818. </div>
  819. <div class="col-6">
  820. <div class="form-check">
  821. <input class="form-check-input zone-checkbox" type="checkbox" id="zone15"
  822. name="zone15" value="15-Sholinganallur" onclick="checkAnyArea()">
  823. <label class="zone-checkbox-label" for="zone15">மண்டலம் 15 <br>(சோழிங்கநல்லூர்)</label>
  824. </div>
  825. </div>
  826. </div>
  827. </div>
  828. <center>
  829. <!-- <button type="submit" class="btn btn-primary" id="submitBtn">Submit</button> -->
  830. <button type="button" class="btn btn-primary" id="submitBtn" onclick="validateForm()">சமர்ப்பிக்கவும்</button>
  831. </center>
  832. </div>
  833. </div>
  834. </form>
  835. </div>
  836. <div id="pageLoader" style="display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(255, 255, 255, 0.8); z-index: 9999; text-align: center;">
  837. <div style="position: relative; top: 50%; transform: translateY(-50%);">
  838. <div class="spinner-border text-primary" role="status" style="width: 3rem; height: 3rem;">
  839. <span class="sr-only">Loading...</span>
  840. </div>
  841. <!-- Add the 'Please wait' text below the spinner -->
  842. <p style="margin-top: 1rem; font-size: 1.2rem; color: #007bff;">Please wait...</p>
  843. </div>
  844. </div>
  845. <!-- OTP Modal -->
  846. <div class="modal fade" id="otpForm" tabindex="-1" role="dialog" aria-labelledby="otpFormLabel" aria-hidden="true">
  847. <div class="modal-dialog" role="document">
  848. <div class="modal-content">
  849. <form action="#" th:action="@{/otpForm}" th:object="${otpForm}" method="post"
  850. onsubmit="return verifyOtp();">
  851. <div class="modal-header">
  852. <h6 class="modal-title m-0" id="exampleModalDefaultLabel">OTP Login</h6>
  853. <button type="button" class="close" data-dismiss="modal" aria-label="Close"
  854. style="color:black;border: white;background-color: white;">
  855. <span aria-hidden="true">&times;</span>
  856. </button>
  857. </div>
  858. <!-- End modal-header -->
  859. <div class="modal-body">
  860. <div class="row ">
  861. <div class="mb-3" style="text-align: center;">
  862. <img src="https://gccservices.in/gcc/files/c_d/otp.png" width="50%" alt="Mobileotp">
  863. </div>
  864. </div>
  865. <!-- End row -->
  866. <div class="row d-flex justify-content-center align-items-center">
  867. <div class="mb-0">
  868. <h4>OTP Verification</h4>
  869. <p class="text-mute">Enter the OTP sent to <b class="text-info" id="mobilenotxt"></b>
  870. </p>
  871. <p class="text-danger" id="otperror"></p>
  872. </div>
  873. </div>
  874. <!-- End row -->
  875. <div class="row d-flex justify-content-center align-items-center">
  876. <div class="mb-3 ">
  877. <div class="otp-input-box">
  878. <input type="text" maxlength="1" class="otp-input" id="otp1" required />
  879. <input type="text" maxlength="1" class="otp-input" id="otp2" required />
  880. <input type="text" maxlength="1" class="otp-input" id="otp3" required />
  881. <input type="text" maxlength="1" class="otp-input" id="otp4" required />
  882. <input type="text" maxlength="1" class="otp-input" id="otp5" required />
  883. </div>
  884. </div>
  885. </div>
  886. <!-- End row -->
  887. <!--<div class="row d-flex justify-content-center align-items-center">
  888. <div class="mb-3">
  889. <div id="resend-containers">
  890. <p class="mb-0 text-info" id="resendlink"></p>
  891. </div>
  892. </div>
  893. </div>-->
  894. <!-- End row -->
  895. </div>
  896. <!-- End modal-body -->
  897. <div class="modal-footer">
  898. <button type="button" class="btn btn-secondary" data-dismiss="modal">Close</button>
  899. <button type="submit" class="btn btn-primary" id="but">Verify OTP</button>
  900. </div>
  901. <!-- End modal-footer -->
  902. </form>
  903. </div>
  904. <!-- End modal-content -->
  905. </div>
  906. <!-- End modal-dialog -->
  907. </div>
  908. <!-- End OTP Modal -->
  909. <script>
  910. document.querySelector('.individual-form').style.display = 'none';
  911. document.querySelector('.corporate-form').style.display = 'none';
  912. document.querySelector('.ngo-form').style.display = 'none';
  913. /* function handleCategoryChange() {
  914. // Get selected category
  915. var category = document.getElementById("category").value;
  916. // Hide all forms
  917. document.querySelector('.individual-form').style.display = 'none';
  918. document.querySelector('.corporate-form').style.display = 'none';
  919. document.querySelector('.ngo-form').style.display = 'none';
  920. // Clear subcategory options
  921. var subcategory = document.getElementById("subcategory");
  922. subcategory.innerHTML = '<option value="-1">Select</option>';
  923. // Show the corresponding form and set subcategory options
  924. if (category === "Individual") {
  925. document.querySelector('.individual-form').style.display = 'block';
  926. subcategory.innerHTML += `
  927. <option value="Medical Assistance/Counselling Service">Medical Assistance/Counselling Service</option>
  928. <option value="Cooks & Assistance">Cooks & Assistance</option>
  929. <option value="General Assistance">General Assistance</option>
  930. <option value="Distribution/Delivery Support">Distribution/Delivery Support</option>
  931. <option value="Centre Admin Support">Centre Admin Support</option>
  932. <option value="Graphic Designers">Graphic Designers</option>
  933. <option value="Call Centre Support">Call Centre Support</option>
  934. <option value="Survey">Survey</option>
  935. `;
  936. } else if (category === "Corporate") {
  937. document.querySelector('.corporate-form').style.display = 'block';
  938. subcategory.innerHTML += `<option value="N/A">N/A</option>`;
  939. } else if (category === "NGO") {
  940. document.querySelector('.ngo-form').style.display = 'block';
  941. subcategory.innerHTML += `<option value="N/A">N/A</option>`;
  942. }
  943. } */
  944. $("#name").on("input", function () {
  945. this.value = this.value.replace(/[^a-zA-Z.\s]/g, '');
  946. });
  947. $("#cmpPoc").on("input", function () {
  948. this.value = this.value.replace(/[^a-zA-Z.\s]/g, '');
  949. });
  950. $("#oPoc").on("input", function () {
  951. this.value = this.value.replace(/[^a-zA-Z.\s]/g, '');
  952. });
  953. $("#dob").on("keydown paste drop", function (e) {
  954. e.preventDefault();
  955. });
  956. $("#pincode").on("input", function () {
  957. this.value = this.value.replace(/\D/g, '').slice(0, 6);
  958. });
  959. $("#ephno").on("input", function () {
  960. this.value = this.value.replace(/\D/g, '').slice(0, 10);
  961. });
  962. $("#mobile").on("input", function () {
  963. this.value = this.value.replace(/\D/g, '').slice(0, 10);
  964. });
  965. $("#cmdPom").on("input", function () {
  966. this.value = this.value.replace(/\D/g, '').slice(0, 10);
  967. });
  968. $("#oPom").on("input", function () {
  969. this.value = this.value.replace(/\D/g, '').slice(0, 10);
  970. });
  971. $("#expertise").on("change", function () {
  972. var selectedOption = $(this).find("option:selected");
  973. var selectedId = selectedOption.val();
  974. var expertiseArea = selectedOption.attr("data-category") || "";
  975. // Check ID = 7 OR expertise contains "Others"
  976. var isOtherExpertise =
  977. selectedId === "7" ||
  978. expertiseArea.toLowerCase().includes("others");
  979. if (isOtherExpertise) {
  980. $("#otherExpertiseContainer").show();
  981. } else {
  982. $("#otherExpertiseContainer").hide();
  983. // Clear previous value and error
  984. $("#other_expertise").val("");
  985. $("#otherExpertiseError").text("");
  986. }
  987. });
  988. $(document).ready(function () {
  989. $.ajax({
  990. url: "/volunteer/api/registration/getAllCategory",
  991. type: "GET",
  992. success: function (categories) {
  993. let categoryDropdown = $('#category');
  994. categoryDropdown.append(`<option value="-1">Select</option>`);
  995. categories.forEach(function (cat) {
  996. $('<option>', {
  997. value: cat.id,
  998. text: cat.category_tamil
  999. }).attr('data-category', cat.category)
  1000. .appendTo(categoryDropdown);
  1001. });
  1002. }
  1003. });
  1004. $.ajax({
  1005. url: "/volunteer/api/registration/getAllExpertise",
  1006. type: "GET",
  1007. success: function (expertise) {
  1008. let expertiseDropdown = $('#expertise');
  1009. expertiseDropdown.empty();
  1010. expertiseDropdown.append(`<option value="">Select</option>`);
  1011. expertise.forEach(function (exp) {
  1012. $('<option>', {
  1013. value: exp.id,
  1014. text: exp.expertise_area_tamil
  1015. }).attr('data-category', exp.expertise_area_tamil)
  1016. .appendTo(expertiseDropdown);
  1017. });
  1018. }
  1019. });
  1020. });
  1021. $("#docs").on("change", function () {
  1022. var selectedOption = $(this).find("option:selected");
  1023. var labelName = selectedOption.attr("data-category") || "";
  1024. var option = $(this).val();
  1025. var documentFields = $("#documentFields");
  1026. documentFields.empty();
  1027. $("#docsError").text("");
  1028. if (option === "-1" || option === "") {
  1029. return;
  1030. }
  1031. var optionName = labelName;
  1032. var html = `
  1033. <div class="col-lg-12 col-md-12 mb-3">
  1034. <label for="doc_number">
  1035. ${optionName} எண்<span class="req">*</span>
  1036. </label>
  1037. <input type="text"
  1038. class="form-control"
  1039. id="doc_number"
  1040. name="doc_number"
  1041. placeholder="${optionName} எண்..."
  1042. autocomplete="off">
  1043. <span class="text-danger" id="docNumberError"></span>
  1044. </div>
  1045. <div class="col-lg-12 col-md-12 mb-3">
  1046. <label for="doc_url">
  1047. ${optionName} படம் (20 MB-க்கும் குறைவானது - jpg/jpeg/pdf)<span class="req">*</span>
  1048. </label>
  1049. <input type="file"
  1050. class="form-control"
  1051. id="doc_url"
  1052. name="doc_url"
  1053. accept=".pdf,.jpg,.jpeg">
  1054. <span class="text-danger" id="docFileError"></span>
  1055. </div>
  1056. `;
  1057. documentFields.html(html);
  1058. });
  1059. function handleCategoryChange() {
  1060. var categoryId = $('#category').val();
  1061. // Hide all forms
  1062. $('.individual-form, .corporate-form, .ngo-form').hide();
  1063. // Clear and reset subcategory dropdown
  1064. let subcategory = $('#subcategory');
  1065. subcategory.empty().append('<option value="-1">Select</option>');
  1066. // Determine form visibility based on selected category name
  1067. //let selectedText = $('#category option:selected').text();
  1068. let selectedText = $('#category').val();
  1069. /* if (selectedText === "Individual") {
  1070. $('.individual-form').show();
  1071. } else if (selectedText === "Corporate") {
  1072. $('.corporate-form').show();
  1073. } else if (selectedText === "NGO/Other Associations") {
  1074. $('.ngo-form').show();
  1075. } */
  1076. if (selectedText === "1") {
  1077. $.ajax({
  1078. url: "/volunteer/api/registration/getAllVolunteerDocs",
  1079. type: "GET",
  1080. success: function (docsvalues) {
  1081. let docsDropdown = $('#docs');
  1082. docsDropdown.empty();
  1083. docsDropdown.append(`<option value="">Select</option>`);
  1084. docsvalues.forEach(function (docs) {
  1085. $('<option>', {
  1086. value: docs.id,
  1087. text: docs.tamil_name
  1088. }).attr('data-category', docs.tamil_name)
  1089. .appendTo(docsDropdown);
  1090. });
  1091. }
  1092. });
  1093. $('.individual-form').show();
  1094. } else if (selectedText === "2") {
  1095. $('.corporate-form').show();
  1096. } else if (selectedText === "3") {
  1097. $('.ngo-form').show();
  1098. }
  1099. // Fetch subcategories
  1100. if (categoryId !== "-1") {
  1101. $.ajax({
  1102. url: "/volunteer/api/registration/getSubCategoryById",
  1103. type: "GET",
  1104. data: { category_id: categoryId },
  1105. success: function (subcategories) {
  1106. subcategories.forEach(function (sub) {
  1107. $('<option>', {
  1108. value: sub.id,
  1109. text: sub.sub_category_tamil
  1110. }).attr('data-sub-category', sub.sub_category)
  1111. .appendTo(subcategory);
  1112. });
  1113. }
  1114. });
  1115. }
  1116. }
  1117. function uncheckAnyArea() {
  1118. }
  1119. function checkAnyArea() {
  1120. var anyArea = document.getElementById("anyArea").checked;
  1121. if (anyArea) {
  1122. for (var i = 1; i <= 15; i++) {
  1123. document.getElementById("zone" + i).checked = false;
  1124. }
  1125. }
  1126. }
  1127. let emailPattern = /^[a-zA-Z0-9._-]+@[a-zA-Z0-9.-]+\.[a-zA-Z]{2,6}$/;
  1128. let mobilePattern = /^[0-9]{10}$/;
  1129. let pincodePattern = /^[0-9]{6}$/;
  1130. function validateForm() {
  1131. var isValid = true;
  1132. $('.text-danger').text('');
  1133. var i = 0;
  1134. $(".zone-checkbox:checked").each(function () {
  1135. if ($(this).val()) {
  1136. i++;
  1137. };
  1138. });
  1139. var category = document.getElementById("category");
  1140. //var selectedTextcategory = category.options[category.selectedIndex].text;
  1141. var selectedTextcategory = $('#category').val();
  1142. //console.log("selectedTextcategory=="+selectedTextcategory);
  1143. if (selectedTextcategory === "Select" || selectedTextcategory === "-1" || selectedTextcategory === "") {
  1144. $("#categoryError").text("தயவுசெய்து வகையைத் தேர்ந்தெடுக்கவும்.");
  1145. isValid = false;
  1146. }
  1147. var subcategory = document.getElementById("subcategory");
  1148. var selectedTextsubcategory = subcategory.options[subcategory.selectedIndex].text;
  1149. var selectedTextsubcategory = $('#subcategory').val();
  1150. //console.log("selectedTextsubcategory=="+selectedTextsubcategory);
  1151. if (selectedTextsubcategory === "Select" || selectedTextsubcategory === "-1" || selectedTextsubcategory === "") {
  1152. $("#subcategoryError").text("தயவுசெய்து துணைப்பிரிவைத் தேர்ந்தெடுக்கவும்.");
  1153. isValid = false;
  1154. }
  1155. var ephno = $.trim($("#ephno").val());
  1156. //console.log("ephno===="+ephno);
  1157. if (ephno === "") {
  1158. $("#ephnoError").text("அவசரகாலத் தொலைபேசி எண்ணை உள்ளிடவும்");
  1159. isValid = false;
  1160. } else if (!/^\d{10}$/.test(ephno)) {
  1161. $("#ephnoError").text("தொலைபேசி எண் சரியாக 10 இலக்கங்களைக் கொண்டிருக்க வேண்டும்");
  1162. isValid = false;
  1163. } else if (!/^[6-9]/.test(ephno)) {
  1164. $("#ephnoError").text("தொலைபேசி எண் 6, 7, 8 அல்லது 9-இல் தொடங்க வேண்டும்");
  1165. isValid = false;
  1166. }else if (/^(\d)\1{9}$/.test(ephno)) {
  1167. $("#ephnoError").text("தொலைபேசி எண்ணில் ஒரே இலக்கம் மீண்டும் மீண்டும் வரக்கூடாது");
  1168. isValid = false;
  1169. } else if (
  1170. ephno === "1234567890" ||
  1171. ephno === "0123456789" ||
  1172. ephno === "9876543210" ||
  1173. ephno === "0987654321"
  1174. ) {
  1175. $("#ephnoError").text("சரியான தொலைபேசி எண்ணை உள்ளிடவும்");
  1176. isValid = false;
  1177. }
  1178. var selectedEOption = $("#expertise option:selected");
  1179. var expertisevalue = $.trim(selectedEOption.val());
  1180. var expertiseArea = $.trim(selectedEOption.attr("data-category") || "");
  1181. if (expertisevalue === "" || expertisevalue === "-1") {
  1182. $("#expertiseError").text("நிபுணத்துவம் உள்ள துறையைத் தேர்ந்தெடுக்கவும்");
  1183. isValid = false;
  1184. } else if (
  1185. expertisevalue === "7" ||
  1186. expertiseArea.toLowerCase().includes("others")
  1187. ) {
  1188. var otherExpertise = $.trim($("#other_expertise").val());
  1189. if (otherExpertise === "") {
  1190. $("#otherExpertiseError").text("மற்ற நிபுணத்துவத்தைக் குறிப்பிடவும்");
  1191. isValid = false;
  1192. }
  1193. }
  1194. if (selectedTextcategory === "1") {
  1195. var name = document.getElementById("name").value = document.getElementById("name").value.trim();
  1196. var email = document.getElementById("email").value = document.getElementById("email").value.trim();
  1197. let genderSelected = document.querySelector('input[name="gender"]:checked');
  1198. var mobile = document.getElementById("mobile").value = document.getElementById("mobile").value.trim();
  1199. var address = document.getElementById("address").value = document.getElementById("address").value.trim();
  1200. var pincode = document.getElementById("pincode").value = document.getElementById("pincode").value.trim();
  1201. //var edu = document.getElementById("edu").value = document.getElementById("edu").value.trim();
  1202. //var college = document.getElementById("college").value = document.getElementById("college").value.trim();
  1203. //let nssSelected = document.querySelector('input[name="nss"]:checked');
  1204. //let nccSelected = document.querySelector('input[name="ncc"]:checked');
  1205. // var occupation = document.getElementById("occupation").value= document.getElementById("occupation").value.trim();
  1206. // var designation = document.getElementById("designation").value= document.getElementById("designation").value.trim();
  1207. let preVolSelected = document.querySelector('input[name="preVol"]:checked');
  1208. //var ngoAny = document.getElementById("ngoAny").value = document.getElementById("ngoAny").value.trim();
  1209. var dob = document.getElementById("dob").value = document.getElementById("dob").value.trim();
  1210. //var aadhar = document.getElementById("aadhar").value = document.getElementById("aadhar").value.trim();
  1211. //var bloodgroup = document.getElementById("bloodgroup").value;
  1212. if (name == undefined || name == "") {
  1213. $("#nameError").text("தயவுசெய்து பெயரை உள்ளிடவும்.");
  1214. isValid = false;
  1215. }
  1216. if (dob == undefined || dob == "") {
  1217. $("#dobError").text("தயவுசெய்து பிறந்த தேதியை உள்ளிடவும்.");
  1218. isValid = false;
  1219. }
  1220. if(email!=""){
  1221. if (!emailPattern.test(email)) {
  1222. $("#emailError").text("தயவுசெய்து சரியான மின்னஞ்சல் முகவரியை உள்ளிடவும்.");
  1223. isValid = false;
  1224. }
  1225. }
  1226. if (!genderSelected) {
  1227. $("#genderError").text("தயவுசெய்து பாலினத்தைத் தேர்ந்தெடுக்கவும்.");
  1228. isValid = false;
  1229. }
  1230. // Check if verifiedOTP is disabled only during form submission
  1231. if ($('#verifiedOTP').prop('disabled')) {
  1232. Swal.fire({
  1233. title: "Warning!",
  1234. text: "OTP not Verified",
  1235. icon: "warning",
  1236. confirmButtonText: "OK"
  1237. });
  1238. isValid = false; // Set isValid to false if verifiedOTP is disabled
  1239. }
  1240. if (mobile === "" || !mobilePattern.test(mobile)) {
  1241. $("#mobileError").text("தயவுசெய்து சரியான 10 இலக்க அலைபேசி எண்ணை உள்ளிடவும்.");
  1242. isValid = false;
  1243. }
  1244. if (!/^\d{10}$/.test(mobile)) {
  1245. $("#mobileError").text("தொலைபேசி எண்ணில் சரியாக 10 இலக்கங்கள் இருக்க வேண்டும்.");
  1246. isValid = false;
  1247. } if (!/^[6-9]/.test(mobile)) {
  1248. $("#mobileError").text("தொலைபேசி எண் 6, 7, 8 அல்லது 9-இல் தொடங்க வேண்டும்.");
  1249. isValid = false;
  1250. } if (/^(\d)\1{9}$/.test(mobile)) {
  1251. $("#mobileError").text("தொலைபேசி எண்ணில் ஒரே இலக்கம் மீண்டும் மீண்டும் வரக்கூடாது");
  1252. isValid = false;
  1253. } if (
  1254. mobile === "1234567890" ||
  1255. mobile === "0123456789" ||
  1256. mobile === "9876543210" ||
  1257. mobile === "0987654321"
  1258. ) {
  1259. $("#mobileError").text("சரியான தொலைபேசி எண்ணை உள்ளிடவும்");
  1260. isValid = false;
  1261. }
  1262. if (address == undefined || address == "") {
  1263. $("#addressError").text("தயவுசெய்து முகவரியை உள்ளிடவும்.");
  1264. isValid = false;
  1265. }
  1266. // Pincode validation
  1267. if (pincode === "" || !pincodePattern.test(pincode)) {
  1268. $("#pincodeError").text("தயவுசெய்து செல்லுபடியாகும் 6 இலக்க அஞ்சல் குறியீட்டை உள்ளிடவும்.");
  1269. isValid = false;
  1270. }
  1271. /* if (edu == undefined || edu == "") {
  1272. $("#eduError").text("Please Enter Education details !");
  1273. isValid = false;
  1274. }
  1275. if (college == undefined || college == "") {
  1276. $("#collegeError").text("Please Enter college details !");
  1277. isValid = false;
  1278. }
  1279. if (aadhar == undefined || aadhar == "") {
  1280. $("#aadharError").text("Please Enter Aadhar details !");
  1281. isValid = false;
  1282. }
  1283. if (bloodgroup == -1) {
  1284. $("#bloodgroupError").text("Please Select Blood Group !");
  1285. isValid = false;
  1286. }
  1287. if (!nssSelected) {
  1288. $("#nssError").text("Please Select NSS details !");
  1289. isValid = false;
  1290. }
  1291. if (!nccSelected) {
  1292. $("#nccError").text("Please Select NCC details !");
  1293. isValid = false;
  1294. }*/
  1295. var docs = $.trim($("#docs").val());
  1296. if (docs === "" || docs === "-1") {
  1297. $("#docsError").text("ஆவணத்தைத் தேர்ந்தெடுக்கவும்");
  1298. isValid = false;
  1299. } else {
  1300. // Get selected document name
  1301. var selectedOption = $("#docs option:selected");
  1302. var documentName = $.trim(selectedOption.attr("data-category") || "");
  1303. // -----------------------------
  1304. // Document Number Validation
  1305. // -----------------------------
  1306. var docNumber = $.trim($("#doc_number").val());
  1307. if (docNumber === "") {
  1308. $("#docNumberError").text("" + documentName + " எண்ணை உள்ளிடவும்");
  1309. isValid = false;
  1310. }
  1311. if (docs === "1") {
  1312. // Aadhar = exactly 12 numeric digits
  1313. if (!/^\d{12}$/.test(docNumber)) {
  1314. $("#docNumberError").text(
  1315. "ஆதார் எண் சரியாக 12 இலக்கங்களைக் கொண்டிருக்க வேண்டும்"
  1316. );
  1317. isValid = false;
  1318. }
  1319. } else {
  1320. // Other documents = alphanumeric, max 10 characters
  1321. if (!/^[a-zA-Z0-9]{10}$/.test(docNumber)) {
  1322. $("#docNumberError").text(
  1323. documentName + " எண்ணில் எழுத்துக்கள் மற்றும் எண்கள் மட்டுமே இருக்க வேண்டும் (அதிகபட்சம் 10 எழுத்துக்கள்)"
  1324. );
  1325. isValid = false;
  1326. }
  1327. }
  1328. // -----------------------------
  1329. // Document File Validation
  1330. // -----------------------------
  1331. var docFileInput = $("#doc_url")[0];
  1332. if (!docFileInput || docFileInput.files.length === 0) {
  1333. $("#docFileError").text(
  1334. " " + documentName + " தேர்ந்தெடுக்கவும் "
  1335. );
  1336. isValid = false;
  1337. } else {
  1338. var docFile = docFileInput.files[0];
  1339. // Maximum 20 MB
  1340. var maxSize = 20 * 1024 * 1024;
  1341. if (docFile.size >= maxSize) {
  1342. $("#docFileError").text(
  1343. "அளவு 20 MB-க்குக் குறைவாக இருக்க வேண்டும்"
  1344. );
  1345. isValid = false;
  1346. }
  1347. // File type
  1348. var allowedTypes = [
  1349. "image/jpeg",
  1350. "application/pdf"
  1351. ];
  1352. if (!allowedTypes.includes(docFile.type)) {
  1353. $("#docFileError").text(
  1354. "JPG, JPEG அல்லது PDF கோப்புகள் மட்டுமே அனுமதிக்கப்படும்"
  1355. );
  1356. isValid = false;
  1357. }
  1358. }
  1359. }
  1360. if (!preVolSelected) {
  1361. $("#prevolError").text("தயவுசெய்து முந்தைய தன்னார்வலர் விவரங்களைத் தேர்ந்தெடுக்கவும்.");
  1362. isValid = false;
  1363. }
  1364. var cmobile = $.trim($("#mobile").val());
  1365. if(cmobile !== "" && ephno !== "" && cmobile === ephno){
  1366. Swal.fire({
  1367. title: "Warning!",
  1368. text: "கைபேசி எண்ணும் அவசரக்காலத் தொலைபேசி எண்ணும் ஒன்றாக இருக்கக்கூடாது",
  1369. icon: "warning",
  1370. confirmButtonText: "OK"
  1371. });
  1372. isValid = false;
  1373. }
  1374. /* if (ngoAny == undefined || ngoAny == "") {
  1375. $("#ngoAnyError").text("Please Enter Company/NGO details !");
  1376. isValid = false;
  1377. } */
  1378. if (i == 0) {
  1379. $("#anyAreaError").text("விருப்பமான பகுதி விவரங்களைத் தேர்ந்தெடுக்கவும்.");
  1380. isValid = false;
  1381. }
  1382. if (isValid) {
  1383. $("#submitBtn").prop("disabled", true);
  1384. saveTheIndividualForm();
  1385. return false;
  1386. }
  1387. else{
  1388. var firstError = $(".text-danger")
  1389. .filter(function () {
  1390. return $.trim($(this).text()) !== "";
  1391. })
  1392. .first();
  1393. if (firstError.length) {
  1394. var target = firstError
  1395. .closest(".mb-3")
  1396. .find("input, select, textarea")
  1397. .first();
  1398. if (target.length) {
  1399. $("html, body").animate({
  1400. scrollTop: target.offset().top - 120
  1401. }, 600);
  1402. // Focus the field
  1403. target.focus();
  1404. }else {
  1405. // Fallback to error message
  1406. $("html, body").animate({
  1407. scrollTop: firstError.offset().top - 120
  1408. }, 600);
  1409. }
  1410. }
  1411. }
  1412. return false;
  1413. }
  1414. else if (selectedTextcategory === "2") {
  1415. var cmpName = document.getElementById("cmpName").value = document.getElementById("cmpName").value.trim();
  1416. var cmpEmail = document.getElementById("cmpEmail").value = document.getElementById("cmpEmail").value.trim();
  1417. var cmpLandline = document.getElementById("cmpLandline").value = document.getElementById("cmpLandline").value.trim();
  1418. var cmpMobile = document.getElementById("cmpMobile").value = document.getElementById("cmpMobile").value.trim();
  1419. var cmpAddress = document.getElementById("cmpAddress").value = document.getElementById("cmpAddress").value.trim();
  1420. var cmpPincode = document.getElementById("cmpPincode").value = document.getElementById("cmpPincode").value.trim();
  1421. var cmpNov = document.getElementById("cmpNov").value = document.getElementById("cmpNov").value.trim();
  1422. var cmpPoc = document.getElementById("cmpPoc").value = document.getElementById("cmpPoc").value.trim();
  1423. var cmdPom = document.getElementById("cmdPom").value = document.getElementById("cmdPom").value.trim();
  1424. var cmpPVolSelect = document.querySelector('input[name="cmpPVol"]:checked');
  1425. var cmdPoE = document.getElementById("cmdPoE").value = document.getElementById("cmdPoE").value.trim();
  1426. var cmdPod = $("#cmdPod").val().trim();
  1427. if (cmpName == undefined || cmpName == "") {
  1428. $("#cmpNameError").text("தயவுசெய்து நிறுவனத்தின் பெயரை உள்ளிடவும்.");
  1429. isValid = false;
  1430. }
  1431. if(cmpEmail!=""){
  1432. if (!emailPattern.test(cmpEmail)) {
  1433. $("#cmpEmailError").text("சரியான மின்னஞ்சல் முகவரியை உள்ளிடவும்.");
  1434. isValid = false;
  1435. }
  1436. }
  1437. if (cmpAddress == undefined || cmpAddress == "") {
  1438. $("#cmpAddressError").text("தயவுசெய்து நிறுவனத்தின் முகவரியை உள்ளிடவும்.");
  1439. isValid = false;
  1440. }
  1441. if (cmpPincode == undefined || cmpPincode == "") {
  1442. $("#cmpPincodeError").text("தயவுசெய்து அஞ்சல் குறியீட்டை உள்ளிடவும். ");
  1443. isValid = false;
  1444. }
  1445. if (cmpNov == undefined || cmpNov == "") {
  1446. $("#cmpNovError").text("தயவுசெய்து தன்னார்வலர்களின் எண்ணிக்கையை உள்ளிடவும்.");
  1447. isValid = false;
  1448. }
  1449. if (!/^[1-9]\d*$/.test(cmpNov)) {
  1450. $("#cmpNovError").text("சரியான எண்ணிக்கையிலான தன்னார்வலர்களை உள்ளிடவும்.");
  1451. isValid = false;
  1452. }
  1453. if (cmpPoc == undefined || cmpPoc == "") {
  1454. $("#cmpPocError").text("நடத்தைக்கான பொறுப்பாளர் பெயரை உள்ளிடவும்.");
  1455. isValid = false;
  1456. }
  1457. if (cmdPod == "") {
  1458. $("#cmdPodError").text("நடத்தைக்கான பொறுப்பாளர் பதவியைக் குறிப்பிடவும்");
  1459. isValid = false;
  1460. }
  1461. if (cmdPoE === "" || !emailPattern.test(cmdPoE)) {
  1462. $("#cmdPoEError").text("தொடர்பு கொள்ள வேண்டியவருக்கான சரியான மின்னஞ்சல் முகவரியை உள்ளிடவும்.");
  1463. isValid = false;
  1464. }
  1465. if (cmdPom == undefined || cmdPom == "" || !mobilePattern.test(cmdPom)) {
  1466. $("#cmdPomError").text("தொடர்பு கொள்ள வேண்டியவரின் செல்லுபடியாகும் அலைபேசி எண்ணை உள்ளிடவும்.");
  1467. isValid = false;
  1468. }
  1469. if (!/^\d{10}$/.test(cmdPom)) {
  1470. $("#cmdPomError").text("தொலைபேசி எண்ணில் சரியாக 10 இலக்கங்கள் இருக்க வேண்டும்.");
  1471. isValid = false;
  1472. } if (!/^[6-9]/.test(cmdPom)) {
  1473. $("#cmdPomError").text("தொலைபேசி எண் 6, 7, 8 அல்லது 9-இல் தொடங்க வேண்டும்.");
  1474. isValid = false;
  1475. } if (/^(\d)\1{9}$/.test(cmdPom)) {
  1476. $("#cmdPomError").text("தொலைபேசி எண்ணில் ஒரே இலக்கம் மீண்டும் மீண்டும் வரக்கூடாது");
  1477. isValid = false;
  1478. } if (
  1479. cmdPom === "1234567890" ||
  1480. cmdPom === "0123456789" ||
  1481. cmdPom === "9876543210" ||
  1482. cmdPom === "0987654321"
  1483. ) {
  1484. $("#cmdPomError").text("சரியான தொலைபேசி எண்ணை உள்ளிடவும்");
  1485. isValid = false;
  1486. }
  1487. if (!cmpPVolSelect) {
  1488. $("#anyAreaError").text("தயவுசெய்து முந்தைய தன்னார்வலர்களின் விவரங்களைத் தேர்ந்தெடுக்கவும்.");
  1489. isValid = false;
  1490. }
  1491. var c1mobile = $.trim($("#cmdPom").val());
  1492. if(c1mobile !== "" && ephno !== "" && c1mobile === ephno){
  1493. Swal.fire({
  1494. title: "Warning!",
  1495. text: "கைபேசி எண்ணும் அவசரக்காலத் தொலைபேசி எண்ணும் ஒன்றாக இருக்கக்கூடாது",
  1496. icon: "warning",
  1497. confirmButtonText: "OK"
  1498. });
  1499. isValid = false;
  1500. }
  1501. if (i == 0) {
  1502. alert("விருப்பமான பகுதி விவரங்களைத் தேர்ந்தெடுக்கவும்.");
  1503. isValid = false;
  1504. }
  1505. /* if (isValid) {
  1506. saveCorporateDetails();
  1507. } */
  1508. if (isValid) {
  1509. $("#submitBtn").prop("disabled", true);
  1510. saveCorporateDetails();
  1511. return false;
  1512. }
  1513. else{
  1514. var firstError = $(".text-danger")
  1515. .filter(function () {
  1516. return $.trim($(this).text()) !== "";
  1517. })
  1518. .first();
  1519. if (firstError.length) {
  1520. var target = firstError
  1521. .closest(".mb-3")
  1522. .find("input, select, textarea")
  1523. .first();
  1524. if (target.length) {
  1525. $("html, body").animate({
  1526. scrollTop: target.offset().top - 120
  1527. }, 600);
  1528. // Focus the field
  1529. target.focus();
  1530. }else {
  1531. // Fallback to error message
  1532. $("html, body").animate({
  1533. scrollTop: firstError.offset().top - 120
  1534. }, 600);
  1535. }
  1536. }
  1537. }
  1538. return false;
  1539. }
  1540. else if (selectedTextcategory === "3") {
  1541. var cmpName = document.getElementById("ngoOrgName").value = document.getElementById("ngoOrgName").value.trim();
  1542. var ngoOrgEmail = document.getElementById("ngoOrgEmail").value = document.getElementById("ngoOrgEmail").value.trim();
  1543. var cmpLandline = document.getElementById("oLandline").value = document.getElementById("oLandline").value.trim();
  1544. var cmpMobile = document.getElementById("oMobile").value = document.getElementById("oMobile").value.trim();
  1545. var cmpAddress = document.getElementById("oAddress").value = document.getElementById("oAddress").value.trim();
  1546. var cmpPincode = document.getElementById("oPincode").value = document.getElementById("oPincode").value.trim();
  1547. var cmpNov = document.getElementById("oNvol").value = document.getElementById("oNvol").value.trim();
  1548. var cmpPoc = document.getElementById("oPoc").value = document.getElementById("oPoc").value.trim();
  1549. var cmdPom = document.getElementById("oPom").value = document.getElementById("oPom").value.trim();
  1550. var cmpPVolSelect = document.querySelector('input[name="oPvolY"]:checked');
  1551. var oPoE = document.getElementById("oPoE").value = document.getElementById("oPoE").value.trim();
  1552. var oPod = $("#oPod").val().trim();
  1553. if (cmpName == ""|| cmpName == undefined ) {
  1554. $("#ngoOrgNameError").text("தயவுசெய்து நிறுவனத்தின் பெயரை உள்ளிடவும்");
  1555. isValid = false;
  1556. }
  1557. if(ngoOrgEmail!=""){
  1558. if (!emailPattern.test(ngoOrgEmail)) {
  1559. $("#ngoOrgEmailError").text("சரியான மின்னஞ்சல் முகவரியை உள்ளிடவும்.");
  1560. isValid = false;
  1561. }
  1562. }
  1563. if (cmpAddress == undefined || cmpAddress == "") {
  1564. $("#oAddressError").text("தயவுசெய்து நிறுவனத்தின் முகவரியை உள்ளிடவும்.");
  1565. isValid = false;
  1566. }
  1567. if (cmpPincode == undefined || cmpPincode == "") {
  1568. $("#oPincodeError").text("தயவுசெய்து அஞ்சல் குறியீட்டை உள்ளிடவும். ");
  1569. isValid = false;
  1570. }
  1571. if (cmpNov == undefined || cmpNov == "") {
  1572. $("#oNvolError").text("தயவுசெய்து தன்னார்வலர்களின் எண்ணிக்கையை உள்ளிடவும்.");
  1573. isValid = false;
  1574. }
  1575. if (!/^[1-9]\d*$/.test(cmpNov)) {
  1576. $("#oNvolError").text("சரியான எண்ணிக்கையிலான தன்னார்வலர்களை உள்ளிடவும்.");
  1577. isValid = false;
  1578. }
  1579. if (cmpPoc == undefined || cmpPoc == "") {
  1580. $("#oPocError").text("நடத்தைக்கான பொறுப்பாளர் பெயரை உள்ளிடவும்.");
  1581. isValid = false;
  1582. }
  1583. if (oPod == "") {
  1584. $("#oPodError").text("நடத்தைக்கான பொறுப்பாளர் பதவியைக் குறிப்பிடவும்");
  1585. isValid = false;
  1586. }
  1587. if (oPoE === "" || !emailPattern.test(oPoE)) {
  1588. $("#oPoeError").text("தொடர்பு கொள்ள வேண்டியவருக்கான சரியான மின்னஞ்சல் முகவரியை உள்ளிடவும்.");
  1589. isValid = false;
  1590. }
  1591. if (cmdPom == undefined || cmdPom == "" || !mobilePattern.test(cmdPom)) {
  1592. $("#oPomError").text("தொடர்பு கொள்ள வேண்டியவரின் செல்லுபடியாகும் அலைபேசி எண்ணை உள்ளிடவும்.");
  1593. isValid = false;
  1594. }
  1595. if (!/^\d{10}$/.test(cmdPom)) {
  1596. $("#oPomError").text("தொலைபேசி எண்ணில் சரியாக 10 இலக்கங்கள் இருக்க வேண்டும்.");
  1597. isValid = false;
  1598. } if (!/^[6-9]/.test(cmdPom)) {
  1599. $("#oPomError").text("தொலைபேசி எண் 6, 7, 8 அல்லது 9-இல் தொடங்க வேண்டும்.");
  1600. isValid = false;
  1601. } if (/^(\d)\1{9}$/.test(cmdPom)) {
  1602. $("#oPomError").text("தொலைபேசி எண்ணில் ஒரே இலக்கம் மீண்டும் மீண்டும் வரக்கூடாது");
  1603. isValid = false;
  1604. } if (
  1605. cmdPom === "1234567890" ||
  1606. cmdPom === "0123456789" ||
  1607. cmdPom === "9876543210" ||
  1608. cmdPom === "0987654321"
  1609. ) {
  1610. $("#oPomError").text("சரியான தொலைபேசி எண்ணை உள்ளிடவும்");
  1611. isValid = false;
  1612. }
  1613. if (!cmpPVolSelect) {
  1614. $("#oPvolYError").text("தயவுசெய்து முந்தைய தன்னார்வலர்களின் விவரங்களைத் தேர்ந்தெடுக்கவும்.");
  1615. isValid = false;
  1616. }
  1617. var c2mobile = $.trim($("#oPom").val());
  1618. if(c2mobile !== "" && ephno !== "" && c2mobile === ephno){
  1619. Swal.fire({
  1620. title: "Warning!",
  1621. text: "கைபேசி எண்ணும் அவசரக்காலத் தொலைபேசி எண்ணும் ஒன்றாக இருக்கக்கூடாது",
  1622. icon: "warning",
  1623. confirmButtonText: "OK"
  1624. });
  1625. isValid = false;
  1626. }
  1627. if (i == 0) {
  1628. alert("விருப்பமான பகுதி விவரங்களைத் தேர்ந்தெடுக்கவும்.");
  1629. isValid = false;
  1630. }
  1631. if (isValid) {
  1632. $("#submitBtn").prop("disabled", true);
  1633. saveNGODetails();
  1634. return false;
  1635. }
  1636. else{
  1637. var firstError = $(".text-danger")
  1638. .filter(function () {
  1639. return $.trim($(this).text()) !== "";
  1640. })
  1641. .first();
  1642. if (firstError.length) {
  1643. var target = firstError
  1644. .closest(".mb-3")
  1645. .find("input, select, textarea")
  1646. .first();
  1647. if (target.length) {
  1648. $("html, body").animate({
  1649. scrollTop: target.offset().top - 120
  1650. }, 600);
  1651. // Focus the field
  1652. target.focus();
  1653. }else {
  1654. // Fallback to error message
  1655. $("html, body").animate({
  1656. scrollTop: firstError.offset().top - 120
  1657. }, 600);
  1658. }
  1659. }
  1660. }
  1661. return false;
  1662. }
  1663. return isValid; // Prevent default form submit in all cases
  1664. }
  1665. function saveTheIndividualForm() {
  1666. var preferredAreas = [];
  1667. $(".zone-checkbox:checked").each(function () {
  1668. preferredAreas.push($(this).val());
  1669. });
  1670. // Create JSON object with form data
  1671. var volunteerData = {
  1672. category:$("#category option:selected").data("category"),
  1673. subCategory: $("#subcategory option:selected").data("sub-category"),
  1674. name: $("#name").val(),
  1675. email: $("#email").val(),
  1676. dob: $("#dob").val(),
  1677. gender: $("input[name='gender']:checked").val(),
  1678. mobile_no: $("#mobile").val(),
  1679. //landline_no: $("#landline").val(),
  1680. district: $("#district").val(),
  1681. address: $("#address").val(),
  1682. pin_code: $("#pincode").val(),
  1683. //degree: $("#edu").val(),
  1684. //college_name: $("#college").val(),
  1685. //vol_nss: $("input[name='nss']:checked").val(),
  1686. //vol_ncc: $("input[name='ncc']:checked").val(),
  1687. //occupation: $("#occupation").val(),
  1688. //designation: $("#designation").val(),
  1689. //ngo_associated: $("#ngoAny").val(),
  1690. previous_volunteered: $("input[name='preVol']:checked").val(),
  1691. // Add more fields if needed
  1692. referBy: $("#ref").val(),
  1693. //aadhar: $("#aadhar").val(),
  1694. //bloodgroup: $("#bloodgroup").val(),
  1695. preferredAreas: preferredAreas,
  1696. expertise_area:$("#expertise").val(),
  1697. other_expertise:$("#other_expertise").val(),
  1698. ephno:$("#ephno").val(),
  1699. doc_type:$.trim($("#docs").val()),
  1700. doc_number:$.trim($("#doc_number").val()),
  1701. };
  1702. // Create FormData
  1703. var formData = new FormData();
  1704. // Add JSON data as Blob
  1705. formData.append(
  1706. "volunteer",
  1707. new Blob(
  1708. [JSON.stringify(volunteerData)],
  1709. { type: "application/json" }
  1710. )
  1711. );
  1712. // Add file
  1713. var docFile = $("#doc_url")[0].files[0];
  1714. if (docFile) {
  1715. formData.append("doc_url", docFile);
  1716. }
  1717. $('#loader').show();
  1718. // Send AJAX POST request
  1719. $.ajax({
  1720. type: "POST",
  1721. url: "/volunteer/api/register",
  1722. data: formData,
  1723. // IMPORTANT
  1724. processData: false,
  1725. contentType: false,
  1726. beforeSend: function() {
  1727. $("#pageLoader").show();
  1728. },
  1729. success: function (response) {
  1730. $('#loader').hide();
  1731. successPopup(response);
  1732. },
  1733. error: function (xhr) {
  1734. $('#loader').hide();
  1735. console.log("Error status:", xhr.status);
  1736. console.log("Error response:", xhr.responseText);
  1737. if (xhr.status === 409) {
  1738. var response = xhr.responseJSON;
  1739. Swal.fire({
  1740. title: "Warning!",
  1741. text: response && response.message
  1742. ? response.message
  1743. : "This mobile number is already registered",
  1744. icon: "warning",
  1745. confirmButtonText: "OK"
  1746. });
  1747. } else {
  1748. Swal.fire({
  1749. title: "Error!",
  1750. text: "Unable to save registration. Please try again.",
  1751. icon: "error",
  1752. confirmButtonText: "OK"
  1753. });
  1754. }
  1755. // Allow user to submit again
  1756. $("#submitBtn").prop("disabled", false);
  1757. },
  1758. complete: function () {
  1759. // Re-enable the submit button after completion (either success or error)
  1760. $("#pageLoader").hide();
  1761. }
  1762. });
  1763. return false;
  1764. }
  1765. function saveCorporateDetails() {
  1766. var preferredAreas = [];
  1767. $(".zone-checkbox:checked").each(function () {
  1768. preferredAreas.push($(this).val());
  1769. });
  1770. var copInfo = {
  1771. category:$("#category option:selected").data("category"),
  1772. subCategory: $("#subcategory option:selected").data("sub-category"),
  1773. compName: $("#cmpName").val(),
  1774. compEmail: $("#cmpEmail").val(),
  1775. landline: $("#cmpLandline").val(),
  1776. mobileNo: $("#cmpMobile").val(),
  1777. district: $("#cmpDistrict").val(),
  1778. address: $("#cmpAddress").val(),
  1779. pinCode: $("#cmpPincode").val(),
  1780. no_of_vol: $("#cmpNov").val(),
  1781. contactPerson: $("#cmpPoc").val(),
  1782. contactPerMobile: $("#cmdPom").val(),
  1783. cntPerEmail: $("#cmdPoE").val(),
  1784. cntPerDesign: $("#cmdPod").val(),
  1785. previous_volunteered: $("input[name='cmpPVol']:checked").val(),
  1786. referBy: $("#ref").val(),
  1787. preferredAreas: preferredAreas,
  1788. expertise_area:$("#expertise").val(),
  1789. other_expertise:$("#other_expertise").val(),
  1790. ephno:$("#ephno").val(),
  1791. }
  1792. $('#loader').show();
  1793. $.ajax({
  1794. type: "POST",
  1795. url: "/volunteer/api/registerAsCorporate",
  1796. contentType: "application/json",
  1797. data: JSON.stringify(copInfo),
  1798. beforeSend: function() {
  1799. $("#pageLoader").show();
  1800. },
  1801. success: function (response) {
  1802. $('#loader').hide();
  1803. successPopup(response);
  1804. },
  1805. error: function (xhr) {
  1806. $('#loader').hide();
  1807. console.log("Error status:", xhr.status);
  1808. console.log("Error response:", xhr.responseText);
  1809. if (xhr.status === 409) {
  1810. var response = xhr.responseJSON;
  1811. Swal.fire({
  1812. title: "Warning!",
  1813. text: response && response.message
  1814. ? response.message
  1815. : "This mobile number is already registered",
  1816. icon: "warning",
  1817. confirmButtonText: "OK"
  1818. });
  1819. } else {
  1820. Swal.fire({
  1821. title: "Error!",
  1822. text: "Unable to save registration. Please try again.",
  1823. icon: "error",
  1824. confirmButtonText: "OK"
  1825. });
  1826. }
  1827. // Allow user to submit again
  1828. $("#submitBtn").prop("disabled", false);
  1829. },
  1830. complete: function () {
  1831. // Re-enable the submit button after completion (either success or error)
  1832. $("#pageLoader").hide();
  1833. },
  1834. });
  1835. return false;
  1836. }
  1837. function saveNGODetails() {
  1838. var preferredAreas = [];
  1839. $(".zone-checkbox:checked").each(function () {
  1840. preferredAreas.push($(this).val());
  1841. });
  1842. var ngoInfo = {
  1843. category:$("#category option:selected").data("category"),
  1844. subCategory: $("#subcategory option:selected").data("sub-category"),
  1845. orgName: $("#ngoOrgName").val(),
  1846. orgEmail: $("#ngoOrgEmail").val(),
  1847. /* landline: $("#oLandline").val(),
  1848. mobileNo: $("#oMobile").val(), */
  1849. district: $("#oDistrict").val(),
  1850. address: $("#oAddress").val(),
  1851. pinCode: $("#oPincode").val(),
  1852. no_of_vol: $("#oNvol").val(),
  1853. contactPerson: $("#oPoc").val(),
  1854. mobileNo: $("#oPom").val(),
  1855. cntPerEmail: $("#oPoE").val(),
  1856. cntPerDesign: $("#oPod").val(),
  1857. previous_volunteered: $("input[name='oPvolY']:checked").val(),
  1858. referBy: $("#ref").val(),
  1859. preferredAreas: preferredAreas,
  1860. expertise_area:$("#expertise").val(),
  1861. other_expertise:$("#other_expertise").val(),
  1862. ephno:$("#ephno").val(),
  1863. }
  1864. $('#loader').show();
  1865. $.ajax({
  1866. type: "POST",
  1867. url: "/volunteer/api/registerAsNgo",
  1868. contentType: "application/json",
  1869. data: JSON.stringify(ngoInfo),
  1870. beforeSend: function() {
  1871. $("#pageLoader").show();
  1872. },
  1873. success: function (response) {
  1874. $('#loader').hide();
  1875. successPopup(response);
  1876. },
  1877. complete: function () {
  1878. // Re-enable the submit button after completion (either success or error)
  1879. $("#pageLoader").hide();
  1880. },
  1881. });
  1882. return false;
  1883. }
  1884. function successPopup(id) {
  1885. $("#submitBtn").prop("disabled", true);
  1886. Swal.fire({
  1887. title: "Good job!",
  1888. 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",
  1889. icon: "success",
  1890. allowOutsideClick: false,
  1891. allowEscapeKey: false,
  1892. allowEnterKey: false
  1893. }).then((result) => {
  1894. if (result.isConfirmed) {
  1895. window.location.href = "https://chennaicorporation.gov.in/gcc/"; // Redirect to the desired URL
  1896. }
  1897. });
  1898. }
  1899. //script for otp
  1900. $(document).ready(function () {
  1901. // Event listener for Send OTP button
  1902. $('#sendOtpButton').click(function (event) {
  1903. event.preventDefault();
  1904. // Get the entered mobile number
  1905. const mobileNumber = $('#mobile').val();
  1906. // Basic check to ensure mobile number is entered
  1907. if (mobileNumber.length === 10) {
  1908. // Display the mobile number in the OTP modal
  1909. $("#mobilenotxt").html(mobileNumber);
  1910. $.ajax({
  1911. type: "GET",
  1912. url: '/volunteer/api/registration/sendOTP',
  1913. data: {'mobile': mobileNumber, 'purpose': 'New User'}, // Pass mobile number and purpose
  1914. dataType: 'json',
  1915. success: function (response) {
  1916. if (response === "Error: This number is not registered.") {
  1917. // Show an alert if the number is not registered
  1918. alert("This number is not registered.");
  1919. } else if (response !== "Error") {
  1920. // Bootstrap 4 Modal Handling
  1921. $('#otpForm').modal('show');
  1922. // On successful OTP send, enable the verified button and update its state
  1923. //$('#verifiedOTP').prop('disabled', false).css('display', 'block');
  1924. // Start countdown for resend OTP
  1925. var timeleft = 60;
  1926. var resendTimeout;
  1927. var countdown = $("#countdown");
  1928. // Display countdown
  1929. $("#resendlink").html('Please wait.. <span id="countdown">60</span>s');
  1930. resendTimeout = setInterval(function () {
  1931. timeleft--;
  1932. countdown.text(timeleft);
  1933. // When countdown finishes, enable Resend OTP link
  1934. if (timeleft <= 0) {
  1935. clearInterval(resendTimeout);
  1936. $("#resendlink").html('<a href="#" id="resend-link" class="text-info" onclick="return sendOTP();">Resend OTP</a>');
  1937. }
  1938. }, 1000);
  1939. } else {
  1940. alert("OTP not sent. Please try again.");
  1941. }
  1942. },
  1943. error: function () {
  1944. alert("This number is not registered.");
  1945. }
  1946. });
  1947. } else {
  1948. alert("Please enter a valid 10-digit mobile number.");
  1949. }
  1950. });
  1951. });
  1952. // For OTP input box
  1953. $('.otp-input').on('keyup', function (e) {
  1954. var $this = $(this);
  1955. if ($this.val().length === 1) {
  1956. $this.next('.otp-input').focus();
  1957. }
  1958. if ($this.val().length === 0) {
  1959. $this.prev('.otp-input').focus();
  1960. }
  1961. });
  1962. // Verify OTP function
  1963. function verifyOtp() {
  1964. var otpInputs = $('.otp-input');
  1965. var otpValue = '';
  1966. otpInputs.each(function () {
  1967. otpValue += $(this).val();
  1968. });
  1969. $.ajax({
  1970. type: "GET",
  1971. url: '/volunteer/api/registration/verifyOTP',
  1972. data: {'otp': otpValue},
  1973. dataType: 'text',
  1974. success: function (bodyMessage) {
  1975. if (bodyMessage.trim() === "Success") {
  1976. // SweetAlert for success
  1977. Swal.fire({
  1978. title: "OTP Verified!",
  1979. text: "Your OTP has been successfully verified.",
  1980. icon: "success",
  1981. confirmButtonText: "OK"
  1982. }).then(() => {
  1983. $('#otpForm').modal('hide'); // Hide the OTP modal
  1984. $('#sendOtpButton').prop('disabled', true).css('display', 'none');
  1985. $('#verifiedOTP').prop('disabled', false).css('display', 'block');
  1986. });
  1987. } else {
  1988. // SweetAlert for failure
  1989. Swal.fire({
  1990. title: "OTP Incorrect",
  1991. text: "The OTP you entered is incorrect. Please try again.",
  1992. icon: "error",
  1993. confirmButtonText: "Retry"
  1994. });
  1995. }
  1996. },
  1997. error: function () {
  1998. // SweetAlert for server error
  1999. Swal.fire({
  2000. title: "Error",
  2001. text: "There was an issue verifying your OTP. Please try again later.",
  2002. icon: "error",
  2003. confirmButtonText: "OK"
  2004. });
  2005. }
  2006. });
  2007. return false; // Prevent form submission
  2008. }
  2009. //to set dob
  2010. function setMaxDate() {
  2011. const today = new Date();
  2012. const formattedDate = today.toISOString().split('T')[0]; // Format date as YYYY-MM-DD
  2013. document.getElementById('dob').setAttribute('max', formattedDate);
  2014. }
  2015. function validateAge() {
  2016. const dobInput = document.getElementById('dob');
  2017. const dobError = document.getElementById('dobError');
  2018. const dobValue = new Date(dobInput.value);
  2019. const today = new Date();
  2020. // Calculate the age
  2021. const age = today.getFullYear() - dobValue.getFullYear();
  2022. const monthDifference = today.getMonth() - dobValue.getMonth();
  2023. // Adjust age if the birthday hasn't occurred yet this year
  2024. if (monthDifference < 0 || (monthDifference === 0 && today.getDate() < dobValue.getDate())) {
  2025. age--;
  2026. }
  2027. if (age < 18) {
  2028. alert("You must be at least 18 years old."); // Popup alert
  2029. dobInput.value = ''; // Clear the input if age is under 18
  2030. } else {
  2031. dobError.textContent = ""; // Clear error message
  2032. }
  2033. }
  2034. // Call setMaxDate when the page loads
  2035. window.onload = setMaxDate;
  2036. //script for submit
  2037. //to validate aadhar
  2038. function validateAadhar() {
  2039. const aadharInput = document.getElementById('aadhar');
  2040. const aadharError = document.getElementById('aadharError');
  2041. const aadharValue = aadharInput.value;
  2042. // Check if the input length is 12
  2043. if (aadharValue.length === 12) {
  2044. aadharError.textContent = ''; // Clear the error
  2045. } else {
  2046. aadharError.textContent = 'Aadhar number must be exactly 12 digits.';
  2047. }
  2048. }
  2049. </script>
  2050. </body>
  2051. </html>