myProfile Update, Image Upload Student : kdk
This commit is contained in:
parent
169c103fca
commit
65e718eaf0
@ -79,6 +79,7 @@ $route['getEmpBranchDetails'] = 'Employee_Controller/getEmpBranchDetails';
|
||||
$route['updateEmpBranchDetail'] = 'Employee_Controller/updateEmpBranchDetail';
|
||||
$route['updateEmpImgExistDetail'] = 'Employee_Controller/updateEmployeeImage';
|
||||
$route['insertEmployeeImage'] = 'Employee_Controller/addEmployeeImage';
|
||||
$route['employeeGetProf'] = 'Employee_Controller/employeeGetProf';
|
||||
|
||||
// call tracking
|
||||
$route['getTrackingLeadDetails'] = 'Call_Tracking_Controller/getTrackingLeadDetails';
|
||||
@ -115,6 +116,8 @@ $route['getStudentCourseList'] = 'Student_Controller/getStudentCourseList';
|
||||
$route['getStudentCourseDetails'] = 'Student_Controller/getStudentCourseDetails';
|
||||
$route['updateStudentCourseDetail'] = 'Student_Controller/updateStudentCourseDetail';
|
||||
$route['insertStudentCourse'] = 'Student_Controller/insertStudentCourse';
|
||||
$route['insertStudentImg'] = 'Student_Controller/insertStudentImg';
|
||||
$route['updateStudentImgDetails'] = 'Student_Controller/updateStudentImgDetails';
|
||||
|
||||
//batch
|
||||
$route['addBatchDetails'] = 'Batch_Controller/addBatchDetails';
|
||||
|
||||
@ -45,6 +45,26 @@ class Employee_Controller extends REST_Controller {
|
||||
$this->load->model('Employee_model', 'employee_model');
|
||||
}
|
||||
|
||||
// get login employee profile details
|
||||
public function employeeGetProf_post() {
|
||||
$empLoginID = $this->post('employeeLoginID');
|
||||
$employeeDetails = $this->employee_model->get_emp_prof_detail( $empLoginID );// Check if the employee exist
|
||||
if ($employeeDetails)
|
||||
{
|
||||
$employeeDetails['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($employeeDetails, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
//This method used to get employee Details
|
||||
public function employee_post()
|
||||
{
|
||||
@ -151,7 +171,7 @@ class Employee_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
// add employee with image
|
||||
// add employee without image
|
||||
public function addEmployee_post() {
|
||||
$data = $this->post('data');
|
||||
$createdBy = $this->post('createdBy');
|
||||
@ -207,6 +227,7 @@ class Employee_Controller extends REST_Controller {
|
||||
$imagename = $_FILES['idProof']['name'];
|
||||
|
||||
$size = $_FILES['idProof']['size'];
|
||||
|
||||
$imageSource = $_FILES['idProof']['tmp_name'];
|
||||
// echo $size;exit();
|
||||
$data= $this->post('data');
|
||||
|
||||
@ -177,11 +177,78 @@ class Student_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function updateStudentImgDetails_post() {
|
||||
|
||||
$imagename = $_FILES['idStuUpProof']['name'];
|
||||
$size = $_FILES['idStuUpProof']['size'];
|
||||
$imageSource = $_FILES['idStuUpProof']['tmp_name'];
|
||||
|
||||
$temp= $this->post('data');
|
||||
$data = json_decode($temp, true);
|
||||
|
||||
$updatedBy = $this->post('updatedBy');
|
||||
$updateStudent = $data['StudentID'];
|
||||
|
||||
$req['MobileNumber'] = $data['MobileNumber'];
|
||||
$req['Firstname'] = $data['Firstname'];
|
||||
$req['Lastname'] = $data['Lastname'];
|
||||
$req['Fathername'] = $data['Fathername'];
|
||||
$req['EmailID'] = $data['EmailID'];
|
||||
$req['MotherName'] = $data['MotherName'];
|
||||
|
||||
$req['AlternateNumber'] = $data['AlternateNumber'];
|
||||
$req['Gender'] = $data['Gender'];
|
||||
$req['DOB'] = $data['DOB'];
|
||||
$req['PresentAddress'] = $data['PresentAddress'];
|
||||
$req['PermanentAddress'] = $data['PermanentAddress'];
|
||||
$req['AadharNumber'] = $data['AadharNumber'];
|
||||
$req['OtherID'] = $data['OtherID'];
|
||||
$req['OtherIDDetails'] = $data['OtherIDDetails'];
|
||||
$req['Qualification'] = $data['Qualification'];
|
||||
|
||||
$req['PreQualification'] = $data['PreQualification'];
|
||||
$req['Caste'] = $data['Caste'];
|
||||
$req['Category'] = $data['Category'];
|
||||
$req['Religion'] = $data['Religion'];
|
||||
$req['Nationality'] = $data['Nationality'];
|
||||
$req['Occupation'] = $data['Occupation'];
|
||||
$req['Designation'] = $data['Designation'];
|
||||
$req['Companyname'] = $data['Companyname'];
|
||||
$req['ReferredBy'] = $data['ReferredBy'];
|
||||
$req['ReferersMobileNumber'] = $data['ReferersMobileNumber'];
|
||||
$req['ProfilePicPath'] = $data['ProfilePicPath'];
|
||||
|
||||
$req['IsActive'] = $data['IsActive'];
|
||||
|
||||
$req['UpdatedBy'] = $updatedBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
$studentUpdate = $this->student_model->update_student( $req, $updateStudent, $imagename, $imageSource, $size );// Check if the employee exist
|
||||
if ($studentUpdate)
|
||||
{
|
||||
$studentUpdate['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentUpdate, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
}
|
||||
else
|
||||
{
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
|
||||
}
|
||||
public function updateStudentExistDetail_post(){
|
||||
$data = $this->post('data');
|
||||
$updatedBy = $this->post('updatedBy');
|
||||
$updateStudent = $data['StudentID'];
|
||||
|
||||
$imagename = '';
|
||||
$size = '';
|
||||
$imageSource = '';
|
||||
|
||||
$req['MobileNumber'] = $data['MobileNumber'];
|
||||
$req['Firstname'] = $data['Firstname'];
|
||||
$req['Lastname'] = $data['Lastname'];
|
||||
@ -209,13 +276,14 @@ class Student_Controller extends REST_Controller {
|
||||
$req['Companyname'] = $data['Companyname'];
|
||||
$req['ReferredBy'] = $data['ReferredBy'];
|
||||
$req['ReferersMobileNumber'] = $data['ReferersMobileNumber'];
|
||||
$req['ProfilePicPath'] = $data['ProfilePicPath'];
|
||||
|
||||
$req['IsActive'] = $data['IsActive'];
|
||||
|
||||
$req['UpdatedBy'] = $updatedBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['UpdatedOn'] = $date;
|
||||
$studentUpdate = $this->student_model->update_student( $req, $updateStudent );// Check if the employee exist
|
||||
$studentUpdate = $this->student_model->update_student( $req, $updateStudent, $imagename, $imageSource, $size );// Check if the employee exist
|
||||
if ($studentUpdate)
|
||||
{
|
||||
$studentUpdate['status'] = REST_Controller::HTTP_OK;
|
||||
@ -308,68 +376,144 @@ class Student_Controller extends REST_Controller {
|
||||
}
|
||||
}
|
||||
|
||||
public function insertStudentImg_post() {
|
||||
// print_r($this->post('idProof'));exit();
|
||||
$imagename = $_FILES['idStuProof']['name'];
|
||||
$size = $_FILES['idStuProof']['size'];
|
||||
$imageSource = $_FILES['idStuProof']['tmp_name'];
|
||||
// echo $size;exit();
|
||||
$temp = $this->post('data');
|
||||
$tempBranch = $this->post('coursedata');
|
||||
$data = json_decode($temp, true);
|
||||
$coursedata = json_decode($tempBranch, true);
|
||||
|
||||
$createdBy = $this->post('createdBy');
|
||||
$createdBranch = $this->post('loginBranch');
|
||||
|
||||
$req['Firstname'] = $data['firstname'];
|
||||
$req['Lastname'] = $data['lastname'];
|
||||
$req['Fathername'] = $data['fathername'];
|
||||
$req['EmailID'] = $data['emailId'];
|
||||
$req['MotherName'] = $data['mothername'];
|
||||
$req['MobileNumber'] = $data['primaryPhone'];
|
||||
$req['AlternateNumber'] = $data['secondaryPhone'];
|
||||
$req['Gender'] = $data['gender'];
|
||||
$req['DOB'] = $data['dateofbirth'];
|
||||
$req['PresentAddress'] = $data['address2'];
|
||||
$req['PermanentAddress'] = $data['address1'];
|
||||
$req['AadharNumber'] = $data['aadharNumber'];
|
||||
$req['OtherID'] = $data['otherId'];
|
||||
$req['OtherIDDetails'] = $data['otherIdDetails'];
|
||||
$req['Caste'] = $data['caste'];
|
||||
$req['Category'] = $data['category'];
|
||||
$req['Religion'] = $data['religion'];
|
||||
$req['Nationality'] = $data['nationality'];
|
||||
$req['Occupation'] = $data['occupation'];
|
||||
$req['Designation'] = $data['designation'];
|
||||
$req['Companyname'] = $data['companyname'];
|
||||
$req['ReferredBy'] = $data['referredby'];
|
||||
$req['ReferersMobileNumber'] = $data['referredmobilenumber'];
|
||||
$req['PreQualification'] = $data['prequalification'];
|
||||
$req['IsActive'] = $data['switchsetting'];
|
||||
$req['BranchCode'] = $createdBranch;
|
||||
|
||||
$req['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['CreatedOn'] = $date;
|
||||
|
||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$reqCourse['CreatedOn'] = $date;
|
||||
|
||||
$studentAdd = $this->student_model->add_student( $req , $reqCourse, $imagename, $imageSource, $size);// Check if the employee exist
|
||||
if ($studentAdd) {
|
||||
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
} else {
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
// add student
|
||||
public function addStudent_post() {
|
||||
$data = $this->post('data');
|
||||
$coursedata = $this->post('coursedata');
|
||||
$createdBy = $this->post('createdBy');
|
||||
$createdBranch = $this->post('loginBranch');
|
||||
|
||||
$req['Firstname'] = $data['firstname'];
|
||||
$req['Lastname'] = $data['lastname'];
|
||||
$req['Fathername'] = $data['fathername'];
|
||||
$req['EmailID'] = $data['emailId'];
|
||||
$req['MotherName'] = $data['mothername'];
|
||||
$req['MobileNumber'] = $data['primaryPhone'];
|
||||
$req['AlternateNumber'] = $data['secondaryPhone'];
|
||||
$req['Gender'] = $data['gender'];
|
||||
$req['DOB'] = $data['dateofbirth'];
|
||||
$req['PresentAddress'] = $data['address2'];
|
||||
$req['PermanentAddress'] = $data['address1'];
|
||||
$req['AadharNumber'] = $data['aadharNumber'];
|
||||
$req['OtherID'] = $data['otherId'];
|
||||
$req['OtherIDDetails'] = $data['otherIdDetails'];
|
||||
$req['Caste'] = $data['caste'];
|
||||
$req['Category'] = $data['category'];
|
||||
$req['Religion'] = $data['religion'];
|
||||
$req['Nationality'] = $data['nationality'];
|
||||
$req['Occupation'] = $data['occupation'];
|
||||
$req['Designation'] = $data['designation'];
|
||||
$req['Companyname'] = $data['companyname'];
|
||||
$req['ReferredBy'] = $data['referredby'];
|
||||
$req['ReferersMobileNumber'] = $data['referredmobilenumber'];
|
||||
$req['PreQualification'] = $data['prequalification'];
|
||||
$req['IsActive'] = $data['switchsetting'];
|
||||
$req['BranchCode'] = $createdBranch;
|
||||
|
||||
$req['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['CreatedOn'] = $date;
|
||||
|
||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$reqCourse['CreatedOn'] = $date;
|
||||
|
||||
|
||||
$studentAdd = $this->student_model->add_student( $req , $reqCourse);// Check if the employee exist
|
||||
if ($studentAdd) {
|
||||
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
} else {
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
$imagename = '';
|
||||
$size = '';
|
||||
$imageSource = '';
|
||||
|
||||
$data = $this->post('data');
|
||||
$coursedata = $this->post('coursedata');
|
||||
$createdBy = $this->post('createdBy');
|
||||
$createdBranch = $this->post('loginBranch');
|
||||
|
||||
$req['Firstname'] = $data['firstname'];
|
||||
$req['Lastname'] = $data['lastname'];
|
||||
$req['Fathername'] = $data['fathername'];
|
||||
$req['EmailID'] = $data['emailId'];
|
||||
$req['MotherName'] = $data['mothername'];
|
||||
$req['MobileNumber'] = $data['primaryPhone'];
|
||||
$req['AlternateNumber'] = $data['secondaryPhone'];
|
||||
$req['Gender'] = $data['gender'];
|
||||
$req['DOB'] = $data['dateofbirth'];
|
||||
$req['PresentAddress'] = $data['address2'];
|
||||
$req['PermanentAddress'] = $data['address1'];
|
||||
$req['AadharNumber'] = $data['aadharNumber'];
|
||||
$req['OtherID'] = $data['otherId'];
|
||||
$req['OtherIDDetails'] = $data['otherIdDetails'];
|
||||
$req['Caste'] = $data['caste'];
|
||||
$req['Category'] = $data['category'];
|
||||
$req['Religion'] = $data['religion'];
|
||||
$req['Nationality'] = $data['nationality'];
|
||||
$req['Occupation'] = $data['occupation'];
|
||||
$req['Designation'] = $data['designation'];
|
||||
$req['Companyname'] = $data['companyname'];
|
||||
$req['ReferredBy'] = $data['referredby'];
|
||||
$req['ReferersMobileNumber'] = $data['referredmobilenumber'];
|
||||
$req['PreQualification'] = $data['prequalification'];
|
||||
$req['IsActive'] = $data['switchsetting'];
|
||||
$req['BranchCode'] = $createdBranch;
|
||||
|
||||
$req['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$req['CreatedOn'] = $date;
|
||||
|
||||
$reqCourse['UniversityID'] = $coursedata['university'];
|
||||
$reqCourse['CourseID'] = $coursedata['course'];
|
||||
$reqCourse['BatchCode'] = $coursedata['batch'];
|
||||
$reqCourse['DOJ'] = $coursedata['dateofjoining'];
|
||||
$reqCourse['BranchID'] = $createdBranch;
|
||||
$reqCourse['IsActive'] = $data['switchsetting'];
|
||||
$reqCourse['EnrollmentID'] = $coursedata['enrollmentid'];
|
||||
$reqCourse['CreatedBy'] = $createdBy;
|
||||
$date = date('Y-m-d H:i:s');
|
||||
$reqCourse['CreatedOn'] = $date;
|
||||
|
||||
|
||||
$studentAdd = $this->student_model->add_student( $req , $reqCourse, $imagename, $imageSource, $size);// Check if the employee exist
|
||||
if ($studentAdd) {
|
||||
$studentAdd['status'] = REST_Controller::HTTP_OK;
|
||||
// Set the response and exit
|
||||
$this->response($studentAdd, REST_Controller::HTTP_OK); // OK (200) being the HTTP response code
|
||||
} else {
|
||||
// Set the response and exit
|
||||
$this->response([
|
||||
'message' => 'No users were found',
|
||||
'status' => REST_Controller::HTTP_NOT_FOUND
|
||||
], REST_Controller::HTTP_NOT_FOUND); // NOT_FOUND (404) being the HTTP response code
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
@ -17,6 +17,68 @@ class Employee_model extends CI_Model
|
||||
/*
|
||||
* get Employee Details, Employee Branch Details
|
||||
*/
|
||||
|
||||
// get login employee profile details
|
||||
public function get_emp_prof_detail($empLoginID = null) {
|
||||
$this->db->select('StaffID');
|
||||
$this->db->from(LOGIN);
|
||||
$this->db->where('ID', $empLoginID);
|
||||
$loginEmpDetail = $this->db->get()->first_row();
|
||||
if ($loginEmpDetail) {
|
||||
$EmpId = $loginEmpDetail->StaffID;
|
||||
$this->db->select('t1.*');
|
||||
$this->db->from('' . STAFF . ' as t1');
|
||||
$this->db->where('t1.StaffID', $EmpId);
|
||||
// $this->db->join('T_StaffDetails as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
||||
$responseDetails = $this->db->get()->first_row();
|
||||
$result['empStatus'] = true;
|
||||
// print_r($responseDetails->ListCode);exit();
|
||||
|
||||
if ($responseDetails->ListCode == SUPER_ADMIN) {
|
||||
// print_r($result['details']->ListCode);exit();
|
||||
// get branch details for super admin
|
||||
$responseDetails->BranchCode = 'All';
|
||||
$result['details'] = $responseDetails;
|
||||
// print_r($result['details']);exit();
|
||||
$this->db->select('t3.BranchCode, t3.BranchName');
|
||||
$this->db->from('' . STAFF_BRANCH . ' as t2');
|
||||
$this->db->where('t2.StaffID', $EmpId);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->join('' . BRANCH . ' as t3', 't2.BranchCode = t3.BranchCode', 'LEFT');
|
||||
$this->db->where('t3.IsActive', 1);
|
||||
// $this->db->join('T_StaffDetails as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
||||
$branchDetails = $this->db->get();
|
||||
$getArrs = $branchDetails->result();
|
||||
$SS['BranchCode'] = 'All';
|
||||
$SS['BranchName'] = 'All';
|
||||
|
||||
array_push($getArrs, $SS);
|
||||
// print_r($getArrs);exit();
|
||||
$result['branchStatus'] = true;
|
||||
$result['branch_details'] = $getArrs;
|
||||
$result['work_State'] = 'Super Admin';
|
||||
|
||||
} else {
|
||||
// get branch details for admin & staff
|
||||
$result['details'] = $responseDetails;
|
||||
$this->db->select('t3.BranchCode, t3.BranchName');
|
||||
$this->db->from('' . STAFF_BRANCH . ' as t2');
|
||||
$this->db->where('t2.StaffID', $EmpId);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->join('' . BRANCH . ' as t3', 't2.BranchCode = t3.BranchCode', 'LEFT');
|
||||
$this->db->where('t3.IsActive', 1);
|
||||
// $this->db->join('T_StaffDetails as t2', 't1.StaffID = t2.StaffID', 'LEFT');
|
||||
$branchDetails = $this->db->get();
|
||||
$result['branchStatus'] = true;
|
||||
$result['work_State'] = $responseDetails->ListCode == ADMIN ? 'Admin' : 'Staff';
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
}
|
||||
} else {
|
||||
$result['empStatus'] = false;
|
||||
$result['message'] = "Something Went Wrong, Please try Again !!";
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
// get single employee details
|
||||
public function get_emp_detail($empLoginID = null)
|
||||
@ -400,6 +462,16 @@ class Employee_model extends CI_Model
|
||||
$getUploadStatus = $this->upload_image($imageSource, $imageSize, $target);
|
||||
$imageNameDb = $getUploadStatus['status'] == true ? $getUploadStatus['imageName'] : $getUploadStatus['imageName'] = 'default.jpeg';
|
||||
$empArr['ProfilePicPath'] = "employee/".$imageNameDb;
|
||||
$this->db->select('ProfilePicPath');
|
||||
$this->db->from(STAFF);
|
||||
$this->db->where('StaffID', $updateFor);
|
||||
$roleDetails = $this->db->get()->first_row();
|
||||
// echo $roleDetails->ProfilePicPath;
|
||||
// exit();
|
||||
if( $roleDetails->ProfilePicPath != '' && $roleDetails->ProfilePicPath != 'employee/default.jpeg'){
|
||||
unlink('../images/'.$roleDetails->ProfilePicPath);
|
||||
} else {
|
||||
}
|
||||
$this->db->where('StaffID', $updateFor);
|
||||
$this->db->update(STAFF, $empArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
|
||||
@ -253,28 +253,35 @@ class Student_model extends CI_Model
|
||||
}
|
||||
|
||||
// add student
|
||||
public function add_student($Arr, $courseArr)
|
||||
public function add_student($Arr, $courseArr, $imagename, $imageSource, $size)
|
||||
{
|
||||
// print_r($Arr);
|
||||
// print_r($courseArr);exit();
|
||||
$this->db->insert(STUDENTS, $Arr);
|
||||
$insert_id = $this->db->insert_id('StudentID');
|
||||
$courseArr['StudentID'] = $insert_id;
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$this->db->insert(STUDENTCOURSE, $courseArr);
|
||||
if( $imageSource == '') { // add employee without image
|
||||
$imageNameDb = 'default.jpeg';
|
||||
$Arr['ProfilePicPath'] = "student/".$imageNameDb;
|
||||
// print_r($Arr);
|
||||
// print_r($courseArr);exit();
|
||||
$this->db->insert(STUDENTS, $Arr);
|
||||
$insert_id = $this->db->insert_id('StudentID');
|
||||
$courseArr['StudentID'] = $insert_id;
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$loginArr['StaffID'] = $courseArr['StudentID'];
|
||||
$loginArr['ListCode'] = STUDENT;
|
||||
$loginArr['MobileNumber'] = $Arr['MobileNumber'];
|
||||
$loginArr['EmailId'] = $Arr['EmailID'];
|
||||
$loginArr['IsActive'] = $Arr['IsActive'];
|
||||
$loginArr['CreatedBy'] = $Arr['CreatedBy'];
|
||||
$loginArr['CreatedOn'] = $Arr['CreatedOn'];
|
||||
$loginArr['Password'] = ENCR_PASSWORD;
|
||||
$this->db->insert(LOGIN, $loginArr);
|
||||
$this->db->insert(STUDENTCOURSE, $courseArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addStudentStatus'] = true;
|
||||
$result['message'] = "Successfully student details added";
|
||||
$loginArr['StaffID'] = $courseArr['StudentID'];
|
||||
$loginArr['ListCode'] = STUDENT;
|
||||
$loginArr['MobileNumber'] = $Arr['MobileNumber'];
|
||||
$loginArr['EmailId'] = $Arr['EmailID'];
|
||||
$loginArr['IsActive'] = $Arr['IsActive'];
|
||||
$loginArr['CreatedBy'] = $Arr['CreatedBy'];
|
||||
$loginArr['CreatedOn'] = $Arr['CreatedOn'];
|
||||
$loginArr['Password'] = ENCR_PASSWORD;
|
||||
$this->db->insert(LOGIN, $loginArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addStudentStatus'] = true;
|
||||
$result['message'] = "Successfully student details added";
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
@ -284,8 +291,41 @@ class Student_model extends CI_Model
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
$target = "../images/student/";
|
||||
$getUploadStatus = $this->upload_image($imageSource, $size, $target);
|
||||
$imageNameDb = $getUploadStatus['status'] == true ? $getUploadStatus['imageName'] : $getUploadStatus['imageName'] = 'default.jpeg';
|
||||
$Arr['ProfilePicPath'] = "student/".$imageNameDb;
|
||||
|
||||
$this->db->insert(STUDENTS, $Arr);
|
||||
$insert_id = $this->db->insert_id('StudentID');
|
||||
$courseArr['StudentID'] = $insert_id;
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$this->db->insert(STUDENTCOURSE, $courseArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$loginArr['StaffID'] = $courseArr['StudentID'];
|
||||
$loginArr['ListCode'] = STUDENT;
|
||||
$loginArr['MobileNumber'] = $Arr['MobileNumber'];
|
||||
$loginArr['EmailId'] = $Arr['EmailID'];
|
||||
$loginArr['IsActive'] = $Arr['IsActive'];
|
||||
$loginArr['CreatedBy'] = $Arr['CreatedBy'];
|
||||
$loginArr['CreatedOn'] = $Arr['CreatedOn'];
|
||||
$loginArr['Password'] = ENCR_PASSWORD;
|
||||
$this->db->insert(LOGIN, $loginArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$result['addStudentStatus'] = true;
|
||||
$result['message'] = "Successfully student details added";
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['addStudentStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
@ -345,31 +385,68 @@ class Student_model extends CI_Model
|
||||
return $result;
|
||||
}
|
||||
// update student personal details
|
||||
public function update_student($empArr, $updateFor)
|
||||
public function update_student($empArr, $updateFor, $imagename, $imageSource, $size)
|
||||
{
|
||||
// print_r($empArr);
|
||||
// print_r($updateFor);
|
||||
// exit();
|
||||
$this->db->where('StudentID', $updateFor);
|
||||
$this->db->update(STUDENTS, $empArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$mobile = $empArr['MobileNumber'];
|
||||
$email = $empArr['EmailID'];
|
||||
$active = $empArr['IsActive'];
|
||||
$updatedBy = $empArr['UpdatedBy'];
|
||||
$updatedOn = $empArr['UpdatedOn'];
|
||||
$sql = "UPDATE ".LOGIN." SET MobileNumber='$mobile', EmailId='$email', IsActive='$active', UpdatedBy='$updatedBy', UpdatedOn='$updatedOn' WHERE StaffID='$updateFor'";
|
||||
if($this->db->query($sql) == '1'){
|
||||
$result['updateStuStatus'] = true;
|
||||
$result['message'] = "Successfully student details Updated";
|
||||
if( $imageSource == '') {
|
||||
// print_r($empArr);
|
||||
// print_r($updateFor);
|
||||
// exit();
|
||||
$this->db->where('StudentID', $updateFor);
|
||||
$this->db->update(STUDENTS, $empArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$mobile = $empArr['MobileNumber'];
|
||||
$email = $empArr['EmailID'];
|
||||
$active = $empArr['IsActive'];
|
||||
$updatedBy = $empArr['UpdatedBy'];
|
||||
$updatedOn = $empArr['UpdatedOn'];
|
||||
$sql = "UPDATE ".LOGIN." SET MobileNumber='$mobile', EmailId='$email', IsActive='$active', UpdatedBy='$updatedBy', UpdatedOn='$updatedOn' WHERE StaffID='$updateFor'";
|
||||
if($this->db->query($sql) == '1'){
|
||||
$result['updateStuStatus'] = true;
|
||||
$result['message'] = "Successfully student details Updated";
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$target = "../images/student/";
|
||||
$getUploadStatus = $this->upload_image($imageSource, $size, $target);
|
||||
$imageNameDb = $getUploadStatus['status'] == true ? $getUploadStatus['imageName'] : $getUploadStatus['imageName'] = 'default.jpeg';
|
||||
$empArr['ProfilePicPath'] = "student/".$imageNameDb;
|
||||
$this->db->select('ProfilePicPath');
|
||||
$this->db->from(STUDENTS);
|
||||
$this->db->where('StudentID', $updateFor);
|
||||
$roleDetails = $this->db->get()->first_row();
|
||||
// echo $roleDetails->ProfilePicPath;
|
||||
// exit();
|
||||
if( $roleDetails->ProfilePicPath != '' && $roleDetails->ProfilePicPath != 'student/default.jpeg'){
|
||||
unlink('../images/'.$roleDetails->ProfilePicPath);
|
||||
} else {
|
||||
}
|
||||
$this->db->where('StudentID', $updateFor);
|
||||
$this->db->update(STUDENTS, $empArr);
|
||||
if ($this->db->affected_rows() == '1') {
|
||||
$mobile = $empArr['MobileNumber'];
|
||||
$email = $empArr['EmailID'];
|
||||
$active = $empArr['IsActive'];
|
||||
$updatedBy = $empArr['UpdatedBy'];
|
||||
$updatedOn = $empArr['UpdatedOn'];
|
||||
$sql = "UPDATE ".LOGIN." SET MobileNumber='$mobile', EmailId='$email', IsActive='$active', UpdatedBy='$updatedBy', UpdatedOn='$updatedOn' WHERE StaffID='$updateFor'";
|
||||
if($this->db->query($sql) == '1'){
|
||||
$result['updateStuStatus'] = true;
|
||||
$result['message'] = "Successfully student details Updated";
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
} else {
|
||||
$result['updateStuStatus'] = false;
|
||||
$result['message'] = "Something went wrong.please try again";
|
||||
}
|
||||
}
|
||||
return $result;
|
||||
}
|
||||
|
||||
@ -400,4 +477,20 @@ class Student_model extends CI_Model
|
||||
return $result;
|
||||
}
|
||||
|
||||
// image upload in taget path
|
||||
public function upload_image( $imageSource, $size, $target ) {
|
||||
$key2 = substr(str_shuffle('abcdefghijklmnopqrstuvwxyz0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZ'), 0, 12);
|
||||
$new_regNo = "Dri_" . $key2 . "." . 'jpeg';
|
||||
$targetPlace = $target . $new_regNo;
|
||||
// echo $targetPlace;exit();
|
||||
if(!move_uploaded_file($imageSource , $targetPlace))
|
||||
{
|
||||
return $result['status'] = false;
|
||||
} else {
|
||||
$result['status'] = true;
|
||||
$result['imageName'] = $new_regNo;
|
||||
return $result;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@ -105,6 +105,9 @@
|
||||
"MAIN": "ANNOUNCEMENT",
|
||||
"ANNOUNCEMENTLISTING": "ANNOUNCEMENT LISTING",
|
||||
"ADDANNOUNCEMENT": "ADD ANNOUNCEMENT"
|
||||
},
|
||||
"profile": {
|
||||
"MAIN": "MY PROFILE"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
||||
@ -73,6 +73,10 @@ app.constant('JS_REQUIRES', {
|
||||
* Session
|
||||
*/
|
||||
'sessionCtrl': 'assets/js/controllers/sessionCtrl.js',
|
||||
/***
|
||||
* My Profile
|
||||
*/
|
||||
'myProfileCtrl': 'assets/js/controllers/myProfileCtrl.js',
|
||||
/*
|
||||
* Branch
|
||||
* */
|
||||
|
||||
@ -65,6 +65,14 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'Dashboard'
|
||||
}
|
||||
}).state('app.myprofile',{
|
||||
url: "/myProfile",
|
||||
templateUrl: "assets/views/myProfile/myProfile.html",
|
||||
resolve: loadSequence('spin', 'ladda', 'angular-ladda', 'ngTable', 'myProfileCtrl'),
|
||||
title: "My Profile",
|
||||
ncyBreadcrumb: {
|
||||
label: 'My Profile'
|
||||
}
|
||||
}).state('app.changePassword', {
|
||||
url: "/changePassword",
|
||||
templateUrl: "assets/views/changePassword.html",
|
||||
|
||||
70
Apollo/assets/js/controllers/myProfileCtrl.js
Normal file
70
Apollo/assets/js/controllers/myProfileCtrl.js
Normal file
@ -0,0 +1,70 @@
|
||||
'use strict';
|
||||
/*** controller for Wizard Form example***/
|
||||
app.controller('myProfileCtrl', ["$scope", "$filter", "ngTableParams", "API_POINTS", "$http", "SweetAlert", "$state", 'md5', 'ipCookie', function ($scope, $filter, ngTableParams, apiPoint, $http, SweetAlert, $state, md5, ipCookie) {
|
||||
|
||||
/**
|
||||
* Logined user profile view
|
||||
* by : kdk
|
||||
*/
|
||||
var localDetail = JSON.parse(localStorage.getItem('localObj'));
|
||||
var localDetails = ipCookie('cookiechk');
|
||||
|
||||
$scope.init = function () {
|
||||
if (localDetail != null) {
|
||||
$scope.getProfile();
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
$scope.loginUser = {
|
||||
'staffID': '',
|
||||
'fName': '',
|
||||
'lName': '',
|
||||
'mobileNumber': '',
|
||||
'gender': '',
|
||||
'branchCode': '',
|
||||
'branchList': '',
|
||||
};
|
||||
|
||||
|
||||
// client side logined details
|
||||
$scope.getProfile = function () {
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'employeeGetProf/',
|
||||
headers: {
|
||||
'Content-Type': 'application/json'
|
||||
},
|
||||
data: {
|
||||
employeeLoginID: localDetails.localUserID
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.empStatus == true) {
|
||||
/*
|
||||
* Get Top Nav user details
|
||||
*/
|
||||
$scope.userInfo = response.data.details;
|
||||
$scope.userStatusInfo = response.data.work_State;
|
||||
$scope.userBranchInfo = response.data.branch_details;
|
||||
// alert(JSON.stringify($scope.userInfo));
|
||||
// alert(JSON.stringify($scope.userStatusInfo));
|
||||
// alert(JSON.stringify($scope.userBranchInfo));
|
||||
// $scope.loginImage = $scope.resultData.ProfilePicPath;
|
||||
// $scope.loginUser = {
|
||||
// 'staffID': $scope.resultData.StaffID,
|
||||
// 'fName': $scope.resultData.Firstname,
|
||||
// 'lName': $scope.resultData.Lastname,
|
||||
// 'mobileNumber': $scope.resultData.MobileNumber,
|
||||
// 'gender': $scope.resultData.Gender,
|
||||
// 'branchCode': $scope.resultData.BranchCode,
|
||||
// 'branchList': response.data.branch_details,
|
||||
// };
|
||||
// var currArr = response.data.branch_details;
|
||||
// $scope.getCurrentBran = currArr.find(item => item.BranchCode === localDetails.localBranchID);
|
||||
} else {
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
}]);
|
||||
@ -4,7 +4,7 @@
|
||||
* Simple table with sorting and filtering on AngularJS
|
||||
*/
|
||||
|
||||
app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window) {
|
||||
app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams", "$http", "API_POINTS", "$state", '$rootScope', '$cookies', 'md5', 'ipCookie', '$timeout', '$window', "flowFactory", function ($scope, toaster, $filter, ngTableParams, $http, apiPoint, $state, $rootScope, $cookies, md5, ipCookie, $timeout, $window, flowFactory) {
|
||||
/**
|
||||
* student details capture
|
||||
* by : kdk
|
||||
@ -87,16 +87,12 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
$scope.currentDate = new Date(sixteenYearsBeforeNow);
|
||||
$scope.getStudentList();
|
||||
$scope.getUniversityList();
|
||||
|
||||
$scope.myModel.dateofbirth=$filter('date')($scope.currentDate, 'dd-MM-yyyy');
|
||||
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
|
||||
$scope.getStudentList = function () {
|
||||
$scope.loader = true;
|
||||
var empListreq = {
|
||||
@ -269,7 +265,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
}
|
||||
|
||||
// update sutdent course details
|
||||
$scope.updateStudentCourseDetails = function (form, datas) {
|
||||
$scope.updateStudentCourseDetails = function (form, datas, hidedoj) {
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
@ -289,7 +285,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOJ = $filter('date')(new Date(datas.DOJ), formate);
|
||||
datas.IsActive = datas.IsActive === true ? 1 : 0;
|
||||
datas.DOJ = checkDOJ == "NaN-NaN-0NaN" ? datas.DOJ : $filter('date')(new Date(datas.DOJ), formate);
|
||||
datas.DOJ = datas.DOJ == hidedoj ? datas.DOJ : $filter('date')(new Date(datas.DOJ), formate);
|
||||
// alert(datas.DOJ);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
@ -448,6 +444,46 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
});
|
||||
}
|
||||
|
||||
//-------------------------------------------------------------->
|
||||
// getting for image to show
|
||||
//-------------------------------------------------------------->
|
||||
|
||||
$scope.stepsModel = [];
|
||||
$scope.imageUpload = function (event) {
|
||||
var files = event.target.files; //FileList object
|
||||
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
var reader = new FileReader();
|
||||
reader.onload = $scope.imageIsLoaded;
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.imageIsLoaded = function (e) {
|
||||
$scope.$apply(function () {
|
||||
// $scope.stepsModel.push(e.target.result);
|
||||
$scope.stepsModel[0] = e.target.result;
|
||||
});
|
||||
}
|
||||
|
||||
//an array of files selected
|
||||
$scope.files = [];
|
||||
|
||||
//listen for the file selected event
|
||||
$scope.$on("fileSelected", function (event, args) {
|
||||
$scope.$apply(function () {
|
||||
//add the file object to the scope's files collection
|
||||
$scope.files[0] = args.file;
|
||||
});
|
||||
});
|
||||
|
||||
// reset image
|
||||
$scope.resetImage = function () {
|
||||
$scope.files.length = 0;
|
||||
$scope.stepsModel.length = 0;
|
||||
}
|
||||
|
||||
// add student
|
||||
$scope.studentFORM = {
|
||||
submit: function (form, myModel, myModelCourseAdd) {
|
||||
@ -471,7 +507,33 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
var formate = "dd-MM-yyyy";
|
||||
$scope.myModel.switchsetting = $scope.myModel.switchsetting === true ? 1 : 0;
|
||||
$scope.myModel.dateofbirth = $filter('date')(new Date($scope.myModel.dateofbirth), formate);
|
||||
$scope.myModelCourseAdd.dateofjoining = $filter('date')(new Date($scope.myModelCourseAdd.dateofjoining), formate);
|
||||
$scope.myModelCourseAdd.dateofjoining = $filter('date')(new Date($scope.myModelCourseAdd.dateofjoining), formate);
|
||||
var idStuProof = $scope.files[0];
|
||||
|
||||
if (idStuProof !== undefined) {
|
||||
var formData = new FormData();
|
||||
var idProof = $scope.files[0];
|
||||
// alert(idProof);
|
||||
formData.append("data", JSON.stringify($scope.myModel));
|
||||
formData.append("coursedata", JSON.stringify($scope.myModelCourseAdd));
|
||||
formData.append("createdBy", localDetails.localUserID);
|
||||
formData.append("loginBranch", localDetails.localBranchID);
|
||||
formData.append('idStuProof', idStuProof);
|
||||
|
||||
$http.post(apiPoint.url + 'insertStudentImg/', formData, {
|
||||
transformRequest: angular.identity,
|
||||
headers: { 'Content-Type': undefined, 'Process-Data': false },
|
||||
}).success(function (data) {
|
||||
if (data.addStudentStatus == true) {
|
||||
swal("Success!", data.message, "success");
|
||||
$scope.disableButton = false;
|
||||
$state.go($state.current, {}, { reload: true });
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", data.message, "error");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'insertStudent/',
|
||||
@ -495,6 +557,7 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
@ -582,8 +645,46 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
});
|
||||
}
|
||||
|
||||
|
||||
|
||||
$scope.stepsModelEdit = [];
|
||||
$scope.imageUploadEdit = function (event) {
|
||||
var files = event.target.files; //FileList object
|
||||
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
var file = files[i];
|
||||
var reader = new FileReader();
|
||||
reader.onload = $scope.imageIsLoadedEdit;
|
||||
reader.readAsDataURL(file);
|
||||
}
|
||||
}
|
||||
|
||||
$scope.imageIsLoadedEdit = function (e) {
|
||||
$scope.$apply(function () {
|
||||
// $scope.stepsModel.push(e.target.result);
|
||||
$scope.stepsModelEdit[0] = e.target.result;
|
||||
});
|
||||
}
|
||||
|
||||
//an array of files selected
|
||||
$scope.filesEdit = [];
|
||||
//listen for the file selected event
|
||||
$scope.$on("fileSelectedEdit", function (event, args) {
|
||||
$scope.$apply(function () {
|
||||
//add the file object to the scope's files collection
|
||||
$scope.filesEdit[0] = args.file;
|
||||
});
|
||||
});
|
||||
|
||||
|
||||
// reset image for Edit
|
||||
$scope.resetImageEdit = function () {
|
||||
$scope.filesEdit.length = 0;
|
||||
$scope.stepsModelEdit.length = 0;
|
||||
}
|
||||
|
||||
// update student details
|
||||
$scope.updateStuDetails = function (form, p) {
|
||||
$scope.updateStuDetails = function (form, p ,hidedob) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
var field = null, firstError = null;
|
||||
@ -601,11 +702,16 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
// alert(p.DOB);
|
||||
var idProof = $scope.filesEdit[0];
|
||||
|
||||
var formate = "dd-MM-yyyy";
|
||||
var checkDOB = $filter('date')(new Date(p.DOB), formate);
|
||||
p.IsActive = p.IsActive === true ? 1 : 0;
|
||||
p.DOB = checkDOB == "NaN-NaN-0NaN" ? p.DOB : $filter('date')(new Date(p.DOB), formate);
|
||||
var req = {
|
||||
p.DOB = p.DOB == hidedob ? p.DOB : $filter('date')(new Date(p.DOB), formate);
|
||||
|
||||
if(idProof == undefined) {
|
||||
// alert(idProof);
|
||||
var req = {
|
||||
method: 'POST',
|
||||
url: apiPoint.url + 'updateStudentExistDetail/',
|
||||
headers: {
|
||||
@ -615,20 +721,75 @@ app.controller('studentCtrl', ["$scope", "toaster", "$filter", "ngTableParams",
|
||||
data: p,
|
||||
updatedBy: localDetails.localUserID,
|
||||
}
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.updateStuStatus = true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
};
|
||||
$http(req).then(function (response) {
|
||||
if (response.data.updateStuStatus = true) {
|
||||
swal("Success!", response.data.message, "success");
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", response.data.message, "error");
|
||||
}
|
||||
});
|
||||
} else {
|
||||
var formData = new FormData();
|
||||
var idStuUpProof = $scope.filesEdit[0];
|
||||
// alert(idProof);
|
||||
formData.append("data", JSON.stringify(p));
|
||||
formData.append("updatedBy", localDetails.localUserID);
|
||||
formData.append('idStuUpProof', idStuUpProof);
|
||||
|
||||
$http.post(apiPoint.url + 'updateStudentImgDetails/', formData, {
|
||||
transformRequest: angular.identity,
|
||||
headers: { 'Content-Type': undefined, 'Process-Data': false },
|
||||
}).success(function (data) {
|
||||
if (data.updateStuStatus == true) {
|
||||
swal("Success!", data.message, "success");
|
||||
$scope.getStudentList();
|
||||
$scope.editId = -1;
|
||||
} else {
|
||||
// $scope.ldloading1[loading.replace('-', '_')] = false;
|
||||
swal("Failed!", data.message, "error");
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
}]);
|
||||
|
||||
// file upload directive
|
||||
app.directive('fileUpload', function () {
|
||||
return {
|
||||
scope: true, //create a new scope
|
||||
link: function (scope, el, attrs) {
|
||||
el.bind('change', function (event) {
|
||||
var files = event.target.files;
|
||||
//iterate files since 'multiple' may be specified on the element
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
//emit event upward
|
||||
scope.$emit("fileSelected", { file: files[i] });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
|
||||
}]);
|
||||
// file upload directive
|
||||
app.directive('fileUploadEdit', function () {
|
||||
return {
|
||||
scope: true, //create a new scope
|
||||
link: function (scope, el, attrs) {
|
||||
el.bind('change', function (event) {
|
||||
var files = event.target.files;
|
||||
//iterate files since 'multiple' may be specified on the element
|
||||
for (var i = 0; i < files.length; i++) {
|
||||
//emit event upward
|
||||
scope.$emit("fileSelectedEdit", { file: files[i] });
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
});
|
||||
|
||||
146
Apollo/assets/views/myProfile/myProfile.html
Normal file
146
Apollo/assets/views/myProfile/myProfile.html
Normal file
@ -0,0 +1,146 @@
|
||||
<!-- start: PAGE TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.profile.MAIN">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: PAGE TITLE -->
|
||||
<!-- start: USER PROFILE -->
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<!-- /// controller: 'UserCtrl' - localtion: assets/js/controllers/userCtrl.js /// -->
|
||||
<div ng-controller="myProfileCtrl">
|
||||
<!-- start: USER TABSET -->
|
||||
<tabset class="tabbable">
|
||||
<!-- start: TAB OVERVIEW -->
|
||||
<tab ng-init="init()" heading="Overview">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="user-left">
|
||||
<div class="center">
|
||||
|
||||
<div flow-init="{singleFile:true}" flow-name="obj.flow" flow-file-added="!!{png:1,gif:1,jpg:1,jpeg:1}[$file.getExtension()]">
|
||||
<div class="user-image">
|
||||
<div class="thumbnail">
|
||||
<img ng-src="images/{{userInfo.ProfilePicPath}}" ng-if="userInfo.ProfilePicPath !=null" alt="img">
|
||||
<img src="images/default.jpeg" ng-if="userInfo.ProfilePicPath == null" alt="img" >
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<hr>
|
||||
<div class="social-icons block">
|
||||
<h3>{{userInfo.StaffID}}</h3>
|
||||
<h4>{{userInfo.Firstname}} {{userInfo.Lastname}}</h4>
|
||||
</div>
|
||||
<hr>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="user-left">
|
||||
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">General information</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Mobile Number <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.MobileNumber}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Alternate Mobile Number <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.AlternateNumber}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Email <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.EmailID}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Father Name <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.Fathername}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Mother Name <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.MotherName}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Gender <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.Gender}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date Of Birth <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.DOB}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Aadhar Number <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.AadharNumber}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Qualification <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.Qualification}}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Present Address <span style="float: right;">:</span></td>
|
||||
<td style="width: 280px;"> {{userInfo.PresentAddress}}</span></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Permanent Address <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.PermanentAddress}}</td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<div class="user-left">
|
||||
<table class="table table-condensed">
|
||||
<thead>
|
||||
<tr>
|
||||
<th colspan="3">Branch Details</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
<tr>
|
||||
<td>Role <span style="float: right;">:</span></td>
|
||||
<td> {{ userStatusInfo }}</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Date Of Joining <span style="float: right;">:</span></td>
|
||||
<td> {{userInfo.DOJ}} </td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>Branch Access <span style="float: right;">:</span></td>
|
||||
<td> <ul ng-repeat="branch in userBranchInfo"><li>{{ branch.BranchName }}</li></ul></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
</table>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
<!-- end: TAB OVERVIEW -->
|
||||
</tabset>
|
||||
<!-- end: USER TABSET -->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: USER PROFILE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<!--<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="sidebar.nav.profile.MAIN">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>-->
|
||||
</div>
|
||||
</section>
|
||||
@ -105,6 +105,19 @@
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.myprofile')}">
|
||||
<a ui-sref="app.myprofile">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-id-badge"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.profile.MAIN">MY PROFILE </span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- end: Super Admin -->
|
||||
@ -208,6 +221,19 @@
|
||||
</a>
|
||||
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.myprofile')}">
|
||||
<a ui-sref="app.myprofile">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-id-badge"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.profile.MAIN">MY PROFILE </span>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<!-- end: Admin -->
|
||||
|
||||
@ -136,7 +136,7 @@
|
||||
</a>
|
||||
<ul role="menu" class="dropdown-menu dropdown-light fadeInUpShort">
|
||||
<li ng-repeat="branch in loginUser.branchList">
|
||||
<a ng-click="upDateLocalBran(branch.BranchCode)" href="#" class="menu-toggler">
|
||||
<a ng-click="upDateLocalBran(branch.BranchCode)" class="menu-toggler">
|
||||
{{branch.BranchName}}
|
||||
</a>
|
||||
<!--<a href="#" class="menu-toggler">
|
||||
|
||||
@ -61,7 +61,8 @@
|
||||
University <span class="symbol required"></span>
|
||||
</label>
|
||||
<select ng-init="onSlecetUnivEdit(stucour.UniversityID)" class="form-control" name="univ" ng-model="stucour.UniversityID"
|
||||
class="cs-select cs-skin-elastic" ng-change="onChangeSlecetUnivEdit(stucour.UniversityID)" required>
|
||||
class="cs-select cs-skin-elastic" ng-change="onChangeSlecetUnivEdit(stucour.UniversityID)"
|
||||
required>
|
||||
|
||||
<option value="" disabled selected>Select University</option>
|
||||
<option ng-repeat="items in universityData" value="{{items.UniversityID}}" ng-selected="stucour.UniversityID == items.UniversityID">{{items.UniversityName}}</option>
|
||||
@ -112,8 +113,7 @@
|
||||
</label>
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="stucour.DOJ"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required"
|
||||
/>
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" />
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining is required</span>
|
||||
</div>
|
||||
@ -126,7 +126,7 @@
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.enrollmentid.$dirty && Form.enrollmentid.$error.required">Enrollment ID required</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Active/De-Active
|
||||
@ -140,7 +140,7 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<input type="hidden" ng-init="hidden_DOJ=stucour.DOJ" ng-model="hidden_DOJ">
|
||||
<input type="hidden" ng-init="hidden_DOJ=stucour.DOJ" ng-model="hidden_DOJ">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
|
||||
@ -1,299 +1,362 @@
|
||||
<form name="Form" id="form" novalidate>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Personal Details
|
||||
</legend>
|
||||
<div class="col-md-12">
|
||||
<fieldset>
|
||||
<legend>
|
||||
Personal Details
|
||||
</legend>
|
||||
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.primaryPhone.$dirty && Form.primaryPhone.$invalid, 'has-success':Form.primaryPhone.$valid}">
|
||||
<label>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.primaryPhone.$dirty && Form.primaryPhone.$invalid, 'has-success':Form.primaryPhone.$valid}">
|
||||
<label>
|
||||
Mobile Number <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="1" placeholder="Enter Mobile Number" class="form-control" ng-model="p.MobileNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='updateCheckMobileExist(p)'
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$dirty && Form.primaryPhone.$invalid" ng-hide="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.firstname.$dirty && Form.firstname.$invalid, 'has-success':Form.firstname.$valid}">
|
||||
<label>
|
||||
<input type="text" name="primaryPhone" tabindex="1" placeholder="Enter Mobile Number" class="form-control" ng-model="p.MobileNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='updateCheckMobileExist(p)'
|
||||
required/>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$dirty && Form.primaryPhone.$invalid" ng-hide="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.primaryPhone.$error.maxlength || Form.primaryPhone.$error.minlength || Form.primaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.firstname.$dirty && Form.firstname.$invalid, 'has-success':Form.firstname.$valid}">
|
||||
<label>
|
||||
First Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter First Name" tabindex="2" class="form-control" name="firstname" ng-model="p.Firstname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.required">First Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.pattern">Invalid First Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.lastname.$dirty && Form.lastname.$invalid, 'has-success':Form.lastname.$valid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter First Name" tabindex="2" class="form-control" name="firstname" ng-model="p.Firstname"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.required">First Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.pattern">Invalid First Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.lastname.$dirty && Form.lastname.$invalid, 'has-success':Form.lastname.$valid}">
|
||||
<label>
|
||||
Last Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Last Name" tabindex="3" class="form-control" name="lastname" ng-model="p.Lastname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.required">Last Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.fathername.$dirty && Form.fathername.$invalid, 'has-success':Form.fathername.$valid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Last Name" tabindex="3" class="form-control" name="lastname" ng-model="p.Lastname"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.required">Last Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.fathername.$dirty && Form.fathername.$invalid, 'has-success':Form.fathername.$valid}">
|
||||
<label>
|
||||
Father Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Father Name" tabindex="4" class="form-control" name="fathername" ng-model="p.Fathername"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.required">Father Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.pattern">Invalid Father Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.mothername.$dirty && Form.mothername.$invalid, 'has-success':Form.mothername.$valid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Father Name" tabindex="4" class="form-control" name="fathername" ng-model="p.Fathername"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.required">Father Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.fathername.$dirty && Form.fathername.$error.pattern">Invalid Father Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.mothername.$dirty && Form.mothername.$invalid, 'has-success':Form.mothername.$valid}">
|
||||
<label>
|
||||
Mother Name <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="p.MotherName"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.required">Mother Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
<div class=" col-md-4 form-group" ng-class="{'has-error':Form.emailId.$dirty && Form.emailId.$invalid, 'has-success':Form.emailId.$valid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="p.MotherName"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.required">Mother Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
<div class=" col-md-4 form-group" ng-class="{'has-error':Form.emailId.$dirty && Form.emailId.$invalid, 'has-success':Form.emailId.$valid}">
|
||||
<label>
|
||||
Email ID <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="email" tabindex="6" placeholder="Enter Email ID" class="form-control" name="emailId" ng-pattern="/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i"
|
||||
ng-model="p.EmailID" ng-blur='updateCheckEmailExist(p)' required>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$dirty && Form.primaryEmail.$invalid" ng-hide="Form.emailId.$error.email">Email is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$error.email">Please, enter a valid email address.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid, 'has-success':Form.secondaryPhone.$valid}">
|
||||
<label class="control-label">
|
||||
<input type="email" tabindex="6" placeholder="Enter Email ID" class="form-control" name="emailId" ng-pattern="/^[-a-z0-9~!$%^&*_=+}{\'?]+(\.[-a-z0-9~!$%^&*_=+}{\'?]+)*@([a-z0-9_][-a-z0-9_]*(\.[-a-z0-9_]+)*\.(aero|arpa|biz|com|coop|edu|gov|info|int|mil|museum|name|net|org|pro|travel|mobi|[a-z][a-z])|([0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}))(:[0-9]{1,5})?$/i"
|
||||
ng-model="p.EmailID" ng-blur='updateCheckEmailExist(p)' required>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$dirty && Form.primaryEmail.$invalid" ng-hide="Form.emailId.$error.email">Email is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.emailId.$error.email">Please, enter a valid email address.</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid, 'has-success':Form.secondaryPhone.$valid}">
|
||||
<label class="control-label">
|
||||
Alternate Mobile Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="secondaryPhone" tabindex="7" placeholder="Enter Alternate Mobile Number" class="form-control" ng-model="p.AlternateNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid" ng-hide="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Alternate Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
<input type="text" name="secondaryPhone" tabindex="7" placeholder="Enter Alternate Mobile Number" class="form-control" ng-model="p.AlternateNumber"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$dirty && Form.secondaryPhone.$invalid" ng-hide="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Alternate Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.secondaryPhone.$error.maxlength || Form.secondaryPhone.$error.minlength || Form.secondaryPhone.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofbirth.$dirty && Form.dateofbirth.$invalid, 'has-success':Form.dateofbirth.$valid}">
|
||||
<label>
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofbirth.$dirty && Form.dateofbirth.$invalid, 'has-success':Form.dateofbirth.$valid}">
|
||||
<label>
|
||||
Date Of Birth <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="p.DOB"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Birth" close-text="Close" required="required"
|
||||
ng-change="getMaxEndDate(myModel.startDate)" show-button-bar="false" max-date="currentDate" />
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="p.DOB"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Birth" close-text="Close" required="required" ng-change="getMaxEndDate(myModel.startDate)"
|
||||
show-button-bar="false" max-date="currentDate" />
|
||||
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$error.maxlength">Enter a Valid Date of Birth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.gender.$invalid , 'has-success':Form.gender.$valid}">
|
||||
<label class="block">
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$error.maxlength">Enter a Valid Date of Birth</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.gender.$dirty && Form.gender.$invalid , 'has-success':Form.gender.$valid}">
|
||||
<label class="block">
|
||||
Gender <span class="symbol required"></span>
|
||||
</label>
|
||||
<div class="clip-radio radio-primary">
|
||||
<input type="radio" tabindex="9" id="female" name="gender" value="female" ng-model="p.Gender" required>
|
||||
<label for="female">
|
||||
<div class="clip-radio radio-primary">
|
||||
<input type="radio" tabindex="9" id="female" name="gender" value="female" ng-model="p.Gender" required>
|
||||
<label for="female">
|
||||
Female
|
||||
</label>
|
||||
<input type="radio" id="male" name="gender" value="male" ng-model="p.Gender" required>
|
||||
<label for="male">
|
||||
<input type="radio" id="male" name="gender" value="male" ng-model="p.Gender" required>
|
||||
<label for="male">
|
||||
Male
|
||||
</label>
|
||||
<span class="error text-small block" ng-if="Form.gender.$dirty && Form.gender.$invalid">Gender is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.gender.$dirty && Form.gender.$invalid">Gender is required.</span>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address1.$dirty && Form.address1.$invalid}">
|
||||
<label>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address1.$dirty && Form.address1.$invalid}">
|
||||
<label>
|
||||
Permanent Address
|
||||
</label>
|
||||
<textarea placeholder="Enter Permanent Address" tabindex="10" class="form-control textdsc" name="address1" ng-model="p.PermanentAddress"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address1.$dirty && Form.address1.$invalid">Permanent Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address2.$dirty && Form.address2.$invalid}">
|
||||
<label>
|
||||
<textarea placeholder="Enter Permanent Address" tabindex="10" class="form-control textdsc" name="address1" ng-model="p.PermanentAddress"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address1.$dirty && Form.address1.$invalid">Permanent Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.address2.$dirty && Form.address2.$invalid}">
|
||||
<label>
|
||||
Current Address
|
||||
</label>
|
||||
<textarea placeholder="Enter Current Address" tabindex="11" class="form-control textdsc" name="address2" ng-model="p.PresentAddress"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address2.$dirty && Form.address2.$invalid">Current Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.aadharNumber.$dirty && Form.aadharNumber.$invalid, 'has-success':Form.aadharNumber.$valid}">
|
||||
<label>
|
||||
<textarea placeholder="Enter Current Address" tabindex="11" class="form-control textdsc" name="address2" ng-model="p.PresentAddress"></textarea>
|
||||
<span class="error text-small block" ng-if="Form.address2.$dirty && Form.address2.$invalid">Current Address is required</span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.aadharNumber.$dirty && Form.aadharNumber.$invalid, 'has-success':Form.aadharNumber.$valid}">
|
||||
<label>
|
||||
Aadhar Number <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="aadharNumber" tabindex="12" placeholder="____-____-____" ui-mask="9999-9999-9999" class="form-control"
|
||||
ng-model="p.AadharNumber" ng-minlength="10" ng-maxlength="15" ng-pattern="/^[0-9]*$/"
|
||||
required>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$dirty && Form.aadharNumber.$invalid" ng-hide="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Enter a Valid Aadhar Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="text" name="aadharNumber" tabindex="12" placeholder="____-____-____" ui-mask="9999-9999-9999" class="form-control"
|
||||
ng-model="p.AadharNumber" ng-minlength="10" ng-maxlength="15" ng-pattern="/^[0-9]*$/" required>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$dirty && Form.aadharNumber.$invalid" ng-hide="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.aadharNumber.$error.maxlength || Form.aadharNumber.$error.minlength || Form.aadharNumber.$error.pattern">Enter a Valid Aadhar Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherId.$dirty && Form.otherId.$invalid}">
|
||||
<label>
|
||||
<div class="col-md-4 form-group">
|
||||
<div class="row">
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherId.$dirty && Form.otherId.$invalid}">
|
||||
<label>
|
||||
Other ID
|
||||
</label>
|
||||
<input type="text" name="otherId" tabindex="13" placeholder="Other Id" class="form-control" ng-model="p.OtherID" ng-minlength="1"
|
||||
ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherId.$dirty && Form.otherId.$invalid" ng-hide="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid}">
|
||||
<label>
|
||||
<input type="text" name="otherId" tabindex="13" placeholder="Other Id" class="form-control" ng-model="p.OtherID" ng-minlength="1"
|
||||
ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherId.$dirty && Form.otherId.$invalid" ng-hide="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherId.$error.maxlength || Form.otherId.$error.minlength || Form.otherId.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
<div class="col-md-6 form-group" ng-class="{'has-error':Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid}">
|
||||
<label>
|
||||
Other ID Details
|
||||
</label>
|
||||
<input type="text" name="otherIdDetails" tabindex="14" placeholder="Other Id Details" class="form-control" ng-model="p.OtherIDDetails"
|
||||
ng-minlength="1" ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid" ng-hide="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.caste.$dirty && Form.caste.$invalid}">
|
||||
<label>
|
||||
<input type="text" name="otherIdDetails" tabindex="14" placeholder="Other Id Details" class="form-control" ng-model="p.OtherIDDetails"
|
||||
ng-minlength="1" ng-maxlength="20" ng-pattern="/^[a-zA-Z0-9 ._-]+$/">
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$dirty && Form.otherIdDetails.$invalid" ng-hide="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Aadhar Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.otherIdDetails.$error.maxlength || Form.otherIdDetails.$error.minlength || Form.otherIdDetails.$error.pattern">Enter a Valid Details</span>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.caste.$dirty && Form.caste.$invalid}">
|
||||
<label>
|
||||
Caste
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Caste" tabindex="15" class="form-control" name="caste" ng-model="p.Caste" ng-pattern="/^[a-zA-Z.\s]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.caste.$dirty && Form.caste.$error.pattern">Invalid Caste Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.category.$dirty && Form.category.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Caste" tabindex="15" class="form-control" name="caste" ng-model="p.Caste" ng-pattern="/^[a-zA-Z.\s]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.caste.$dirty && Form.caste.$error.pattern">Invalid Caste Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.category.$dirty && Form.category.$invalid}">
|
||||
<label>
|
||||
Category
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Category" tabindex="16" class="form-control" name="category" ng-model="p.Category"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.category.$dirty && Form.category.$error.pattern">Invalid Category Name </span>
|
||||
</div>
|
||||
</div>
|
||||
<input type="text" placeholder="Enter Category" tabindex="16" class="form-control" name="category" ng-model="p.Category"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.category.$dirty && Form.category.$error.pattern">Invalid Category Name </span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.religion.$dirty && Form.religion.$invalid}">
|
||||
<label>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.religion.$dirty && Form.religion.$invalid}">
|
||||
<label>
|
||||
Religion
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Religion" tabindex="17" class="form-control" name="religion" ng-model="p.Religion"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.religion.$dirty && Form.religion.$error.pattern">Invalid Religion Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.nationality.$dirty && Form.nationality.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Religion" tabindex="17" class="form-control" name="religion" ng-model="p.Religion"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.religion.$dirty && Form.religion.$error.pattern">Invalid Religion Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.nationality.$dirty && Form.nationality.$invalid}">
|
||||
<label>
|
||||
Nationality
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Nationality" tabindex="18" class="form-control" name="nationality" ng-model="p.Nationality"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.nationality.$dirty && Form.nationality.$error.pattern">Invalid Nationality Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.qualificaion.$dirty && Form.qualificaion.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Nationality" tabindex="18" class="form-control" name="nationality" ng-model="p.Nationality"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.nationality.$dirty && Form.nationality.$error.pattern">Invalid Nationality Name </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.qualificaion.$dirty && Form.qualificaion.$invalid}">
|
||||
<label>
|
||||
Pre Qualification
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Qualification" tabindex="19" class="form-control" name="qualificaion" ng-model="p.PreQualification"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.qualificaion.$dirty && Form.qualificaion.$error.pattern">Enter a Valid Qualification</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<input type="text" placeholder="Enter Qualification" tabindex="19" class="form-control" name="qualificaion" ng-model="p.PreQualification"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.qualificaion.$dirty && Form.qualificaion.$error.pattern">Enter a Valid Qualification</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.occupation.$dirty && Form.occupation.$invalid}">
|
||||
<label>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.occupation.$dirty && Form.occupation.$invalid}">
|
||||
<label>
|
||||
Occupation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Occupation" tabindex="20" class="form-control" name="occupation" ng-model="p.Occupation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.occupation.$dirty && Form.occupation.$error.pattern">Invalid Occupation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.designation.$dirty && Form.designation.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Occupation" tabindex="20" class="form-control" name="occupation" ng-model="p.Occupation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.occupation.$dirty && Form.occupation.$error.pattern">Invalid Occupation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.designation.$dirty && Form.designation.$invalid}">
|
||||
<label>
|
||||
Designation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Designation" tabindex="21" class="form-control" name="designation" ng-model="p.Designation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.designation.$dirty && Form.designation.$error.pattern">Invalid Designation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.companyname.$dirty && Form.companyname.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Designation" tabindex="21" class="form-control" name="designation" ng-model="p.Designation"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.designation.$dirty && Form.designation.$error.pattern">Invalid Designation </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.companyname.$dirty && Form.companyname.$invalid}">
|
||||
<label>
|
||||
Company Name
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Company Name" tabindex="22" class="form-control" name="companyname" ng-model="p.Companyname"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.companyname.$dirty && Form.companyname.$error.pattern">Invalid Company </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredby.$dirty && Form.referredby.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Company Name" tabindex="22" class="form-control" name="companyname" ng-model="p.Companyname"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.companyname.$dirty && Form.companyname.$error.pattern">Invalid Company </span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredby.$dirty && Form.referredby.$invalid}">
|
||||
<label>
|
||||
Referred By
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Refer's Name" tabindex="23" class="form-control" name="referredby" ng-model="p.ReferredBy"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.referredby.$dirty && Form.referredby.$error.pattern">Invalid Referred By </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid}">
|
||||
<label>
|
||||
<input type="text" placeholder="Enter Refer's Name" tabindex="23" class="form-control" name="referredby" ng-model="p.ReferredBy"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<span class="error text-small block" ng-if="Form.referredby.$dirty && Form.referredby.$error.pattern">Invalid Referred By </span>
|
||||
</div>
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid}">
|
||||
<label>
|
||||
Refer's Mobile Number
|
||||
</label>
|
||||
<input type="text" name="referredmobilenumber" tabindex="24" placeholder="Enter Refer's Mobile Number" class="form-control"
|
||||
ng-model="p.ReferersMobileNumber" ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid" ng-hide="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Refer's Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
<input type="text" name="referredmobilenumber" tabindex="24" placeholder="Enter Refer's Mobile Number" class="form-control"
|
||||
ng-model="p.ReferersMobileNumber" ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$dirty && Form.referredmobilenumber.$invalid" ng-hide="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Refer's Mobile Number is required.</span>
|
||||
<span class="error text-small block" ng-if="Form.referredmobilenumber.$error.maxlength || Form.referredmobilenumber.$error.minlength || Form.referredmobilenumber.$error.pattern">Enter a Valid Phone Number</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
<div ng-if="p.IsActive==true">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
<div ng-if="p.IsActive==true">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = true" class="green"></switch>
|
||||
</div>
|
||||
<div ng-if="p.IsActive==false">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
</div>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<img class="thumb prof" ng-src="images/{{p.ProfilePicPath}}" />
|
||||
<style>
|
||||
.thumb {
|
||||
width: 130px;
|
||||
height: 140px;
|
||||
margin: 18px;
|
||||
float: left;
|
||||
}
|
||||
.prof {
|
||||
border: 2px solid #2C3543;
|
||||
}
|
||||
.uploader {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
<div class="col-md-6">
|
||||
<form name="Form" id="form1" novalidate ng-submit="form.submit(Form,myModel)" method="post">
|
||||
<div class="file-upload">
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<h5>Update Profile Picture</h5>
|
||||
<div class=" margin-bottom-5">
|
||||
|
||||
</div>
|
||||
<div ng-if="p.IsActive==false">
|
||||
<switch ng-model="p.IsActive" ng-init="p.IsActive = false" class="green"></switch>
|
||||
<input type="file" accept="image/*" ng-init="resetImageEdit()" file-upload-edit onchange="angular.element(this).scope().imageUploadEdit(event)"
|
||||
/>
|
||||
</div>
|
||||
<div class="col-md-2">
|
||||
<div class="form-group">
|
||||
<div class="user-image">
|
||||
</div>
|
||||
<!--<input type="file" file-model="idProof"
|
||||
accept="image/*" onchange="angular.element(this).scope().imageUpload(event)"/>-->
|
||||
|
||||
<div>
|
||||
<div ng-repeat="step in stepsModelEdit">
|
||||
<!--<a class="close-thin"></a>-->
|
||||
<img class="thumb" ng-src="{{step}}" />
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-success btn-o btn-sm margin-right-15" type="button" ng-click="resetImageEdit()">Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<style>
|
||||
.thumb {
|
||||
width: 130px;
|
||||
height: 140px;
|
||||
margin: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.uploader {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<pre>{{ p | json}}</pre>-->
|
||||
<input type="hidden" ng-init="hidden_DOB=p.DOB" ng-model="hidden_DOB">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="button" ladda="ldloading1.zoom_in" tabindex="19" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateStuDetails(Form, p, hidden_DOB)">
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<!--<pre>{{ p | json}}</pre>-->
|
||||
<input type="hidden" ng-init="hidden_DOB=p.DOB" ng-model="hidden_DOB">
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="button" ladda="ldloading1.zoom_in" tabindex="19" class="btn btn-wide btn-success" data-style="zoom-in" ng-click="updateStuDetails(Form, p, hidden_DOB)">
|
||||
Save
|
||||
</button>
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="20" ng-click="cancel()">
|
||||
<button type="reset" class="btn btn-warning btn-wide" tabindex="20" ng-click="cancel()">
|
||||
Cancel
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--<fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--<fieldset>
|
||||
<legend>
|
||||
Branch Details
|
||||
</legend>
|
||||
@ -370,17 +433,17 @@
|
||||
</div>
|
||||
</fieldset>-->
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-md-12">
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<input type="button" class="btn btn-warning btn-wide" tabindex="9" value="Cancel"
|
||||
ng-click="cancel();">
|
||||
</input>
|
||||
</div>
|
||||
</div>-->
|
||||
<!--</fieldset>-->
|
||||
</div>
|
||||
<!--</fieldset>-->
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
<!-- class="editRowTd" -->
|
||||
<!-- class="editRowTd" -->
|
||||
@ -16,8 +16,14 @@
|
||||
<div class="container-fluid container-fullw">
|
||||
<div class="row">
|
||||
<div ng-if="loader == true" class="col-md-12" align="center">
|
||||
<spinner name="html5spinner"> <div class="overlay"></div> <div class="spinner"> <div class="double-bounce1"></div> <div class="double-bounce2"></div> </div> <div class="please-wait">Please Wait...</div>
|
||||
</spinner>
|
||||
<spinner name="html5spinner">
|
||||
<div class="overlay"></div>
|
||||
<div class="spinner">
|
||||
<div class="double-bounce1"></div>
|
||||
<div class="double-bounce2"></div>
|
||||
</div>
|
||||
<div class="please-wait">Please Wait...</div>
|
||||
</spinner>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="studentData == false" style="min-height: 281px;">
|
||||
@ -26,7 +32,7 @@
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="studentData == true">
|
||||
<div class="row">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<script>
|
||||
$(function () {
|
||||
@ -128,7 +134,7 @@
|
||||
First Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter First Name" tabindex="2" class="form-control" name="firstname" ng-model="myModel.firstname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.required">First Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.firstname.$dirty && Form.firstname.$error.pattern">Invalid First Name </span>
|
||||
</div>
|
||||
@ -137,7 +143,7 @@
|
||||
Last Name <span class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" placeholder="Enter Last Name" tabindex="3" class="form-control" name="lastname" ng-model="myModel.lastname"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.required">Last Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.lastname.$dirty && Form.lastname.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
@ -158,7 +164,7 @@
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Mother Name" tabindex="5" class="form-control" name="mothername" ng-model="myModel.mothername"
|
||||
ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" required/>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.required">Mother Name required</span>
|
||||
<span class="error text-small block" ng-if="Form.mothername.$dirty && Form.mothername.$error.pattern">Invalid Last Name </span>
|
||||
</div>
|
||||
@ -192,7 +198,8 @@
|
||||
<input type="text" tabindex="8" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModel.dateofbirth"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofbirth" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Birth" close-text="Close" required="required"
|
||||
ng-change="getMaxEndDate(myModel.startDate)" show-button-bar="false" max-date="currentDate" />
|
||||
ng-change="getMaxEndDate(myModel.startDate)" show-button-bar="false" max-date="currentDate"
|
||||
/>
|
||||
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofbirth.$dirty && Form.dateofbirth.$invalid" ng-hide="Form.dateofbirth.$error.maxlength">Date of Birth is required.</span>
|
||||
@ -372,7 +379,7 @@
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
@ -389,7 +396,51 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4">
|
||||
<form name="Form" id="form1" novalidate ng-submit="form.submit(Form,myModel)" method="post">
|
||||
<div class="file-upload">
|
||||
<div class="row">
|
||||
<div class="col-md-6">
|
||||
<div class="form-group">
|
||||
<div class="user-image">
|
||||
<h5>Profile Picture</h5>
|
||||
<div class=" margin-bottom-5">
|
||||
</div>
|
||||
</div>
|
||||
<!--<input type="file" file-model="idProof"
|
||||
accept="image/*" onchange="angular.element(this).scope().imageUpload(event)"/>-->
|
||||
<div>
|
||||
<div ng-repeat="step in stepsModel">
|
||||
<!--<a class="close-thin"></a>-->
|
||||
<img class="thumb" ng-src="{{step}}" />
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button class="btn btn-success btn-o btn-sm margin-right-15" type="button" ng-click="resetImage()">Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<input type="file" ng-init="resetImage()" accept="image/*" file-upload onchange="angular.element(this).scope().imageUpload(event)"
|
||||
/>
|
||||
<style>
|
||||
.thumb {
|
||||
width: 130px;
|
||||
height: 140px;
|
||||
margin: 18px;
|
||||
float: left;
|
||||
}
|
||||
|
||||
.uploader {
|
||||
clear: both;
|
||||
}
|
||||
</style>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
<!--<div class="row">
|
||||
<div class="col-md-12">
|
||||
@ -459,55 +510,56 @@
|
||||
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.enrollmentid.$dirty && Form.enrollmentid.$invalid}">
|
||||
<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.enrollmentid.$dirty && Form.enrollmentid.$invalid}">
|
||||
<label>
|
||||
Enrollment ID
|
||||
</label>
|
||||
<input type="text" name="enrollmentid" tabindex="27" placeholder="Enter Entollment ID" class="form-control"
|
||||
ng-model="myModelCourseAdd.enrollmentid"
|
||||
<input type="text" name="enrollmentid" tabindex="27" placeholder="Enter Entollment ID" class="form-control" ng-model="myModelCourseAdd.enrollmentid"
|
||||
/>
|
||||
<span class="error text-small block" ng-if="Form.enrollmentid.$dirty && Form.enrollmentid.$error.required">Enrollment ID required</span>
|
||||
</div>
|
||||
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.dateofjoining.$dirty && Form.dateofjoining.$invalid, 'has-success':Form.dateofjoining.$valid}">
|
||||
<label>
|
||||
Date of Joining <span class="symbol required"></span>
|
||||
</label>
|
||||
<style>
|
||||
.dropdown-menu {
|
||||
position: relative;
|
||||
/*top: -225px !important;*/
|
||||
}
|
||||
<style>
|
||||
.dropdown-menu {
|
||||
position: relative;
|
||||
/*top: -225px !important;*/
|
||||
}
|
||||
</style>
|
||||
<input type="text" tabindex="28" class="form-control" ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModelCourseAdd.dateofjoining"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" datepicker-position="top"/>
|
||||
|
||||
placeholder="Select Date of Joining" close-text="Close" required="required" datepicker-position="top"
|
||||
/>
|
||||
|
||||
<span class="error text-small block" ng-if="Form.dateofjoining.$dirty && Form.dateofjoining.$error.required">Date of Joining required</span>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ng-disabled="disableButton" tabindex="30" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" ng-disabled="disableButton" tabindex="30" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success"
|
||||
data-style="zoom-in">
|
||||
Submit
|
||||
</button>
|
||||
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
|
||||
<button type="reset" tabindex="31" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.resetCourse(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
<!--<pre> {{ myModel | json }}</pre>
|
||||
<pre> {{ myModelCourse | json }}</pre>-->
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
BIN
Apollo/images/student/default.jpeg
Normal file
BIN
Apollo/images/student/default.jpeg
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 3.1 KiB |
Loading…
Reference in New Issue
Block a user