Commit 50b8b16b authored by Sneha 's avatar Sneha

chore: add validation & classDropdown in admin_portal form

parent c4bd9e55
...@@ -50,6 +50,16 @@ ...@@ -50,6 +50,16 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
<small>Please specify Category</small> <small>Please specify Category</small>
</div> </div>
<div class="la-form-group">
<label for="existing">Student Admission Type </label>
<select id="existing" name="existing" class="la-form-control">
<option value="">Select Admission Type</option>
<option value="true">Existing Student</option>
<option value="false">New Student</option>
</select>
<div class="la-invalid-feedback"></div>
<small>Please select whether this is an admission for an existing student or a new one.</small>
</div>
<div id="staffDepartmentContainer" class="la-form-group"> <div id="staffDepartmentContainer" class="la-form-group">
<label for="staffDepartment">Staff Department <span>*</span></label> <label for="staffDepartment">Staff Department <span>*</span></label>
<select id="staffDepartment" name="staffDepartment" class="la-form-control"> <select id="staffDepartment" name="staffDepartment" class="la-form-control">
...@@ -90,7 +100,19 @@ ...@@ -90,7 +100,19 @@
<select name="admissionClass" class="la-form-control"> <select name="admissionClass" class="la-form-control">
<option value="">Specify Class</option> <option value="">Specify Class</option>
<option value="Lower Nursery">Lower Nursery</option> <option value="Lower Nursery">Lower Nursery</option>
<!-- <option value="Upper Nursery">Upper Nursery</option> --> <option value="Upper Nursery">Upper Nursery</option>
<option value="Kindergarten">Kindergarten</option>
<option value="Class 1">Class 1</option>
<option value="Class 2">Class 2</option>
<option value="Class 3">Class 3</option>
<option value="Class 4">Class 4</option>
<option value="Class 5">Class 5</option>
<option value="Class 6">Class 6</option>
<option value="Class 7">Class 7</option>
<option value="Class 8">Class 8</option>
<option value="Class 9">Class 9</option>
<option value="Class 10">Class 10</option>
<option value="Class 11">Class 11</option>
</select> </select>
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
<small>Please specify class in which admission is sought. (based on the selection of Class – the year of Birth is automatically fixed)</small> <small>Please specify class in which admission is sought. (based on the selection of Class – the year of Birth is automatically fixed)</small>
...@@ -102,12 +124,12 @@ ...@@ -102,12 +124,12 @@
<small>Date of Birth - as given in the Municipal Corporation Birth Certificate/Baptism Certificate</small> <small>Date of Birth - as given in the Municipal Corporation Birth Certificate/Baptism Certificate</small>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="nationality">Nationality <span>*</span></label> <label for="nationality">Nationality </label>
<input type="text" name="nationality" class="la-form-control"> <input type="text" name="nationality" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="religion">Religion <span>*</span></label> <label for="religion">Religion </label>
<select id="religion" name="religion" class="la-form-control"> <select id="religion" name="religion" class="la-form-control">
<option value="">Specify Religion</option> <option value="">Specify Religion</option>
<option value="Christian">Christian</option> <option value="Christian">Christian</option>
...@@ -121,22 +143,22 @@ ...@@ -121,22 +143,22 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div id="denominationContainer" class="la-form-group"> <div id="denominationContainer" class="la-form-group">
<label for="denomination">Denomination <span>*</span></label> <label for="denomination">Denomination </label>
<input id="denomination" type="text" name="denomination" class="la-form-control"> <input id="denomination" type="text" name="denomination" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div id="churchContainer" class="la-form-group"> <div id="churchContainer" class="la-form-group">
<label for="church">Church <span>*</span></label> <label for="church">Church </label>
<input id="church" type="text" name="church" class="la-form-control"> <input id="church" type="text" name="church" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherTongue">Mother Tongue <span>*</span></label> <label for="motherTongue">Mother Tongue </label>
<input type="text" name="motherTongue" class="la-form-control"> <input type="text" name="motherTongue" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="community">Community <span>*</span></label> <label for="community">Community </label>
<input type="text" name="community" class="la-form-control"> <input type="text" name="community" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
<small>Socio- Linguistic community (eg Bengali, Punjabi, Marwari, Jain etc.)</small> <small>Socio- Linguistic community (eg Bengali, Punjabi, Marwari, Jain etc.)</small>
...@@ -167,7 +189,7 @@ ...@@ -167,7 +189,7 @@
<!-- start of parent information --> <!-- start of parent information -->
<h4>PARENT INFORMATION</h4> <h4>PARENT INFORMATION</h4>
<div class="la-form-group"> <div class="la-form-group">
<label for="maritalStatus">Marital Status <span>*</span></label> <label for="maritalStatus">Marital Status </label>
<select id="maritalStatus" name="maritalStatus" class="la-form-control"> <select id="maritalStatus" name="maritalStatus" class="la-form-control">
<option value="">Choose an option</option> <option value="">Choose an option</option>
<option value="Married">Married</option> <option value="Married">Married</option>
...@@ -203,12 +225,12 @@ ...@@ -203,12 +225,12 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherNationality">Nationality <span>*</span></label> <label for="fatherNationality">Nationality </label>
<input type="text" name="fatherNationality" class="la-form-control"> <input type="text" name="fatherNationality" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherReligion">Religion <span>*</span></label> <label for="fatherReligion">Religion </label>
<select id="fatherReligion" name="fatherReligion" class="la-form-control"> <select id="fatherReligion" name="fatherReligion" class="la-form-control">
<option value="">Specify Religion</option> <option value="">Specify Religion</option>
<option value="Christian">Christian</option> <option value="Christian">Christian</option>
...@@ -222,29 +244,29 @@ ...@@ -222,29 +244,29 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div id="fatherDenominationContainer" class="la-form-group"> <div id="fatherDenominationContainer" class="la-form-group">
<label for="fatherDenomination">Denomination <span>*</span></label> <label for="fatherDenomination">Denomination </label>
<input id="fatherDenomination" type="text" name="fatherDenomination" class="la-form-control"> <input id="fatherDenomination" type="text" name="fatherDenomination" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div id="fatherChurchContainer" class="la-form-group"> <div id="fatherChurchContainer" class="la-form-group">
<label for="fatherChurch">Church <span>*</span></label> <label for="fatherChurch">Church </label>
<input id="fatherChurch" type="text" name="fatherChurch" class="la-form-control"> <input id="fatherChurch" type="text" name="fatherChurch" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherMotherTongue">Mother Tongue <span>*</span></label> <label for="fatherMotherTongue">Mother Tongue </label>
<input type="text" name="fatherMotherTongue" class="la-form-control"> <input type="text" name="fatherMotherTongue" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherCommunity">Community <span>*</span></label> <label for="fatherCommunity">Community </label>
<input type="text" name="fatherCommunity" class="la-form-control"> <input type="text" name="fatherCommunity" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
<small>Socio- Linguistic community (eg Bengali, Punjabi, Marwari, Jain etc.)</small> <small>Socio- Linguistic community (eg Bengali, Punjabi, Marwari, Jain etc.)</small>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherSchoolInfo">School, Name of Institution, Examination <label for="fatherSchoolInfo">School, Name of Institution, Examination
Passed <span>*</span></label> Passed </label>
<input type="text" name="fatherSchoolInfo" class="la-form-control"> <input type="text" name="fatherSchoolInfo" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
...@@ -264,12 +286,12 @@ ...@@ -264,12 +286,12 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherOccupation">Occupation and Designation <span>*</span></label> <label for="fatherOccupation">Occupation and Designation </label>
<input type="text" name="fatherOccupation" class="la-form-control"> <input type="text" name="fatherOccupation" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="fatherMonthlyIncome">Monthly Income <span>*</span></label> <label for="fatherMonthlyIncome">Monthly Income </label>
<input type="text" name="fatherMonthlyIncome" class="la-form-control"> <input type="text" name="fatherMonthlyIncome" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
...@@ -282,27 +304,27 @@ ...@@ -282,27 +304,27 @@
<!-- Mother Information --> <!-- Mother Information -->
<h4>DETAILS OF MOTHER</h4> <h4>DETAILS OF MOTHER</h4>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherName">Full Name <span>*</span></label> <label for="motherName">Full Name </label>
<input id="motherName" type="text" name="motherName" class="la-form-control"> <input id="motherName" type="text" name="motherName" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherEmail">Email <span>*</span></label> <label for="motherEmail">Email </label>
<input id="motherEmail" type="email" name="motherEmail" class="la-form-control"> <input id="motherEmail" type="email" name="motherEmail" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherMobile">Phone <span>*</span></label> <label for="motherMobile">Phone </label>
<input id="motherMobile" type="text" name="motherMobile" class="la-form-control"> <input id="motherMobile" type="text" name="motherMobile" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherNationality">Nationality <span>*</span></label> <label for="motherNationality">Nationality</label>
<input id="motherNationality" type="text" name="motherNationality" class="la-form-control"> <input id="motherNationality" type="text" name="motherNationality" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherReligion">Religion <span>*</span></label> <label for="motherReligion">Religion </label>
<select id="motherReligion" name="motherReligion" class="la-form-control"> <select id="motherReligion" name="motherReligion" class="la-form-control">
<option value="">Specify Religion</option> <option value="">Specify Religion</option>
<option value="Christian">Christian</option> <option value="Christian">Christian</option>
...@@ -316,29 +338,29 @@ ...@@ -316,29 +338,29 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div id="motherDenominationContainer" class="la-form-group"> <div id="motherDenominationContainer" class="la-form-group">
<label for="motherDenomination">Denomination <span>*</span></label> <label for="motherDenomination">Denomination </label>
<input id="motherDenomination" type="text" name="motherDenomination" class="la-form-control"> <input id="motherDenomination" type="text" name="motherDenomination" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div id="motherChurchContainer" class="la-form-group"> <div id="motherChurchContainer" class="la-form-group">
<label for="motherChurch">Church <span>*</span></label> <label for="motherChurch">Church </label>
<input id="motherChurch" type="text" name="motherChurch" class="la-form-control"> <input id="motherChurch" type="text" name="motherChurch" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherMotherTongue">Mother Tongue <span>*</span></label> <label for="motherMotherTongue">Mother Tongue</label>
<input id="motherMotherTongue" type="text" name="motherMotherTongue" class="la-form-control"> <input id="motherMotherTongue" type="text" name="motherMotherTongue" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherCommunity">Community <span>*</span></label> <label for="motherCommunity">Community </label>
<input id="motherCommunity" type="text" name="motherCommunity" class="la-form-control"> <input id="motherCommunity" type="text" name="motherCommunity" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
<small>Socio- Linguistic community (eg Bengali, Punjabi, Marwari, Jain etc.)</small> <small>Socio- Linguistic community (eg Bengali, Punjabi, Marwari, Jain etc.)</small>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherSchoolInfo">School, Name of Institution, Examination <label for="motherSchoolInfo">School, Name of Institution, Examination
Passed <span>*</span></label> Passed </label>
<input id="motherSchoolInfo" type="text" name="motherSchoolInfo" class="la-form-control"> <input id="motherSchoolInfo" type="text" name="motherSchoolInfo" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
...@@ -358,7 +380,7 @@ ...@@ -358,7 +380,7 @@
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
</div> </div>
<div class="la-form-group"> <div class="la-form-group">
<label for="motherOccupation">Occupation and Designation <span>*</span></label> <label for="motherOccupation">Occupation and Designation </label>
<input id="motherOccupation" type="text" name="motherOccupation" class="la-form-control"> <input id="motherOccupation" type="text" name="motherOccupation" class="la-form-control">
<div class="la-invalid-feedback"></div> <div class="la-invalid-feedback"></div>
<small>If not working please write Homemaker/Housewife</small> <small>If not working please write Homemaker/Housewife</small>
......
...@@ -150,9 +150,51 @@ $(document).ready(function () { ...@@ -150,9 +150,51 @@ $(document).ready(function () {
$('#application-form').validate({ $('#application-form').validate({
rules: { rules: {
school: 'required',//
category: 'required',//
fullName: 'required',//
admissionClass: 'required',//
dateOfBirth: 'required',//
homeAddress: 'required',//
correspondenceAddress: 'required',//
fatherName: 'required',//
fatherEmail: 'required',//
fatherMobile: {
required: true,
regex: /^[0-9]{10}$/,
},//
candidateImage: {
extension: ['jpg', 'png', 'jpeg', 'svg'],
fileSize: 1 * 1024 * 1024,
},
fatherImage: {
extension: ['jpg', 'png', 'jpeg', 'svg'],
fileSize: 1 * 1024 * 1024,
},
formSubmitCheck: 'required', formSubmitCheck: 'required',
}, },
messages: { messages: {
school: 'Please select your school',
category: 'Please specify the category',
fullName: 'Please enter your full name',
admissionClass: 'Please specify the class',
dateOfBirth: 'Please enter the date of birth',
homeAddress: 'Please enter the home address',
correspondenceAddress: 'Please enter the correspondence address',
fatherName: "Please enter father's name",
fatherEmail: "Please enter father's email",
fatherMobile: {
required: "Please enter father's phone number",
regex: 'Please enter a valid phone number',
},
candidateImage: {
extension: 'Only jpg, jpeg, png, svg files are allowed.',
fileSize: 'Please upload a file smaller than 1 MB',
},
fatherImage: {
extension: 'Only jpg, jpeg, png, svg files are allowed.',
fileSize: 'Please upload a file smaller than 1 MB',
},
formSubmitCheck: 'Please check this box to submit the form', formSubmitCheck: 'Please check this box to submit the form',
}, },
errorPlacement: function (error, element) { errorPlacement: function (error, element) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment