- {% load i18n %}
- {% load widget_tweaks %}
- {% load static %}
- {% load admission_filter %}
- {% load admission_specific_filter %}
- <!DOCTYPE html>
- <html lang="en">
- <head>
- <meta charset="UTF-8">
- <meta name="viewport" content="width=device-width, initial-scale=1.0">
- <title>BITS WILP</title>
- <link rel="icon" type="image/x-icon" href="{% static 'assets/images/bits_logo.png' %}">
- <!-- Fonts -->
- <link rel="preconnect" href="https://fonts.googleapis.com">
- <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin>
- <link href="https://fonts.googleapis.com/css2?family=Nunito+Sans:opsz,[email protected],200;6..12,400;6..12,600;6..12,800&display=swap" rel="stylesheet">
- <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
- <!-- Stylesheets -->
- <link rel="stylesheet" type="text/css" href="{% static 'assets/css/style.css'%}">
- <link rel="stylesheet" href="{% static 'assets/css/bootstrap.min.css'%}">
- <link rel="stylesheet" href="{% static 'assets/css/ie10-viewport-bug-workaround.css'%}">
- <link rel="stylesheet" href="{% static 'assets/css/signin.css'%}">
- <link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/[email protected]/dist/css/bootstrap.min.css">
- <link rel="stylesheet" href="{% static 'registrations/css/theme.css'%}">
- <!-- JavaScript -->
- <script src="{% static 'assets/js/ie-emulation-modes-warning.js'%}"></script>
- <script src="{% static 'assets/js/jquerynew.min.js'%}"></script>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/cropper/4.0.0/cropper.min.css" integrity="sha256-/KLAk4A9xEOKGyr4umt11boYQJtP40gBLT+WrfWImuY=" crossorigin="anonymous">
- <link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" integrity="sha384-wvfXpqpZZVQGK6TAh5PVlGOfQNHSoD2xbE+QkPxCAFlNEevoEH3Sl0sibVcOQVnN" crossorigin="anonymous">
- <script src="https://code.jquery.com/ui/1.12.0/jquery-ui.js"></script>
- <link rel="stylesheet" href="https://code.jquery.com/ui/1.12.0/themes/base/jquery-ui.css">
- {% if wizard.steps.current == '7' %}
- <script type="text/javascript">
- var file_error = [];
- var actual_size = 10485760;
- var forms = '{{formset.forms|length}}';
- $(document).ready(function() {
- if ('{{document_submission_flag}}' == 'False') {
- $('#upload_doc_sub').prop('disabled', true);
- }
- {% for form in formset.forms %}
- file_error["{{form.file.auto_id}}"] = false;
- $("#{{form.file.auto_id}}").change(function() {
- if($(this).prop('files')[0].size>actual_size) {
- $('#{{form.id.auto_id}}' + "_errors").html(
- '* Please keep file size under ' +
- Math.round((actual_size/1024)/1024, 2) +
- ' MB. Current file size is' +
- Math.round(($(this).prop('files')[0].size/1024)/1024, 2) +
- ' MB.'
- );
- $(this).val('');
- file_error[$(this).attr('id')] = true;
- }
- else if($(this).prop('files')[0].name.split('.')[0].length>25){
- $('#{{form.id.auto_id}}' + "_errors").html("* File Name length should be less then 25.");
- $(this).val('');
- file_error[$(this).attr('id')] = true;
- }
- else if (
- $.inArray(
- $(this).val().substr(
- $(this).val().lastIndexOf('.')+1
- ).toLowerCase(),
- ['pdf', 'jpeg', 'jpg', 'png', 'tiff', 'tif', 'zip', 'doc', 'docx']
- ) == -1
- ) {
- $('#{{form.id.auto_id}}' + "_errors").html("* Incorrect file formats selected for upload, please ensure that only PDF, JPEG, PNG, TIFF, ZIP and DOC are chosen for upload.");
- $(this).val('');
- file_error[$(this).attr('id')] = true;
- }
- else{
- $('#{{form.id.auto_id}}' + "_errors").html('');
- file_error[$(this).attr('id')] = false;
- }
- if ($(this).hasClass('important') && $(this).prop('files').length === 0) {
- file_error[$(this).attr('id')] = true;
- } else {
- file_error[$(this).attr('id')] = false;
- }
- });
- {% endfor %}
- $('#upload_doc_sub').click(function() {
- if ($('.mentor').data('error-msg')){
- $('.mentor').after('<span class="text-danger">' + $('.mentor').data('error-msg') + '</span>');
- }
- if ($('.employer').data('error-msg')){
- $('.employer').after('<span class="text-danger">' + $('.employer').data('error-msg') + '</span>');
- }
- $('.req').each(function() {
- var $fileInput = $(this);
- var $errorSpan = $fileInput.siblings('.text-danger');
- var $documentLink = $fileInput.closest('td').find('a');
- if (!$fileInput.val() && !$documentLink.length) {
- $errorSpan.text($fileInput.data('error-msg'));
- event.preventDefault();
- } else {
- $errorSpan.text('');
- }
- });
- $('.rej').each(function() {
- var $fileInput = $(this);
- var $errorSpan = $fileInput.siblings('.text-danger');
- if (!$fileInput.val()) {
- $errorSpan.text($fileInput.data('error-msg'));
- event.preventDefault();
- } else {
- $errorSpan.text('');
- }
- });
- $('.std').each(function() {
- var $fileInput = $(this);
- var $errorSpan = $fileInput.siblings('.text-danger');
- if (!$fileInput.val()) {
- $errorSpan.text($fileInput.data('error-msg'));
- event.preventDefault();
- } else {
- $errorSpan.text('');
- }
- });
- $('.mentor').data('error-msg', '');
- $('.employer').data('error-msg', '');
- });
- });
- </script>
- {% endif %}
- {% if wizard.steps.current == '6' %}
- <script>
- $(document).ready(function() {
- $('#id_6-photo_file, #id_6-signature_file').change(function() {
- var fileId = $(this).attr('id');
- var errorTag = $('#' + fileId + '_error');
- var maxSizeKB = 100;
- var minSizeKB = 20;
- var file = $(this).prop('files')[0]
- var fileSizeKB = file.size / 1024;
- if (fileId === 'id_6-photo_file') {
- errorTag = $('#error_rev_photo');
- } else if (fileId === 'id_6-signature_file') {
- var minSizeKB = 5;
- errorTag = $('#error_rev_sign');
- }
- errorTag.text('');
- if (fileSizeKB > maxSizeKB || fileSizeKB < minSizeKB) {
- errorTag.text(
- 'The size of the file should be between ' + minSizeKB + ' KB and ' + maxSizeKB + ' KB.');
- $(this).val("");
- } else if ($(this).prop('files')[0].name.split('.')[0].length > 25) {
- errorTag.text(
- 'File Name length should be less than 25.');
- $(this).val("");
- } else if ($.inArray(
- $(this).val().substr($(this).val().lastIndexOf('.') + 1).toLowerCase(),
- [ 'jpeg', 'jpg', 'png', 'jfif']
- ) == -1) {
- errorTag.text(
- 'Incorrect file formats selected for upload, please ensure that only PDF, JPEG, PNG and JFIF are chosen for upload.');
- $(this).val("");
- }
- });
- $('.btn-next').click(function(event) {
- var photoFile = $('#id_6-photo_file').prop('files')[0];
- $('#error_rev_photo').text('');
- {% if not photo %}
- if (!photoFile) {
- event.preventDefault();
- $('#error_rev_photo').text('Please upload a photograph.');
- return;
- }
- {% endif %}
- var signatureFile = $('#id_6-signature_file').prop('files')[0];
- {% if not sign %}
- $('#error_rev_sign').text('');
- if (!signatureFile) {
- event.preventDefault();
- $('#error_rev_sign').text('Please upload a signature.');
- return;
- }
- {% endif %}
- });
- });
- </script>
- {% endif %}
- <script>
- $(document).ready(function () {
- {% if employer %}
- document.getElementById("id_5-hr_name").readOnly = true;
- document.getElementById("id_5-hr_email").readOnly = true;
- document.getElementById("id_5-hr_phone").readOnly = true;
- {% endif %}
- {% if mentor %}
- document.getElementById("id_5-mentor_name").readOnly = true;
- document.getElementById("id_5-mentor_email").readOnly = true;
- document.getElementById("id_5-mentor_phone").readOnly = true;
- {% endif %}
- // full name validation
- $("#id_0-full_name").on("change", function(){
- let fullName = $("#id_0-full_name").val();
- let errorSpanId = 'fullnameError';
- let pattern = /^[a-zA-Z\s,.`'-]+$/;
- let maxLength = 100;
- if (fullName.trim() !== '' && !pattern.test(fullName)) {
- updateFullNameErrorMessage('Please match the requested format.', errorSpanId);
- $("#id_0-full_name").val('');
- }
- else if(fullName.length > maxLength) {
- updateFullNameErrorMessage('Please enter a name with a maximum length of ' + maxLength + ' characters.', errorSpanId);
- $("#id_0-full_name").val('');
- }
- else{
- updateFullNameErrorMessage('', errorSpanId);
- }
- function updateFullNameErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- // fathers name valdation
- $("#id_0-fathers_name").on("change", function(){
- let fathersName = $("#id_0-fathers_name").val();
- let errorSpanId = 'fathersNameError';
- let pattern = /^[A-Za-z]+( [A-Za-z]+)*$/;
- if (!pattern.test(fathersName)) {
- updateFathersNameErrorMessage('Please match the requested format.', errorSpanId);
- $("#id_0-fathers_name").val('');
- }
- else{
- updateFathersNameErrorMessage('', errorSpanId);
- }
- function updateFathersNameErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- // mothers name validation
- $("#id_0-mothers_name").on("change", function(){
- let mothersName = $("#id_0-mothers_name").val();
- let errorSpanId = 'mothersNameError';
- let pattern = /^[A-Za-z]+( [A-Za-z]+)*$/;
- if (!pattern.test(mothersName)) {
- updateMothersNameErrorMessage('Please match the requested format.', errorSpanId);
- $("#id_0-mothers_name").val('');
- }
- else{
- updateMothersNameErrorMessage('', errorSpanId);
- }
- function updateMothersNameErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- function validatePinCode() {
- let country = $("#id_0-country").val();
- let pin_code = $("#id_0-pin_code").val()
- let errorSpanId = 'pincodeError';
- if (pin_code.length !== 0) {
- if ( country === 'IN' && pin_code.length === 6 && pin_code[0] === '0'){
- updatePincodeErrorMessage('First digit of pincode must be from 1-9.', errorSpanId);
- $("#id_0-pin_code").val('').focus();
- }
- else if (country === 'IN' && pin_code.length !== 6 ) {
- //showToast('Please enter a 6-digit PIN Code for India.', 'toastContainer');
- updatePincodeErrorMessage('Please enter a 6-digit PIN Code for India.', errorSpanId);
- $("#id_0-pin_code").val('').focus();
- }
- else{
- updatePincodeErrorMessage('', errorSpanId);
- }
- }
- }
- function updatePincodeErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- $("#id_0-country, #id_0-state, #id_0-pin_code").on("change", validatePinCode);
- $("#id_0-country").on("change", function(){
- let country = $("#id_0-country").val();
- let errorSpanId = 'stateError';
- let phoneCode = $('#id_0-phone_0')
- let mobileCode = $('#id_0-mobile_0')
- $("#id_0-state").val('');
- if (country !== 'IN' && $("#id_0-state").val() !== '30') {
- //showToast('Please select out of India in State field as Country is not India.', 'toastContainer');
- updateStateErrorMessage('Please select Outside India in State field as Country is not India.', errorSpanId);
- $("#id_0-state").val('');
- }
- else{
- if ($("#id_0-state").val() === '30') {
- updateStateErrorMessage('', errorSpanId);
- }
- }
- if (country ==='IN'){
- phoneCode.val('+91');
- mobileCode.val('+91');
- $('#id_0-phone_1').val('');
- $('#id_0-mobile_1').val('');
- }
- function updateStateErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- $("#id_0-state").on("change", function(){
- let stateValue = $("#id_0-state").val();
- let errorSpanId = 'stateError';
- let country = $("#id_0-country").val();
- if (country === 'IN' && stateValue === '30') {
- updateState1ErrorMessage('Please select some other state in State field as Country is India.', errorSpanId);
- $("#id_0-state").val('');
- }
- else if (country !== 'IN' && stateValue === '30') {
- updateState1ErrorMessage('', errorSpanId);
- }
- else if (country !== 'IN' && stateValue !== '30') {
- updateState1ErrorMessage('Please select Outside India in State field as Country is not India.', errorSpanId);
- }
- else{
- updateState1ErrorMessage('', errorSpanId);
- }
- function updateState1ErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- /*$("#id_0-state").on("change", function(){
- let country = $("#id_0-country").val();
- if (country !== 'IN' && $("#id_0-state").val() !== '30') {
- //showToast('Please select out of India in State field as Country is not India.', 'toastContainer');
- $("#id_0-state").val('');
- }
- });*/
- // email id validation
- $("#id_0-email_id").on("change", function(){
- let email = $("#id_0-email_id").val();
- let errorSpanId = 'emailError';
- let pattern = /^[^@]+@[^@]+\.[a-zA-Z]{2,}$/;
- if (!pattern.test(email)) {
- updateEmailErrorMessage('Please enter proper email address.', errorSpanId);
- $("#id_0-email_id").val('');
- }
- else {
- updateEmailErrorMessage('', errorSpanId);
- }
- function updateEmailErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- // alternate email id validation
- $("#id_0-alternate_email_id").on("change", function(){
- let email = $("#id_0-alternate_email_id").val();
- let mainEmail = $("#id_0-email_id").val();
- let errorSpanId = 'alternateemailError';
- let pattern = /^[^@]+@[^@]+\.[a-zA-Z]{2,}$/;
- if (!pattern.test(email)) {
- updateEmailErrorMessage('Please enter proper alternate email address.', errorSpanId);
- $("#id_0-alternate_email_id").val('');
- }
- else if (email === mainEmail) {
- updateEmailErrorMessage('Alternate Email ID should not be the same as Email ID.', errorSpanId);
- $("#id_0-alternate_email_id").val('');
- }
- else {
- updateEmailErrorMessage('', errorSpanId);
- }
- function updateEmailErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- // Hide the text field and button initially
- if ($("#id_1-prior_student_flag").val() ==1){
- $("#bits_student_lable_prior").show();
- $('#id_1-bits_student_id').prop('required',true);
- }
- else {
- $('#id_1-bits_student_id').prop('required',false);
- $("#bits_student_lable_prior").hide();
- }
- // Show the text field and button when the user selects "Yes" in the dropdown
- $('#id_1-prior_student_flag').change(function() {
- if ($(this).val() == '1') {
- $('#bits_student_lable_prior').show();
- $('#id_1-bits_student_id').prop('required',true);
- } else {
- $('#bits_student_lable_prior').hide();
- InvalidBsi(document.getElementById('id_1-bits_student_id'))
- $('#id_1-bits_student_id').val('');
- $('#id_1-bits_student_id').prop('required',false);
- }
- });
- $('#id_1-programming_flag').change(function() {
- if ($(this).val() == 'True') {
- $('#programming_language_knows').show();
- $('#id_1-programming_language_knows').prop('required',true);
- } else {
- $('#programming_language_knows').hide();
- InvalidPlk(document.getElementById('id_1-programming_language_knows'))
- $('#id_1-programming_language_knows').val('');
- $('#id_1-programming_language_knows').prop('required',false);
- }
- });
- if ( $('#id_1-programming_flag').val() == 'True') {
- $('#programming_language_knows').show();
- $('#id_1-programming_language_knows').prop('required',true);
- } else {
- $('#programming_language_knows').hide();
- $('#id_1-programming_language_knows').val('');
- $('#id_1-programming_language_knows').prop('required',false);
- }
- // Hide the text field and button initially
- if ($('#id_1-other_bits_prog_flag').val() ==1){
- $('#bits_student_lable_present').show();
- $('#id_1-present_bits_student_id').prop('required',true);
- }
- else {
- $('#id_1-present_bits_student_id').prop('required',false);
- $("#bits_student_lable_present").hide();
- }
- // Show the text field and button when the user selects "Yes" in the dropdown
- $("#id_1-other_bits_prog_flag").change(function() {
- if ($(this).val() == "1") {
- $("#bits_student_lable_present").show();
- $('#id_1-present_bits_student_id').prop('required',true);
- } else {
- $("#bits_student_lable_present").hide();
- InvalidPbsi(document.getElementById('id_1-present_bits_student_id'))
- $('#id_1-present_bits_student_id').val('');
- $('#id_1-present_bits_student_id').prop('required',false);
- }
- });
- // For Parallel studies
- if ($("#id_1-parallel_studies_flag").val() ==1){
- $("#parallel_studies_uni").show();
- $("#parallel_studies_uni1").show();
- $('#id_1-other_uni_name').prop('required',true);
- $('#id_1-other_uni_prog').prop('required',true);
- $('#id_1-pass_year_month').prop('required',true);
- }
- else {
- $("#parallel_studies_uni").hide();
- $("#parallel_studies_uni1").hide();
- $('#id_1-other_uni_name').prop('required',false);
- $('#id_1-other_uni_prog').prop('required',false);
- $('#id_1-pass_year_month').prop('required',false);
- }
- // Show the text field and button when the user selects "Yes" in the dropdown
- $("#id_1-parallel_studies_flag").change(function() {
- if ($(this).val() == "1") {
- $("#parallel_studies_uni").show();
- $("#parallel_studies_uni1").show();
- $('#id_1-other_uni_name').prop('required',true);
- $('#id_1-other_uni_prog').prop('required',true);
- $('#id_1-pass_year_month').prop('required',true);
- } else {
- $("#parallel_studies_uni").hide();
- $("#parallel_studies_uni1").hide();
- InvalidPym(document.getElementById('id_1-pass_year_month'))
- InvalidOun(document.getElementById('id_1-other_uni_name'))
- InvalidOup(document.getElementById('id_1-other_uni_prog'))
- $('#id_1-other_uni_name').val('');
- $('#id_1-other_uni_prog').val('');
- $('#id_1-pass_year_month').val('');
- $('#id_1-other_uni_prog').prop('required',false);
- $('#id_1-pass_year_month').prop('required',false);
- $('#id_1-other_uni_name').prop('required',false);
- }
- });
- // check cgpa
- if ($('#cgpa').is(":checked")){
- $("#cpgaContainer").show();
- $('#id_1-cpga_outoff').prop('required',true);
- $('#id_1-percentage_marks_cgpa').attr('placeholder', 'CGPA');
- }
- else {
- $("#cpgaContainer").hide();
- $('#id_1-cpga_outoff').prop('required',false);
- $('#id_1-percentage_marks_cgpa').attr('placeholder', 'Percentage');
- }
- $('input[name="marksOrCgpa"]').change(function () {
- if ($(this).val() === 'cgpa') {
- $('#cpgaContainer').show();
- $('#id_1-cpga_outoff').prop('required', true);
- $('#id_1-percentage_marks_cgpa').val('');
- $('#id_1-percentage_marks_cgpa').attr('placeholder', 'CGPA');
- } else {
- $('#cpgaContainer').hide();
- $('#id_1-percentage_marks_cgpa').val('');
- $('#id_1-cpga_outoff').val('');
- $('#id_1-cpga_outoff').prop('required', false);
- $('#id_1-percentage_marks_cgpa').attr('placeholder', 'Percentage');
- }
- });
- //document.getElementById("id_4-program").readOnly = true;
- });
- // Date of Birth validation
- $(document).ready(function() {
- let currentDate = new Date().toISOString().split('T')[0];
- $('#id_0-date_of_birth').attr('max', currentDate);
- $('#id_0-date_of_birth').on('blur', function() {
- let dateOfBirth = $(this).val();
- let errorSpanId = 'dobError';
- if (dateOfBirth) {
- let today = new Date();
- let selectedDate = new Date(dateOfBirth);
- let age = today.getFullYear() - selectedDate.getFullYear() - ((today.getMonth() < selectedDate.getMonth() || (today.getMonth() === selectedDate.getMonth() && today.getDate() < selectedDate.getDate())) ? 1 : 0);
- if (age < 17) {
- updateDobErrorMessage('Minimum age should be 17 years.', errorSpanId);
- $(this).val('');
- }
- else{
- updateDobErrorMessage('', errorSpanId);
- }
- }
- });
- function updateDobErrorMessage(message, errorSpanId) {
- $('#' + errorSpanId).text(message);
- }
- });
- </script>
- <style>
- body {
- background: #EEEEEE;
- }
- .logo-row {
- margin: 0 auto;
- padding: 20px;
- text-align: center;
- max-width: 500px;
- }
- .logo {
- max-width: 100%;
- text-align: center;
- margin-left: -5px;
- }
- .menu-top {
- background: #74c3e8c9 ;
- /* height: 48px; */
- line-height: 48px;
- color: #211D70;
- border-top: 2px solid #FFF;
- border-bottom: 2px solid #FFF;
- }
- .menu-top .title {
- padding-left: 20px;
- font-size: 18px;
- font-weight: bold;
- line-height: 48px;
- height: 48px;
- }
- .menu-top .title span {
- display: inline-block;
- vertical-align: middle;
- line-height: normal;
- }
- .menu-top .links {
- display: inline-block;
- text-align: right;
- vertical-align: middle;
- }
- .menu-top .links a {
- color: #211D70;
- text-align: center;
- text-decoration: none;
- font-size: 12px;
- padding: 4px;
- }
- .row.menu-top-container a:after {
- content: "";
- background: #211D70;
- position: absolute;
- bottom: 4px;
- height: 40%;
- width: 1px;
- margin: 10px 4px;
- }
- .menu-top .links a:last-child:after {
- background: none;
- }
- .title-h2 {
- color: #211D70;
- font-size: 18px;
- font-weight: 800;
- padding: 10px 0px 20px 0px;
- }
- .title-h1 {
- color: #211D70;
- font-size: 16px;
- font-weight: 600;
- padding: 10px 0px 20px 0px;
- }
- .outer-cf {
- padding: 4px 10px ;
- }
- .inner-cf {
- border-radius: 18px;
- }
- .vertical-navbar {
- border-right: 2px dashed #EEE;
- color: #211D70;
- font-size: 14px;
- padding: 10px;
- }
- form {
- padding: 10px;
- }
- #list-unstyled {
- overflow: hidden;
- counter-reset: step;
- }
- #list-unstyled li {
- list-style-type: none;
- position: relative;
- width: 100%;
- padding: 8px 0px 40px 30px;
- }
- #list-unstyled li:before {
- /*
- content: counter(step);
- counter-increment: step;
- width: 24px;
- height: 24px;
- line-height: 24px;
- display: block;
- font-size: 12px;
- color: white;
- background: #211D70;
- border-radius: 25px;
- */
- content: counter(step);
- counter-increment: step;
- height: 24px;
- width: 24px;
- line-height: 20px;
- border: 1px solid blue;
- border-radius: 50%;
- color: white;
- text-align: center;
- position: absolute;
- background: #211D70;
- left: 0;
- top: 4px;
- }
- #list-unstyled li:after {
- content: '';
- width: 100%;
- height: 2px;
- background: white;
- position: absolute;
- left: -50%;
- top: 9px;
- z-index: -1; /*put it behind the numbers*/
- }
- /*
- #list-unstyled {
- counter-reset: step;
- list-style-type: none;
- font-size: 14px;
- line-height: 48px;
- padding-left: 10px;
- overflow: hidden;
- }
- ul#list-unstyled li {
- position: relative;
- padding: 5px 0 5px 30px;
- line-height: 20px;
- }
- ul#list-unstyled li:before {
- content: counter(step);
- counter-increment: step;
- height: 20px;
- width: 20px;
- border: 1px solid blue;
- border-radius: 50%;
- color: red;
- text-align: center;
- position: absolute;
- left: 0;
- top: 4px;
- }
- */
- .footer {
- padding: 20px;
- }
- .btn-close {
- cursor: pointer;
- }
- .ui-datepicker-calendar {
- display: none;
- }
- /* .table tbody tr:last-child td:first-child {
- border-bottom-left-radius: 10px;
- }
- .table tbody tr:last-child td:last-child {
- border-bottom-right-radius: 10px;
- } */
- .table tbody tr {
- border-bottom: white ;
- }
- .table {
- box-shadow: 0 0 1px rgba(0, 0, 0, 0.3);
- }
- .errorSpan{
- font-size: 12px;
- }
- {% if wizard.steps.current == '7' %}
- .accordion-button:not(.collapsed)::after {
- display: none !important;
- }
- {% endif %}
- </style>
- </head>
- <body>
- <div class="header row">
- <div class="logo-row">
- <img src="{% static 'assets/images/BIts_Logo-01.png' %}" alt="logo" class="logo">
- </div>
- </div>
- <div class="menu-top row">
- <div class="row menu-top-container">
- <div class="col-sm-12 col-md-6 col-lg-3 title">
- <span> Application Center</span>
- </div>
- <div class="col-sm-12 col-md-6 col-lg-9 links">
- <a href="#"> How To Apply </a> <a href="{% url 'auth_logout'%}"> Log Out </a>
- </div>
- </div>
- </div>
- {% if not escalated_to_superreviewer %}
- <div class="content-container container-fluid outer-cf">
- <div id="toastContainer" class="toast-container"></div>
- <h2 class="text-center title-h2">
- <label class="title-h1">PROGRAM :</label> {{ pg_name }}
- {% if pg_not_active %}
- <p class="text-center fs-4 fw-normal text-danger">Warning: New application submissions for this program will not be allowed.</p>
- {% endif %}
- </h2>
- <div class="container-fluid inner-cf wizard">
- <div class="row">
- <div class="col-sm-6 col-md-4 col-lg-3 vertical-navbar">
- <form method='post' enctype="multipart/form-data">
- {% csrf_token %}
- <ul class="list-unstyled1 ">
- <li class=" {% if resubmit_check == 'NotAllowed'%} custom-list-item-not {% else%} custom-list-item {% endif %} {% if wizard.steps.current == '0' %} focus {% else %} {% if 0 <= completed_steps %} complete {% endif %} {% endif %} " {% if 0 <= completed_steps and resubmit_check == 'Allow' %} onclick="gotoStep('0')" {% endif %}> Personal Details </li>
- <div class="li-vline"></div>
- <li class="{% if resubmit_check == 'NotAllowed'%} custom-list-item-not {% else %}custom-list-item {% endif %} {% if wizard.steps.current == '1' %} focus {% else %} {% if 1 <= completed_steps %} complete {% endif %} {% endif %}" {% if 0 <= completed_steps and resubmit_check == 'Allow' %} onclick="gotoStep('1')" {% endif %}> Education Details </li>
- <div class="li-vline"></div>
- {% if WithoutExperience %}
- <li class=" {% if resubmit_check == 'NotAllowed'%} custom-list-item-not {% else %}custom-list-item {% endif %} {% if wizard.steps.current == '2' %} focus {% else %} {% if 2 <= completed_steps %} complete {% endif %} {% endif %}" {% if 1 <= completed_steps and resubmit_check == 'Allow' %} onclick="gotoStep('2')" {% endif %}> Employment Details </li>
- <div class="li-vline"></div>
- {% endif %}
- {% if UndertakingFormNav %}
- <li class="{% if resubmit_check == 'NotAllowed'%} custom-list-item-not {% else %}custom-list-item {% endif %} {% if wizard.steps.current == '3' %} focus {% else %} {% if 3 <= completed_steps %} complete {% endif %} {% endif %}" {% if 2 <= completed_steps and resubmit_check == 'Allow' %} onclick="gotoStep('3')" {% endif %}> Technical Competency </li>
- <div class="li-vline"></div>
- {% endif %}
- <li class="{% if resubmit_check == 'NotAllowed'%} custom-list-item-not {% else %}custom-list-item {% endif %} {% if wizard.steps.current == '4' %} focus {% else %} {% if 4 <= completed_steps %} complete {% endif %} {% endif %}" {% if 3 <= completed_steps and resubmit_check == 'Allow' %} onclick="gotoStep('4')" {% endif %}> Application Fee </li>
- <div class="li-vline"></div>
- {% if MentorEmpolyerFormNav %}
- <li class="{% if resubmit_consent_check %} custom-list-item {% else %} custom-list-item-not {% endif %} {% if wizard.steps.current == '5' %} focus {% else %} {% if 5 <= completed_steps %} complete {% endif %} {% endif %}" {% if 4 <= completed_steps and resubmit_consent_check %} onclick="gotoStep('5')" {% endif %}> Mentor and Employer Consent</li>
- <div class="li-vline"></div>
- {% endif %}
- <li class="custom-list-item {% if wizard.steps.current == '6' %} focus {% else %} {% if 6 <= completed_steps %} complete {% endif %} {% endif %}" {% if 5 <= completed_steps %} onclick="gotoStep('6')" {% endif %}> Review Application</li>
- <div class="li-vline"></div>
- <li class="custom-list-item {% if wizard.steps.current == '7' %} focus {% else %} {% if 7 <= completed_steps %} complete {% endif %} {% endif %}" {% if 6 <= completed_steps %} onclick="gotoStep('7')" {% endif %}> Upload Documents </li>
- </ul>
- <input type="hidden" name="gotoStepNav" id="gotoStepNav" value="">
- </form>
- </div>
- <div class="col-sm-6 col-md-8 col-lg-9">
- <div class="content">
- <form action="" method="post" enctype="multipart/form-data">
- {% csrf_token %}
- {{ wizard.management_form }}
- {% if wizard.steps.current == '0' %}
- {% include 'wizardSteps/step_0_personal_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '1' %}
- {% include 'wizardSteps/step_1_education_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '2' %}
- {% include 'wizardSteps/step_2_employment_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '3' %}
- {% include 'wizardSteps/step_3_technical_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '4' %}
- {% include 'wizardSteps/step_4_app_fee_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '5' %}
- {% include 'wizardSteps/step_5_consent_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '6' %}
- {% include 'wizardSteps/step_6_review_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '7' %}
- {% include 'wizardSteps/step_7_upload_form.html' %}
- {% endif %}
- {% if wizard.steps.current == '4' %}
- <div class="button-container d-flex justify-content-end align-items-end">
- <div>
- <input class="btn btn-rounded btn-primary btn-next" type="submit" value="Next" />
- </div>
- </div>
- {% elif wizard.steps.current != '7' %}
- <div class="button-container d-flex justify-content-end align-items-end">
- <div>
- <input class="btn btn-rounded btn-primary btn-next" type="submit" value="Save & Next" />
- </div>
- </div>
- {% endif %}
- </form>
- </div>
- </div>
- </div>
- </div>
- </div>
- <input type="hidden" id="resubmit_check" value="{{resubmit_check}}">
- <div class="footer">
- © 2023 BITS Pilani | Contact us : [email protected]
- </div>
- {% else %}
- <br>
- <p class="text-center fs-3 fw-normal text-danger">Application under review by higher authorities.</p>
- {% endif %}
- <!-- popup for education and employment -->
- {% include 'wizardSteps/edu_emp_popup_form.html' %}
- <div id="dialog" class="ui-widget" style="display: none;">
- </div>
- <!-- popup for resubmit check -->
- <div class="modal fade" id="resubmitmodal" data-bs-backdrop="static" data-bs-keyboard="false" tabindex="-1" aria-labelledby="staticBackdropLabel" aria-hidden="true">
- <div class="modal-dialog modal-dialog-centered">
- <div class="modal-content">
- <div class="modal-header">
- <h5 class="modal-title text-center fw-bold fs-4" id="exampleModalLabel">Resubmit Documents</h5>
- </div>
- <div class="modal-body text-center fw-4">
- You are not allowed to edit this page.
- </div>
- <div class="modal-footer">
- <button type="button" class="btn btn-danger" data-bs-dismiss="modal">Close</button>
- </div>
- </div>
- </div>
- </div>
- <script src="https://code.jquery.com/jquery-3.5.1.slim.min.js" integrity="sha384-DfXdz2htPH0lsSSs5nCTpuj/zy4C+OGpamoFVy38MVBnE+IbbVYUew+OrCXaRkfj" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js"></script>
- <script src="https://code.jquery.com/jquery-3.6.4.min.js"></script>
- <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0/css/all.min.css" integrity="sha384-3B6NwesSXE7YJlcLI9RpRqGf2p/EgVH8BgoKTaUrmKNDkHPStTQ3EyoYjCGXaOTS" crossorigin="anonymous">
- <script src="https://code.jquery.com/ui/1.12.1/jquery-ui.js"></script>
- <script>
- $(document).ready(function() {
- function initializeCropper(fileInputId) {
- var $image = $("#image");
- var cropBoxData;
- var canvasData;
- $("#modalCrop").on("shown.bs.modal", function () {
- $image.cropper({
- viewMode: 1,
- aspectRatio: null,
- cropBoxResizable: true,
- zoomable: true,
- zoomOnWheel: true,
- });
- }).on("hidden.bs.modal", function () {
- cropBoxData = $image.cropper("getCropBoxData");
- canvasData = $image.cropper("getCanvasData");
- $image.cropper("destroy");
- }).on("hide.bs.modal", function () {
- if (!$('#' + fileInputId).val()) {
- $('#' + fileInputId).val("");
- }
- });
- $(".js-zoom-in").click(function () {
- $image.cropper("zoom", 0.1);
- });
- $(".js-zoom-out").click(function () {
- $image.cropper("zoom", -0.1);
- });
- $(".js-rotate-c").click(function () {
- $image.cropper("rotate", 90);
- });
- $(".js-rotate-ac").click(function () {
- $image.cropper("rotate", -90);
- });
- $(".js-crop-and-upload").click(function () {
- var cropData = $image.cropper("getData");
- if (fileInputId === "id_6-photo_file") {
- $('#id_6-x').val(cropData["x"]);
- $('#id_6-y').val(cropData["y"]);
- $('#id_6-height').val(cropData["height"]);
- $('#id_6-width').val(cropData["width"]);
- $('#id_6-rotate').val(cropData["rotate"]);
- } else if (fileInputId === "id_6-signature_file") {
- $('#id_6-x2').val(cropData["x"]);
- $('#id_6-y2').val(cropData["y"]);
- $('#id_6-height2').val(cropData["height"]);
- $('#id_6-width2').val(cropData["width"]);
- $('#id_6-rotate2').val(cropData["rotate"]);
- }
- $("#modalCrop").modal("hide");
- });
- $(".crop_close").click(function () {
- if (fileInputId === "id_6-photo_file") {
- $('#id_6-x').val('');
- $('#id_6-y').val('');
- $('#id_6-height').val('');
- $('#id_6-width').val('');
- $('#id_6-rotate').val('');
- } else if (fileInputId === "id_6-signature_file") {
- $('#id_6-x2').val('');
- $('#id_6-y2').val('');
- $('#id_6-height2').val('');
- $('#id_6-width2').val('');
- $('#id_6-rotate2').val('');
- }
- });
- }
- $('#id_6-photo_file').change(function () {
- if (this.files && this.files[0]) {
- var reader = new FileReader();
- reader.onload = function (e) {
- $("#image").attr("src", e.target.result);
- $("#modalCrop").modal("show");
- }
- reader.readAsDataURL(this.files[0]);
- initializeCropper("id_6-photo_file");
- }
- });
- $('#id_6-signature_file').change(function () {
- if (this.files && this.files[0]) {
- var reader = new FileReader();
- reader.onload = function (e) {
- $("#image").attr("src", e.target.result);
- $("#modalCrop").modal("show");
- }
- reader.readAsDataURL(this.files[0]);
- initializeCropper("id_6-signature_file");
- }
- });
- $("#id_1-pass_year_month").datepicker({
- dateFormat: "M yy",
- changeMonth: true,
- changeYear: true,
- showButtonPanel: true,
- defaultDate: new Date(),
- minDate: 0,
- onClose: function(dateText, inst) {
- var month = $("#ui-datepicker-div .ui-datepicker-month :selected").val();
- var year = $("#ui-datepicker-div .ui-datepicker-year :selected").val();
- $(this).datepicker('setDate', new Date(year, month, 1));
- }
- });
- $('#id_5-mentor_phone').on('focusout', function () {
- validatePhoneNumber($(this).val(), 'mentor');
- });
- $('#id_5-hr_phone').on('focusout', function () {
- validatePhoneNumber($(this).val(),'hr');
- });
- $('#id_5-mentor_email').on('focusout', function () {
- validateEmail($(this).val(), 'mentor');
- });
- $('#id_5-hr_email').on('focusout', function () {
- validateEmail($(this).val(),'hr');
- });
- let date = new Date();
- let month = (date.getMonth() + 1).toString().padStart(2, '0');
- let day = date.getDate().toString().padStart(2, '0');
- let currentDate = `${date.getFullYear()}-${month}-${day}`;
- $('#id_2-current_org_employment_date').attr('max', currentDate);
- // certification popup
- {% if show_greeting_msg %}
- {% include 'certificate/greeting_style.html' %}
- {% endif %}
- });
- </script>
- <script>
- function showToast(message, type) {
- const toastElement = document.createElement('div');
- toastElement.className = `toast toast-error container`;
- toastElement.innerHTML = `
- <div class="row">
- <div class="col-auto" style="margin-left: auto; display: flex; justify-content: center;">
- <div class="close-btn" onclick="closeToast(this)">
- <i class="fas fa-times"></i>
- </div>
- </div>
- </div>
- <div class="row">
- <div class="col">${message}</div>
- </div>
- <br>
- <div class="loading-line"></div>
- `;
- document.getElementById(type).appendChild(toastElement);
- setTimeout(() => {
- toastElement.classList.add('show');
- }, 10);
- setTimeout(() => {
- toastElement.classList.remove('show');
- setTimeout(() => {
- toastElement.remove();
- }, 500);
- }, 5000);
- }
- function closeToast(button) {
- const toast = button.closest('.toast');
- toast.classList.remove('show');
- setTimeout(() => {
- toast.remove();
- }, 500);
- }
- function gotoStep(step) {
- if ($('#resubmit_check').val() === 'NotAllowed' && ['0', '1', '2', '3', '4'].includes(step)) {
- $("#resubmitmodal").modal("show");
- return false;
- }
- let gotoStepNav = document.getElementById('gotoStepNav');
- let confirmed = window.confirm('You have unsaved changes. Are you sure you want to go to the next form?');
- if(confirmed) {
- gotoStepNav.value = step;
- gotoStepNav.form.submit();
- }
- }
- // Custom Validation For Educational Page
- function InvalidPlk(textbox) {
- flag = $('#id_1-programming_flag').val();
- if( textbox.value === "" && flag === 'True' ){
- textbox.setCustomValidity('Please Enter Programming Language');
- } else {
- textbox.setCustomValidity('');
- }
- return true;
- }
- function InvalidBsi(textbox) {
- flag = $('#id_1-prior_student_flag').val();
- if( textbox.value === "" && flag === '1' ){
- textbox.setCustomValidity('Please Enter BITS ID Number (if past student) ');
- } else {
- textbox.setCustomValidity('');
- }
- return true;
- }
- function InvalidPbsi(textbox) {
- flag = $('#id_1-other_bits_prog_flag').val();
- if( textbox.value === "" && flag === '1' ){
- textbox.setCustomValidity('Please Enter BITS ID Number (if present student)');
- } else {
- textbox.setCustomValidity('');
- }
- return true;
- }
- function InvalidPym(textbox) {
- flag = $('#id_1-parallel_studies_flag').val();
- if( textbox.value === "" && flag === '1' ){
- textbox.setCustomValidity('Please Enter Passing year and month');
- } else {
- textbox.setCustomValidity('');
- }
- return true;
- }
- function InvalidOun(textbox) {
- flag = $('#id_1-parallel_studies_flag').val();
- if( textbox.value === "" && flag === '1' ){
- textbox.setCustomValidity('Please Enter Name of the University (if currently enrolled in any other university or college)');
- } else {
- textbox.setCustomValidity('');
- }
- return true;
- }
- function InvalidOup(textbox) {
- flag = $('#id_1-parallel_studies_flag').val();
- if( textbox.value === "" && flag === '1' ){
- textbox.setCustomValidity('Please Enter Programme Name (if currently enrolled in any other university or college)');
- } else {
- textbox.setCustomValidity('');
- }
- return true;
- }
- // contact number validations
- function validatePersonalPhoneNumber(phone1Value, phone0Selector, errorSpanId) {
- var phoneRegex = /^\+?[\d\s\-()+]{10}$/;
- var phone0Value = $(phone0Selector).val();
- if (phone0Value === '+91' && !phoneRegex.test(phone1Value.val())) {
- updateErrorMessageContact('Please enter 10 digit number.', errorSpanId);
- phone1Value.val('');
- return false;
- }else {
- updateErrorMessageContact('', errorSpanId);
- }
- var phoneValue = $('#id_0-phone_1').val().trim();
- var mobileValue = $('#id_0-mobile_1').val().trim();
- if (phoneValue.trim() !== '' && mobileValue.trim() !== '' && phoneValue === mobileValue) {
- updateErrorMessageContact('Primary and Alternate number cannot be the same.', errorSpanId);
- phone1Value.val('');
- return false;
- } else {
- updateErrorMessageContact('', errorSpanId);
- }
- }
- $('#id_0-phone_1').on('focusout', function () {
- validatePersonalPhoneNumber($(this), '#id_0-phone_0', 'primaryError');
- });
- $('#id_0-mobile_1').on('focusout', function () {
- validatePersonalPhoneNumber($(this), '#id_0-mobile_0', 'alternateError');
- });
- function updateErrorMessageContact(message, spanId) {
- $('#' + spanId).text(message);
- }
- function validatePhoneNumber(phoneNumber,field) {
- var phoneRegex = /^\+?[\d\s\-()+]{10,15}$/;
- if (!phoneRegex.test(phoneNumber)) {
- showToast('Please enter a valid phone number.', 'toastContainer');
- if (field === 'mentor') {
- $('#id_5-mentor_phone').val('');
- $('#id_5-mentor_phone').focus();
- } else {
- $('#id_5-hr_phone').val('');
- $('#id_5-hr_phone').focus();
- }
- }
- }
- function validateEmail(email,field) {
- let isValidEmail = /^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(email);
- if (!isValidEmail) {
- showToast('Please enter a valid email address.', 'toastContainer');
- if (field === 'mentor') {
- $('#id_5-mentor_email').val('');
- $('#id_5-mentor_email').focus();
- } else {
- $('#id_5-hr_email').val('');
- $('#id_5-hr_email').focus();
- }
- }
- }
- $('#id_1-qual_cat option[value=""]').text('Choose Qualification Level');
- // validations for education and employment popups
- $('#id_2-start_date').attr('max', $('#id_2-current_org_employment_date').val())
- $('#id_2-end_date').attr('max', $('#id_2-current_org_employment_date').val())
- function updateMinDate() {
- let joinDate = $('#id_2-current_org_employment_date');
- let dojErr = document.getElementById('dojErr');
- $.ajax({
- type: "GET",
- url: "{% url 'registrationForm:join-date-ajax'%}",
- data: { 'joining_date': joinDate.val() },
- cache: false,
- success: function (data) {
- if(data.value){
- dojErr.textContent = "Employment starts 10 years post-birth";
- dojErr.style.display = 'block';
- joinDate.val('');
- } else {
- dojErr.style.display = 'none';
- $('#id_2-start_date').attr('max', $('#id_2-current_org_employment_date').val())
- $('#id_2-end_date').attr('max', $('#id_2-current_org_employment_date').val())
- }
- }
- });
- }
- function dates() {
- let currentDate = new Date($('#id_2-current_org_employment_date').val());
- let startDate = new Date($('#id_2-start_date').val());
- let endDate = new Date($('#id_2-end_date').val());
- return [currentDate, startDate, endDate];
- }
- function calculateDaysDifference(startDate, endDate) {
- let timeDifference = endDate - startDate;
- return Math.floor(timeDifference / (1000 * 60 * 60 * 24));
- }
- function updateStartDate() {
- $('#id_2-end_date').attr('min', $('#id_2-start_date').val());
- }
- function cgpaValidate(element) {
- let val = parseInt(element.value, 10);
- let eduErrRow = document.getElementById('eduErrRow');
- let eduErr = document.getElementById('eduErr');
- if (isNaN(val) || val < 0 || val > 10 || val % 1 !== 0) {
- eduErr.textContent = "Please enter a valid CGPA between 0 and 10";
- eduErrRow.style.display = 'block';
- element.value = '';
- element.focus();
- } else {
- eduErrRow.style.display = 'none';
- }
- }
- $("#id_1-other_degree").hide();
- $("#id_1-other_discipline").hide();
- function expFieldsRefresh() {
- $("#id_2-organization").val('');
- $("#id_2-designations").val('');
- $("#id_2-start_date").val('');
- $("#id_2-end_date").val('');
- $("#edit_rows_exp").val('')
- $("#save_rec_exp").attr('name', 'Save');
- }
- function eduFieldsRefresh() {
- $("#id_1-qual_cat").val('');
- $("#id_1-degree").val('');
- $("#id_1-school_college").val('');
- $("#id_1-discipline").val('');
- $("#id_1-start_year").val('');
- $("#id_1-completion_year").val('');
- $("#percentMarks").prop('checked', true);
- $("#id_1-other_discipline").attr("type","hidden");
- $("#id_1-other_discipline").attr("required","false");
- $("#id_1-other_discipline").val('');
- $("#id_1-other_degree").attr("type","hidden");
- $("#id_1-other_degree").attr("required","false");
- $("#id_1-other_degree").val('');
- $('#id_1-cpga_outoff').prop('required',false);
- $('#cpgaContainer').hide();
- $('#id_1-percentage_marks_cgpa').val('');
- $('#id_1-cpga_outoff').val('');
- $('#id_1-percentage_marks_cgpa').attr('placeholder', 'Percentage');
- $("#edit_rows").val('')
- $("#save_rec").attr('name', 'Save');
- }
- function updatePopupHeader() {
- $("#exampleModalLabel").text("Add Qualification");
- $("#exampleModalLabel1").text("Add Employment Details");
- }
- function QualCategory() {
- let select_id = $("#id_1-qual_cat").val();
- let qualName = $('#id_1-degree')
- let disc = $('#id_1-discipline')
- // Clear values related to the selection
- $("#id_1-degree").val('');
- let select_input = $("#id_1-other_degree");
- select_input.attr("type", "hidden");
- select_input.removeAttr("required");
- select_input.val('');
- qualName.prop('disabled', false);
- qualName.val('');
- disc.prop('disabled', false);
- disc.val('');
- if (select_id == '1') {
- qualName.val('10th Grade (Matriculation)')
- qualName.prop('disabled', true);
- disc.val('10th MATRICULATION')
- disc.prop('disabled', true);
- }
- $.ajax({
- type: "GET",
- url: "{% url 'registrationForm:qual-category-ajax'%}",
- data: { 'select_id': select_id },
- cache: false,
- success: function (data) {
- autocompleteDataInds = data['degree']
- },
- });
- }
- function ListOfDiscipline() {
- let qualName = $('#id_1-degree').val();
- if (qualName) {
- $.ajax({
- type: "GET",
- url: "{% url 'registrationForm:qual-discipline-ajax'%}",
- data: { 'qualName': qualName },
- cache: false,
- success: function (data) {
- autocompleteData = data['disciplines']
- },
- });
- }
- }
- function OtherBox(selectBox){
- let select_id = $("#"+selectBox.id ).val();
- let select_input= selectBox.id === 'id_1-discipline' ? $("#id_1-other_discipline") : $("#id_1-other_degree");
- if (select_id == "Others"){
- select_input.attr("type", "text");
- select_input.show();
- select_input.attr("required","true");
- }
- else{
- select_input.attr("type","hidden");
- select_input.removeAttr("required");
- select_input.val('');
- }
- }
- function saveRec(event) {
- event.preventDefault();
- let quaLevel = $("#id_1-qual_cat").val();
- let quaName = $("#id_1-degree").val();
- let board = $("#id_1-school_college").val();
- let quaDisc = $("#id_1-discipline").val();
- let startYear = $("#id_1-start_year").val();
- let endYear = $("#id_1-completion_year").val();
- let percentage = $("#id_1-percentage_marks_cgpa").val();
- let outoff = $("#id_1-cpga_outoff").val();
- let percentMarks = $("#percentMarks").is(":checked")
- let cgpa = $('#cgpa').is(":checked")
- let other_degree = $("#id_1-other_degree").val();
- let other_discipline = $("#id_1-other_discipline").val();
- let csrfToken = "{{ csrf_token }}";
- if (quaLevel == '1') {
- qualName = '10th Grade (Matriculation)'
- quaDisc = '10th MATRICULATION';
- }
- let eduErrRow = document.getElementById('eduErrRow');
- let eduErr = document.getElementById('eduErr');
- if (!quaLevel || !quaName || !board || !quaDisc || !startYear || !endYear || !percentage) {
- eduErr.textContent = "Please fill in all required fields";
- eduErrRow.style.display = 'block';
- }else {
- let val = false;
- if (cgpa) {
- if (outoff) {
- if (parseInt(outoff) < parseFloat(percentage)) {
- eduErr.textContent = "CGPA is Greater than Out of";
- eduErrRow.style.display = 'block';
- return false;
- }
- }
- }
- if (percentMarks) {
- if (100 < parseFloat(percentage)) {
- eduErr.textContent = "Percentage should less than or equal to 100";
- eduErrRow.style.display = 'block';
- return false;
- }
- }
- if ($("#id_1-degree" ).val() === "Others") {
- if (!other_degree) {
- val = true;
- }
- }
- if ($("#id_1-discipline" ).val() === "Others") {
- if (!other_discipline) {
- val = true;
- }
- }
- if (cgpa) {
- if (!outoff) {
- val = true;
- }
- }
- if (val) {
- eduErr.textContent = "Please fill in all required fields";
- eduErrRow.style.display = 'block';
- }else {
- let param = {
- "quaLevel": quaLevel,
- "quaName": quaName,
- "board": board,
- "quaDisc": quaDisc,
- "startYear": startYear,
- "endYear": endYear,
- "percentage": percentage,
- "outoff": outoff,
- "percentMarks": percentMarks,
- "cgpa": cgpa,
- "other_degree":other_degree,
- "other_discipline":other_discipline,
- "name":$(event.currentTarget).attr('name'),
- "id": $("#edit_rows").val(),
- };
- $.ajax({
- url: "{% url 'registrationForm:add_or_edit_qualification' %}",
- contentType: "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify(param),
- success: function (data) {
- if (data.id) {
- tbody = $("#edu_tbody");
- newRow = $("<tr id='edu"+data.id+"'>");
- cell1 = $("<td>").text(data.quaLevel);
- cell2 = data.quaName === 'Others' ? $("<td>").text(data.other_degree) : $("<td>").text(data.quaName);
- cell3 = $("<td>").text(data.board);
- cell4 = data.quaDisc === 'Others' ? $("<td>").text(data.other_discipline) : $("<td>").text(data.quaDisc);
- cell5 = $("<td>").text(data.startYear);
- cell6 = $("<td>").text(data.endYear);
- cell7 = data.outoff ? $("<td>").text(data.percentage +'/'+ data.outoff) : $("<td>").text(data.percentage);
- cell8 = $("<td>").html('<i class="fas fa-edit fa-lg" data-id="'+ data.id +'" onclick="scqEdit(event)"></i>');
- cell9 = $("<td>").html('<i class="fa-regular fa-trash-can fa-lg" aria-hidden="true" data-id="'+ data.id +'" onclick="scqDel(event)"></i>');
- newRow.append(cell1, cell2, cell3, cell4, cell5, cell6, cell7, cell8, cell9);
- tbody.append(newRow);
- } else {
- let rowToUpdate = $('#edu' + $("#edit_rows").val());
- rowToUpdate.find('td:eq(0)').text(data.quaLevel);
- rowToUpdate.find('td:eq(1)').text(data.quaName === 'Others' ? data.other_degree : data.quaName);
- rowToUpdate.find('td:eq(2)').text(data.board);
- rowToUpdate.find('td:eq(3)').text(data.quaDisc === 'Others' ? data.other_discipline: data.quaDisc);
- rowToUpdate.find('td:eq(4)').text(data.startYear);
- rowToUpdate.find('td:eq(5)').text(data.endYear);
- rowToUpdate.find('td:eq(6)').text(data.outoff ? data.percentage +'/'+ data.outoff : data.percentage);
- }
- eduFieldsRefresh()
- $("#staticBackdrop").modal("hide");
- },
- error: function (xhr, status, error) {
- console.error("AJAX request failed. Status:", status, "Error:", error);
- }
- });
- }
- }
- }
- function saveExpRec(event) {
- event.preventDefault();
- let org = $("#id_2-organization").val();
- let desc = $("#id_2-designations").val();
- let startDate = $("#id_2-start_date").val();
- let endDate = $("#id_2-end_date").val();
- let csrfToken = "{{ csrf_token }}";
- let empErr = document.getElementById('empErr');
- let empErrRow = document.getElementById('empErrRow');
- if (!org || !desc || !startDate || !endDate) {
- empErr.textContent = "Please fill in all required fields";
- empErrRow.style.display = 'block';
- } else {
- const [currentDate, start_date, end_date] = dates();
- let daysCount = calculateDaysDifference(start_date, end_date);
- if (start_date > currentDate) {
- empErr.textContent = "Invalid date sequence: Start date > Date of Joining Current Organization";
- empErrRow.style.display = 'block';
- return false;
- } else if (end_date > currentDate) {
- empErr.textContent = "Invalid date sequence: End date > Date of Joining Current Organization";
- empErrRow.style.display = 'block';
- return false;
- } else if (start_date > end_date) {
- empErr.textContent = "Invalid date sequence: Start date > End Date";
- empErrRow.style.display = 'block';
- return false;
- } else if (daysCount < 15) {
- empErr.textContent = "Work Experience should not less than 15 days.";
- empErrRow.style.display = 'block';
- return false;
- } else {
- empErrRow.style.display = 'none';
- }
- let param = {
- "organization": org,
- "designations": desc,
- "start_date": startDate,
- "end_date": endDate,
- "name": $(event.currentTarget).attr('name'),
- "id": $("#edit_rows_exp").val(),
- };
- $.ajax({
- url: "{% url 'registrationForm:add_or_edit_exp' %}",
- contentType: "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify(param),
- success: function (data) {
- if (data.error) {
- empErr.textContent = data.message;
- empErrRow.style.display = 'block';
- return false;
- } else {
- empErrRow.style.display = 'none';
- }
- if (data.id) {
- tbody = $("#exp_tbody");
- newRow = $("<tr id='exp"+data.id+"'>");
- cell1 = $("<td>").text(data.organization);
- cell2 = $("<td>").text(data.designations);
- cell3 = $("<td>").text(data.start_date);
- cell4 = $("<td>").text(data.end_date);
- cell5 = $("<td>").html('<i class="fas fa-edit fa-lg" data-id="'+ data.id +'" onclick="scweEdit(event)"></i>');
- cell6 = $("<td>").html('<i class="fa-regular fa-trash-can fa-lg" aria-hidden="true" data-id="'+ data.id +'" onclick="scweDel(event)"></i>');
- newRow.append(cell1, cell2, cell3, cell4, cell5, cell6);
- tbody.append(newRow);
- } else {
- let rowToUpdate = $('#exp' + $("#edit_rows_exp").val());
- rowToUpdate.find('td:eq(0)').text(data.organization);
- rowToUpdate.find('td:eq(1)').text(data.designations);
- rowToUpdate.find('td:eq(2)').text(data.start_date);
- rowToUpdate.find('td:eq(3)').text(data.end_date);
- }
- expFieldsRefresh()
- $("#staticBackdrop").modal("hide");
- },
- error: function (xhr, status, error) {
- console.error('AJAX Error:', error);
- }
- });
- }
- }
- function StartEndYear(element) {
- let val = element.id === "id_1-start_year" ? parseInt($("#id_1-completion_year").val()) : parseInt($("#id_1-start_year").val());
- let yearErr = element.id === "id_1-start_year" ? document.getElementById("startYearErr") : document.getElementById("endYearErr")
- let valid = false;
- let msg = "";
- let inputValue = $(element).val();
- let currentDate = new Date();
- let currentYear =currentDate.getFullYear();
- if (inputValue.length !== 4) {
- yearErr.textContent = "Please enter a valid Year";
- yearErr.style.display = 'block';
- $(element).val('');
- $(element).focus();
- return false;
- } else if ( parseInt(inputValue) > currentYear) {
- yearErr.textContent = "Please enter a proper Year";
- yearErr.style.display = 'block';
- $(element).val('');
- $(element).focus();
- return false;
- } else if (element.id === "id_1-start_year") {
- if (val) {
- valid = parseInt(inputValue) > val;
- msg = valid ? "Start Year must be less than End Year" : "";
- }
- } else {
- yearErr.style.display = 'none';
- if (val) {
- valid = parseInt(inputValue) < val;
- msg = valid ? "End Year must be greater than Start Year" : "";
- }
- }
- if (valid) {
- yearErr.textContent = msg;
- yearErr.style.display = 'block';
- $(element).val('');
- $(element).focus();
- return false;
- }
- yearErr.style.display = 'none';
- }
- function scqDel(event) {
- let confirmed = window.confirm('Are you sure you want to delete this item?');
- let csrfToken = "{{ csrf_token }}";
- let itemId = event.currentTarget.dataset.id;
- if (confirmed) {
- $.ajax({
- url: "{% url 'registrationForm:del_qualification' %}",
- contentType: "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify({ 'id': itemId }),
- success: function (data) {
- $('#edu' + itemId).remove();
- }
- });
- }
- }
- function scweDel(event) {
- let confirmed = window.confirm('Are you sure you want to delete this item?');
- let csrfToken = "{{ csrf_token }}";
- let itemId = event.currentTarget.dataset.id;
- if (confirmed) {
- $.ajax({
- url: "{% url 'registrationForm:del_exp' %}",
- contentType: "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify({ 'id': itemId }),
- success: function (data) {
- $('#exp' + itemId).remove();
- }
- });
- }
- }
- function educationPopupCleanup() {
- let eduErrRow = document.getElementById('eduErrRow');
- let degErr = document.getElementById('degErr');
- let dicErr = document.getElementById('dicErr');
- let startYearErr = document.getElementById('startYearErr');
- let endYearErr = document.getElementById('endYearErr');
- eduErrRow.style.display = 'none';
- degErr.style.display = 'none';
- dicErr.style.display = 'none';
- startYearErr.style.display = 'none';
- endYearErr.style.display = 'none';
- }
- function employmentPopupCleanup() {
- let empErrRow = document.getElementById('empErrRow');
- empErrRow.style.display = 'none';
- }
- function openPopUp(element) {
- if (element === 'edu'){
- educationPopupCleanup();
- }
- if (element === 'emp') {
- employmentPopupCleanup()
- }
- updatePopupHeader();
- $("#staticBackdrop").modal("show");
- }
- $('#id_2-current_employment_status').on('change', function() {
- if ($("#id_2-current_employment_status").val() == "2") {
- $("#unemployed").modal("show");
- }
- });
- function employmentCheck(){
- }
- function closePopUp(element) {
- if (element=='emp'){
- expFieldsRefresh()
- } else {
- eduFieldsRefresh()
- }
- $("#staticBackdrop").modal("hide");
- }
- function scweEdit(element) {
- employmentPopupCleanup();
- $("#staticBackdrop").modal("show");
- $("#exampleModalLabel1").text("Edit Employment Details");
- $("#edit_rows_exp").val(event.currentTarget.dataset.id);
- $("#save_rec_exp").attr('name', 'EditAndSave');
- let organization = $("#id_2-organization")
- let designations = $("#id_2-designations")
- let startDate = $("#id_2-start_date")
- let endDate = $("#id_2-end_date")
- let csrfToken = "{{ csrf_token }}";
- $.ajax({
- url: "{% url 'registrationForm:get_exp' %}",
- contentType: "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'GET',
- data: { 'id': event.currentTarget.dataset.id, },
- success: function (data) {
- organization.val(data.organization);
- designations.val(data.designations);
- startDate.val(data.start_date);
- endDate.val(data.end_date);
- }
- });
- }
- function scqEdit(element) {
- educationPopupCleanup();
- $("#staticBackdrop").modal("show");
- $("#exampleModalLabel").text("Edit Qualification");
- $("#edit_rows").val(event.currentTarget.dataset.id);
- $("#save_rec").attr('name', 'EditAndSave');
- let quaLevel = $("#id_1-qual_cat");
- let quaName = $("#id_1-degree");
- let board = $("#id_1-school_college");
- let quaDisc = $("#id_1-discipline");
- let startYear = $("#id_1-start_year");
- let endYear = $("#id_1-completion_year");
- let percentage = $("#id_1-percentage_marks_cgpa");
- let outoff = $("#id_1-cpga_outoff")
- let cgpa = $('#cgpa')
- let other_degree = $("#id_1-other_degree");
- let other_discipline = $("#id_1-other_discipline");
- let csrfToken = "{{ csrf_token }}";
- $.ajax({
- url: "{% url 'registrationForm:get_qualification' %}",
- contentType: "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'GET',
- data: { 'id': event.currentTarget.dataset.id },
- success: function (data) {
- startYear.val(data.startYear);
- endYear.val(data.endYear);
- board.val(data.board);
- quaLevel.val(data.quaLevel);
- QualCategory();
- quaName.val(data.quaName);
- quaDisc.val(data.quaDisc);
- ListOfDiscipline();
- percentage.val(data.percentage);
- if (data.outoff) {
- $("#cpgaContainer").attr("type", "text");
- $("#cpgaContainer").show();
- $('#id_1-cpga_outoff').prop('required',true);
- $('#id_1-percentage_marks_cgpa').attr('placeholder', 'CGPA');
- cgpa.prop('checked', true);
- outoff.val(data.outoff);
- }
- if (data.other_degree) {
- other_degree.attr("type", "text");
- other_degree.show();
- other_degree.attr("required","true");
- other_degree.val(data.other_degree);
- }
- if (data.other_discipline) {
- other_discipline.attr("type", "text");
- other_discipline.show();
- other_discipline.attr("required","true");
- other_discipline.val(data.other_discipline);
- }
- }
- });
- }
- function goBack() {
- let gotoStepInput = document.getElementById('wizard_goto_step');
- if ($('#resubmit_check').val() === 'NotAllowed' && ['0', '1', '2', '3', '4'].includes(gotoStepInput.value)) {
- $("#resubmitmodal").modal("show");
- return false;
- }
- if (gotoStepInput) {
- gotoStepInput.name = 'goto_step';
- gotoStepInput.form.submit();
- }
- }
- function inviteEmployerEmail() {
- let name = $('#id_5-hr_name').val();
- let email = $('#id_5-hr_email').val();
- let phone = $('#id_5-hr_phone').val();
- let csrfToken = "{{ csrf_token }}";
- if(!name || !phone || !email) {
- let errorMessage = 'Please fill in the following fields:<br>';
- if (!name) errorMessage += '- Employer Name<br>';
- if (!email) errorMessage += '- Employer Email<br>';
- if (!phone) errorMessage += '- Employer Phone<br>';
- showToast(errorMessage, 'toastContainer');
- }
- else {
- let param = {"hr_name":name,"hr_email":email,"hr_phone":phone};
- $.ajax({
- url: "{% url 'registrationForm:inviteemployeremail' %}",
- contentType : "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify(param),
- success: function (data) {
- $('#hr_table').show();
- $('#hr_name').text(data.hr_name);
- $('#hr_created_at').text(data.created);
- $('#hr_status').text(data.status);
- $('#hr_signed_time').text(data.sign_at);
- document.getElementById('inviteempemail').style.display = 'none';
- $('#id_5-hr_name').attr('readonly',true);
- $('#id_5-hr_email').attr('readonly',true);
- $('#id_5-hr_phone').attr('readonly',true);
- $('#employer_error').html('');
- }
- });
- }
- }
- function inviteMentorEmail() {
- let name = $('#id_5-mentor_name').val();
- let email = $('#id_5-mentor_email').val();
- let phone = $('#id_5-mentor_phone').val();
- let csrfToken = "{{ csrf_token }}";
- if(!name || !phone || !email) {
- let errorMessage = 'Please fill in the following fields:<br>';
- if (!name) errorMessage += '- Mentor Name<br>';
- if (!email) errorMessage += '- Mentor Email<br>';
- if (!phone) errorMessage += '- Mentor Phone<br>';
- showToast(errorMessage, 'toastContainer');
- }
- else {
- let param = {"mentor_name":name,"mentor_email":email,"mentor_phone":phone};
- $.ajax({
- url: "{% url 'registrationForm:invitementoremail' %}",
- contentType : "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify(param),
- success: function (data) {
- $('#mentor_table').show();
- $('#mentor_name').text(data.mentor_name);
- $('#mentor_created_at').text(data.created);
- $('#mentor_status').text(data.status);
- $('#mentor_signed_time').text(data.sign_at);
- document.getElementById('invitemenemail').style.display = 'none';
- $('#id_5-mentor_name').attr('readonly',true);
- $('#id_5-mentor_email').attr('readonly',true);
- $('#id_5-mentor_phone').attr('readonly',true);
- $('#mentor_error').html('');
- }
- });
- }
- }
- function reSendMail(table){
- let csrfToken = "{{ csrf_token }}";
- let param = {"table_name":table};
- $.ajax({
- url: "{% url 'registrationForm:resendmail' %}",
- contentType : "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify(param),
- success: function (data) {
- alert('Mail sent successfully')
- }
- });
- }
- function disableLink(table){
- let csrfToken = "{{ csrf_token }}";
- let param = {"table_name":table};
- $.ajax({
- url: "{% url 'registrationForm:disablelink' %}",
- contentType : "application/json",
- headers: {
- 'X-CSRFToken': csrfToken
- },
- type: 'POST',
- data: JSON.stringify(param),
- success: function (data) {
- if (table === 'mentor'){
- document.getElementById('mentor_table').style.display = 'none';
- document.getElementById('invitemenemail').style.display = 'block';
- $('#id_5-mentor_name').attr('readonly',false);
- $('#id_5-mentor_email').attr('readonly',false);
- $('#id_5-mentor_phone').attr('readonly',false);
- }
- if (table === 'employer'){
- document.getElementById('hr_table').style.display = 'none';
- document.getElementById('inviteempemail').style.display = 'block';
- $('#id_5-hr_name').attr('readonly',false);
- $('#id_5-hr_email').attr('readonly',false);
- $('#id_5-hr_phone').attr('readonly',false);
- }
- }
- });
- }
- </script>
- <script src="https://cdn.jsdelivr.net/npm/@popperjs/[email protected]/dist/umd/popper.min.js" integrity="sha384-I7E8VVD/ismYTF4hNIPjVp/Zjvgyol6VFvRkX/vR+Vc4jQkC+hVqc2pM8ODewa9r" crossorigin="anonymous"></script>
- <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.bundle.min.js" integrity="sha384-C6RzsynM9kWDrMNeT87bh95OGNyZPhcTNXj1NW7RuBCsyN/o0jlpcV8Qyq46cDfL" crossorigin="anonymous"></script>
- <script src="https://cdnjs.cloudflare.com/ajax/libs/cropper/4.0.0/cropper.min.js" integrity="sha256-QT8oUxSZbywEwAPBgej6iNFH1ephgQV3q2pzjIso5pk=" crossorigin="anonymous"></script>
- </body>
- </html>
[text] qwer
Viewer
*** This page was generated with the meta tag "noindex, nofollow". This happened because you selected this option before saving or the system detected it as spam. This means that this page will never get into the search engines and the search bot will not crawl it. There is nothing to worry about, you can still share it with anyone.
Editor
You can edit this paste and save as new:
File Description
- qwer
- Paste Code
- 28 Mar-2024
- 84.02 Kb
You can Share it: