student pages added
This commit is contained in:
parent
a121f05f1f
commit
a04c662cc8
@ -195,14 +195,14 @@ class Employee_model extends CI_Model
|
||||
$results['branch_details'] = $mBranchDetails->result();
|
||||
} else {
|
||||
// res for Admin
|
||||
$staffId = $this->selfGetEmpId($reqUserID);
|
||||
$subQuery = "SELECT t1.BranchCode, t1.BranchName
|
||||
FROM T_BranchMaster as t1
|
||||
LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId'
|
||||
WHERE t2.BranchCode = t1.BranchCode
|
||||
AND t1.IsActive = 1
|
||||
AND t2.IsActive = 1";
|
||||
$mBranchDetails = $this->db->query($subQuery);
|
||||
$staffId = $this->selfGetEmpId($reqUserID);
|
||||
$subQuery = "SELECT t1.BranchCode, t1.BranchName
|
||||
FROM T_BranchMaster as t1
|
||||
LEFT JOIN T_Staff_BranchAccess as t2 ON t2.StaffID = '$staffId'
|
||||
WHERE t2.BranchCode = t1.BranchCode
|
||||
AND t1.IsActive = 1
|
||||
AND t2.IsActive = 1";
|
||||
$mBranchDetails = $this->db->query($subQuery);
|
||||
$results['MeasterBranchDetailStatus'] = true;
|
||||
$results['branch_details'] = $mBranchDetails->result();
|
||||
}
|
||||
@ -360,23 +360,30 @@ class Employee_model extends CI_Model
|
||||
// get employee branch details
|
||||
public function get_employee_branch($staffId)
|
||||
{
|
||||
$this->db->select('t1.BranchCode, t1.BranchName');
|
||||
$this->db->from('' . BRANCH . ' as t1');
|
||||
$this->db->join('' . STAFF_BRANCH . ' as t2', 't2.BranchCode = t1.BranchCode', 'LEFT');
|
||||
$this->db->where('t2.StaffID', $staffId);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->where('t1.IsActive', 1);
|
||||
$branchDetails = $this->db->get();
|
||||
$checkArr = $branchDetails->result();
|
||||
$this->db->select('t3.ListCode, t3.ListName');
|
||||
$this->db->from('' . PICK_LIST_DETAILS . ' as t3');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT');
|
||||
$this->db->where('t4.StaffID', $staffId);
|
||||
$roleDetails = $this->db->get();
|
||||
$checkArr = $roleDetails->result();
|
||||
if (count($checkArr) > 0) {
|
||||
$this->db->select('t3.ListCode, t3.ListName');
|
||||
$this->db->from('' . PICK_LIST_DETAILS . ' as t3');
|
||||
$this->db->join('' . STAFF . ' as t4', 't4.ListCode = t3.ListCode', 'LEFT');
|
||||
$this->db->where('t4.StaffID', $staffId);
|
||||
$roleDetails = $this->db->get();
|
||||
$result['empBranchDetails'] = true;
|
||||
$result['role_details'] = $roleDetails->result();
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
$this->db->select('t1.BranchCode, t1.BranchName');
|
||||
$this->db->from('' . BRANCH . ' as t1');
|
||||
$this->db->join('' . STAFF_BRANCH . ' as t2', 't2.BranchCode = t1.BranchCode', 'LEFT');
|
||||
$this->db->where('t2.StaffID', $staffId);
|
||||
$this->db->where('t2.IsActive', 1);
|
||||
$this->db->where('t1.IsActive', 1);
|
||||
$branchDetails = $this->db->get();
|
||||
$branchArr = $branchDetails->result();
|
||||
if( count($branchArr) > 0 ) {
|
||||
$result['empBranchDetails'] = true;
|
||||
$result['role_details'] = $roleDetails->result();
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
} else {
|
||||
$result['empBranchDetails'] = true;
|
||||
$result['role_details'] = $roleDetails->result();
|
||||
$result['branch_details'] = $branchDetails->result();
|
||||
}
|
||||
} else {
|
||||
$result['empBranchDetails'] = false;
|
||||
}
|
||||
|
||||
@ -69,7 +69,8 @@
|
||||
"student": {
|
||||
"MAIN": "STUDENTS DETAILS",
|
||||
"LISTING": "STUDENTS LISTING",
|
||||
"ENROLLMENT": "STUDENT ENROLLMENT"
|
||||
"ENROLLMENT": "STUDENT ENROLLMENT",
|
||||
"STUDENTDETAILS": "STUDENT DETAILS"
|
||||
},
|
||||
"status": {
|
||||
"MAIN": "STATUS",
|
||||
|
||||
@ -91,6 +91,10 @@ app.constant('JS_REQUIRES', {
|
||||
Activity
|
||||
* */
|
||||
'activityCtrl': 'assets/js/controllers/activityCtrl.js',
|
||||
/* *
|
||||
Student
|
||||
* */
|
||||
'studentCtrl': 'assets/js/controllers/studentCtrl.js',
|
||||
|
||||
|
||||
/*
|
||||
|
||||
@ -142,10 +142,10 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
// resolve: loadSequence('iconsCtrl')
|
||||
}).state('app.student', {
|
||||
url: '/student',
|
||||
template: '<div ui-view class="fade-in-up"></div>',
|
||||
title: 'Tables',
|
||||
template: '<div ui-view class="fade-in-up"> <div style="margin: auto; width: 50%;padding: 10px;"> STUDENT DETAILS </div> </div>',
|
||||
title: 'Student',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Tables'
|
||||
label: 'Student'
|
||||
}
|
||||
}).state('app.student.listing', {
|
||||
url: '/basic',
|
||||
@ -154,12 +154,13 @@ app.config(['$stateProvider', '$urlRouterProvider', '$controllerProvider', '$com
|
||||
ncyBreadcrumb: {
|
||||
label: 'Basic'
|
||||
}
|
||||
}).state('app.student.enrollment', {
|
||||
url: '/responsive',
|
||||
templateUrl: "assets/views/table_responsive.html",
|
||||
title: 'Responsive Tables',
|
||||
}).state('app.student.studentDetails', {
|
||||
url: '/studentDetails',
|
||||
templateUrl: "assets/views/student/student_details.html",
|
||||
resolve: loadSequence('ui.select','spin', 'ui.mask', 'ladda', 'angular-ladda', 'studentCtrl', 'ngTable'),
|
||||
title: 'Student Details',
|
||||
ncyBreadcrumb: {
|
||||
label: 'Responsive'
|
||||
label: 'Student Details'
|
||||
}
|
||||
}).state('app.status', {
|
||||
url: '/status',
|
||||
|
||||
164
Apollo/assets/js/controllers/studentCtrl.js
Normal file
164
Apollo/assets/js/controllers/studentCtrl.js
Normal file
@ -0,0 +1,164 @@
|
||||
'use strict';
|
||||
/**
|
||||
* controllers for ng-table
|
||||
* 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) {
|
||||
/**
|
||||
* student details capture
|
||||
* by : kdk
|
||||
*/
|
||||
$scope.myModel = {
|
||||
'primaryPhone': '',
|
||||
'firstname': '',
|
||||
'lastname': '',
|
||||
'fathername': '',
|
||||
'mothername': '',
|
||||
'emailId': '',
|
||||
'secondaryPhone': '',
|
||||
'dateofbirth': '',
|
||||
'gender': '',
|
||||
'aadharNumber': '',
|
||||
'otherId': '',
|
||||
'otherIdDetails': '',
|
||||
'address1': '',
|
||||
'address2': '',
|
||||
'caste': '',
|
||||
'category': '',
|
||||
'religion': '',
|
||||
'nationality': '',
|
||||
'prequalification': '',
|
||||
'occupation': '',
|
||||
'designation': '',
|
||||
'companyname': '',
|
||||
'referredby': '',
|
||||
'referredmobilenumber': '',
|
||||
'switchsetting': true,
|
||||
};
|
||||
var data = '';
|
||||
$scope.roleDetails = '';
|
||||
$scope.branchDetails = '';
|
||||
$scope.employeeDetails = '';
|
||||
$scope.loader = false;
|
||||
$scope.emptyData;
|
||||
// 2017-11-23T00:00:00+0530
|
||||
// sorting function for table params
|
||||
$scope.sort = function (keyname) {
|
||||
$scope.sortKey = keyname; //set the sortKey to the param passed
|
||||
$scope.reverse = !$scope.reverse; //if true make it false and vice versa
|
||||
}
|
||||
|
||||
// get local cliend details
|
||||
var localDetail = JSON.parse(localStorage.getItem('localObj'));
|
||||
var localDetails = ipCookie('cookiechk');
|
||||
|
||||
// load when html page load
|
||||
$scope.init = function () {
|
||||
if (localDetail != null) {
|
||||
$scope.currentDate = new Date();
|
||||
// $scope.currentPage = 1;
|
||||
} else {
|
||||
}
|
||||
}
|
||||
|
||||
$scope.editId = -1;
|
||||
$scope.editBranchId = -1;
|
||||
$scope.setEditId = function (id) {
|
||||
$scope.editId = id;
|
||||
$scope.editBranchId = -1;
|
||||
}
|
||||
|
||||
$scope.setEditBranchId = function (id) {
|
||||
$scope.getEmpBranchDetails(id);
|
||||
$scope.editBranchId = id;
|
||||
$scope.editId = -1;
|
||||
$scope.branchEditLoading = true;
|
||||
}
|
||||
|
||||
$scope.cancel = function () {
|
||||
$scope.getEmployeeList();
|
||||
$scope.editId = -1;
|
||||
$scope.editBranchId = -1;
|
||||
}
|
||||
|
||||
$scope.empBranchDetails = '';
|
||||
$scope.empRoleDetail = '';
|
||||
|
||||
// add empolyee
|
||||
$scope.studentFORM = {
|
||||
submit: function (form, myModel) {
|
||||
var firstError = null;
|
||||
if (form.$invalid) {
|
||||
alert('error');
|
||||
var field = null, firstError = null;
|
||||
for (field in form) {
|
||||
if (field[0] != '$') {
|
||||
if (firstError === null && !form[field].$valid) {
|
||||
firstError = form[field].$name;
|
||||
}
|
||||
if (form[field].$pristine) {
|
||||
form[field].$dirty = true;
|
||||
}
|
||||
}
|
||||
}
|
||||
angular.element('.ng-invalid[name=' + firstError + ']').focus();
|
||||
// swal("The form cannot be submitted because it contains validation errors!", "Errors are marked with a red, dashed border!", "error");
|
||||
} else {
|
||||
alert('ok');
|
||||
// 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.myModel.dateofjoining = $filter('date')(new Date($scope.myModel.dateofjoining), formate);
|
||||
// var req = {
|
||||
// method: 'POST',
|
||||
// url: apiPoint.url + 'insertEmployee/',
|
||||
// headers: {
|
||||
// 'Content-Type': 'application/json'
|
||||
// },
|
||||
// data: {
|
||||
// data: $scope.myModel,
|
||||
// createdBy: localDetails.localUserID,
|
||||
// }
|
||||
// };
|
||||
// $http(req).then(function (response) {
|
||||
// if (response.data.addEmpStatus == true) {
|
||||
// swal("Success!", response.data.message, "success");
|
||||
// $state.go($state.current, {}, { reload: true });
|
||||
// } else {
|
||||
// swal("Failed!", response.data.message, "error");
|
||||
// }
|
||||
// });
|
||||
}
|
||||
},
|
||||
reset: function (form) {
|
||||
|
||||
// $scope.myModel = angular.copy($scope.master);
|
||||
form.$setPristine(true);
|
||||
$scope.myModel = {
|
||||
'employeeId': '',
|
||||
'firstname': '',
|
||||
'lastname': '',
|
||||
'fathername': '',
|
||||
'mothername': '',
|
||||
'emailId': '',
|
||||
'primaryPhone': '',
|
||||
'secondaryPhone': '',
|
||||
'dateofbirth': '',
|
||||
'gender': '',
|
||||
'qualificaion': '',
|
||||
'aadharNumber': '',
|
||||
'otherId': '',
|
||||
'otherIdDetails': '',
|
||||
'address1': '',
|
||||
'address2': '',
|
||||
'homeBranch': '',
|
||||
'dateofjoining': '',
|
||||
'dateofjoining': '',
|
||||
'role': '',
|
||||
'switchsetting': true,
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
}]);
|
||||
@ -67,9 +67,9 @@ function (cfpLoadingBarProvider) {
|
||||
cfpLoadingBarProvider.includeSpinner = false;
|
||||
}]);
|
||||
|
||||
app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", function ($scope, $localStorage, $state) {
|
||||
/**
|
||||
* checking the session settings and logout for the function
|
||||
*/
|
||||
// app.controller('sessionCtrl', ["$scope", "$localStorage", "$state", function ($scope, $localStorage, $state) {
|
||||
// /**
|
||||
// * checking the session settings and logout for the function
|
||||
// */
|
||||
|
||||
}]);
|
||||
// }]);
|
||||
|
||||
@ -57,6 +57,25 @@
|
||||
|
||||
</ul>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.student')}">
|
||||
<a href="javascript:void(0)">
|
||||
<div class="item-content">
|
||||
<div class="item-media">
|
||||
<i class="ti-user"></i>
|
||||
</div>
|
||||
<div class="item-inner">
|
||||
<span class="title" translate="sidebar.nav.student.MAIN"> STUDENT </span><i class="icon-arrow"></i>
|
||||
</div>
|
||||
</div>
|
||||
</a>
|
||||
<ul class="sub-menu">
|
||||
<li ui-sref-active="active">
|
||||
<a ui-sref="app.student.studentDetails">
|
||||
<span class="title" translate="sidebar.nav.student.STUDENTDETAILS"> STUDENT DETAILS </span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li ng-class="{'active open':$state.includes('app.tracking')}">
|
||||
<a ui-sref="app.tracking">
|
||||
<div class="item-content">
|
||||
|
||||
472
Apollo/assets/views/student/student_details.html
Normal file
472
Apollo/assets/views/student/student_details.html
Normal file
@ -0,0 +1,472 @@
|
||||
<!-- start: STUDENT TITLE -->
|
||||
<section id="page-title">
|
||||
<div class="row">
|
||||
<div class="col-sm-8">
|
||||
<h1 class="mainTitle" translate="View/Add Student Details">{{ mainTitle }}</h1>
|
||||
</div>
|
||||
<div ncy-breadcrumb></div>
|
||||
</div>
|
||||
</section>
|
||||
<!-- end: STUDENT TITLE -->
|
||||
<!-- start: LIST GROUP -->
|
||||
<div class="container-fluid container-fullw bg-white">
|
||||
<div class="row" ng-controller="studentCtrl" data-ng-init="init()">
|
||||
<tabset class="tabbable">
|
||||
<!--<tab heading="View Employee" id="employeebranch">
|
||||
<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>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="emptyData == false" style="min-height: 281px;">
|
||||
<p style="color: red;" align="center"><strong><h3 class="text-center">No
|
||||
records found... </h3></strong></p>
|
||||
</div>
|
||||
|
||||
<div class="col-md-12" ng-if="emptyData == true">
|
||||
<div class="row">
|
||||
<div class="col-md-3">
|
||||
<script>
|
||||
$(function () {
|
||||
$("#search").focus();
|
||||
});
|
||||
</script>
|
||||
<input class="form-control" type="text" ng-model="search" id="search" autofocus tabindex="1" placeholder="Search" /><br><br>
|
||||
</div>
|
||||
</div>
|
||||
<div class="table-responsive">
|
||||
<table class="table table-hover">
|
||||
<thead>
|
||||
<tr>
|
||||
<th ng-click="sort('StaffID')">Staff Id
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='StaffID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('Firstname')">First Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Firstname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('Lastname')">Last Name
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Lastname'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('MobileNumber')">MobileNumber
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='MobileNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th ng-click="sort('EmailID')">Email ID
|
||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||
</th>
|
||||
<th style="text-align: center;"> Details
|
||||
</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
|
||||
<tr>
|
||||
<td>{{p.StaffID}}</td>
|
||||
<td>{{p.Firstname}}</td>
|
||||
<td>{{p.Lastname}}</td>
|
||||
<td>{{p.MobileNumber}}</td>
|
||||
<td>{{p.EmailID}}</td>
|
||||
<td style="text-align: center;">
|
||||
<input type=button class="btn btn-info btn-xs" ladda="ldloading1.zoom_in" id="editRowBtn{{p.StaffID}}" value="Personal Details"
|
||||
ng-click="setEditId(p.StaffID);">
|
||||
<input type=button class="btn btn-blue btn-xs" id="editBranchRowBtn{{p.StaffID}}" value="Branch Details" ng-click="setEditBranchId(p.StaffID);">
|
||||
</td>
|
||||
</tr>
|
||||
<tr ng-show="editId === p.StaffID" ng-if="editId === p.StaffID">
|
||||
<td colspan="6" ng-include src="'assets/views/editEmployeeDetails.html'"></td>
|
||||
</tr>
|
||||
<tr ng-show="editBranchId === p.StaffID" ng-if="editBranchId === p.StaffID">
|
||||
<td colspan="6" ng-include src="'assets/views/editEmployeeBranchDetails.html'"></td>
|
||||
</tr>
|
||||
</tbody>
|
||||
|
||||
</table>
|
||||
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
|
||||
</dir-pagination-controls>
|
||||
|
||||
</div>
|
||||
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</tab>-->
|
||||
<script>
|
||||
$('#addbranch').click(function () {
|
||||
$('#branchcode').focus();
|
||||
});
|
||||
</script>
|
||||
<style>
|
||||
.sort-icon {
|
||||
font-size: 9px;
|
||||
margin-left: 5px;
|
||||
}
|
||||
|
||||
th {
|
||||
cursor: pointer;
|
||||
}
|
||||
</style>
|
||||
|
||||
|
||||
<tab heading="Add Student" id="addstudent">
|
||||
<div>
|
||||
<form name="Form" id="form" novalidate ng-submit="studentFORM.submit(Form, myModel)" method="post">
|
||||
<div class="row">
|
||||
<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>
|
||||
Mobile Number <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" name="primaryPhone" tabindex="7" placeholder="Enter Mobile Number" class="form-control" ng-model="myModel.primaryPhone"
|
||||
ng-minlength="10" ng-maxlength="12" ng-pattern="/^[0-9]*$/" ng-blur='checkMobileExist()'
|
||||
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="myModel.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>
|
||||
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/>
|
||||
<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="myModel.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="myModel.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>
|
||||
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="myModel.emailId" ng-blur='checkEmailExist()' 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="8" placeholder="Enter Alternate Mobile Number" class="form-control" ng-model="myModel.secondaryPhone"
|
||||
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>
|
||||
Date Of Birth <span
|
||||
class="symbol required"></span>
|
||||
</label>
|
||||
<input type="text" tabindex="9" 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)" 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">
|
||||
Gender <span class="symbol required"></span>
|
||||
</label>
|
||||
<div class="clip-radio radio-primary">
|
||||
<input type="radio" tabindex="10" id="female" name="gender" value="female" ng-model="myModel.gender" required>
|
||||
<label for="female">
|
||||
Female
|
||||
</label>
|
||||
<input type="radio" id="male" name="gender" value="male" ng-model="myModel.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>
|
||||
|
||||
</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="15" class="form-control textdsc" name="address1" ng-model="myModel.address1"></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="16" class="form-control textdsc" name="address2" ng-model="myModel.address2"></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="myModel.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>
|
||||
Other ID
|
||||
</label>
|
||||
<input type="text" name="otherId" tabindex="13" placeholder="Other Id" class="form-control" ng-model="myModel.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="myModel.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="4" class="form-control" name="caste" ng-model="myModel.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="4" class="form-control" name="category" ng-model="myModel.category"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<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="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="4" class="form-control" name="religion" ng-model="myModel.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="4" class="form-control" name="nationality" ng-model="myModel.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="11" class="form-control" name="qualificaion" ng-model="myModel.prequalification"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<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>
|
||||
Occupation
|
||||
</label>
|
||||
|
||||
<input type="text" placeholder="Enter Occupation" tabindex="4" class="form-control" name="occupation" ng-model="myModel.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="4" class="form-control" name="designation" ng-model="myModel.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="4" class="form-control" name="companyname" ng-model="myModel.companyname"
|
||||
ng-pattern="/^[a-zA-Z.\s]*$/" />
|
||||
<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="4" class="form-control" name="referredby" ng-model="myModel.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 No
|
||||
</label>
|
||||
<input type="text" name="referredmobilenumber" tabindex="8" placeholder="Enter Refer's Mobile No" class="form-control" ng-model="myModel.referredmobilenumber"
|
||||
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>
|
||||
<pre> {{ myModel | json }}</pre>
|
||||
</fieldset>
|
||||
<fieldset>
|
||||
<legend>
|
||||
Course Details
|
||||
</legend>
|
||||
<!--<div class="row">
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.homeBranch.$dirty && Form.homeBranch.$invalid, 'has-success':Form.homeBranch.$valid}">
|
||||
<label for="form-field-select-2">
|
||||
Home Branch <span class="symbol required"></span>
|
||||
</label>
|
||||
|
||||
<select class="form-control" tabindex="17" class="cs-select cs-skin-elastic" name="homeBranch" ng-model="myModel.homeBranch"
|
||||
required>
|
||||
<option value="" disabled selected>Select Home Branch</option>
|
||||
<option ng-repeat="item in branchDetails" value="{{item.BranchCode}}">{{item.BranchName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.homeBranch.$dirty && Form.homeBranch.$error.required">Home Branch is Required</span>
|
||||
</div>
|
||||
|
||||
<div data-ng-controller="DatepickerDemoCtrl">
|
||||
<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>
|
||||
<input type="text" tabindex="18" class="form-control " ng-click="startOpen = !startOpen" datepicker-popup="dd-MM-yyyy" ng-model="myModel.dateofjoining"
|
||||
is-open="startOpen" ng-init="startOpen = false" name="dateofjoining" datepicker-options="dateOptions"
|
||||
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 required</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<div class="col-md-4 form-group" ng-class="{'has-error':Form.role.$dirty && Form.role.$invalid, 'has-success':Form.role.$valid}">
|
||||
<label>
|
||||
Role <span class="symbol required"></span>
|
||||
</label>
|
||||
<select class="form-control" tabindex="19" name="role" ng-model="myModel.role" class="cs-select cs-skin-elastic" required>
|
||||
<option value="" disabled selected>Select Role</option>
|
||||
<option ng-repeat="item in roleDetails" value="{{item.ListCode}}">{{item.ListName}}</option>
|
||||
</select>
|
||||
<span class="error text-small block" ng-if="Form.role.$dirty && Form.role.$error.required">Role is required</span>
|
||||
</div>
|
||||
</div>-->
|
||||
<div class="row">
|
||||
<div class="col-md-4">
|
||||
<label>
|
||||
Active/De-Active
|
||||
</label>
|
||||
|
||||
<div ng-switch="myModel.switchsetting">
|
||||
<div ng-switch-when="true">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
</div>
|
||||
<div ng-switch-when="false">
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = false" class="green"></switch>
|
||||
</div>
|
||||
<div ng-switch-default>
|
||||
<switch ng-model="myModel.switchsetting" ng-init="myModel.switchsetting = true" class="green"></switch>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="row">
|
||||
<div class="col-md-12">
|
||||
<div class="pull-right">
|
||||
<button type="submit" tabindex="21" ladda="ldloading1.zoom_in" class="btn btn-wide btn-success" data-style="zoom-in">
|
||||
Submit
|
||||
</button>
|
||||
<button type="reset" tabindex="22" class="btn btn-warning btn-wide" tabindex="9" ng-click="employeeForm.reset(Form)">
|
||||
Reset
|
||||
</button>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</fieldset>
|
||||
</div>
|
||||
</div>
|
||||
</form>
|
||||
</div>
|
||||
</tab>
|
||||
</tabset>
|
||||
</div>
|
||||
</div>
|
||||
<!-- end: LIST GROUP -->
|
||||
Loading…
Reference in New Issue
Block a user