course controller added
This commit is contained in:
parent
2d37383008
commit
e8aaeafb46
@ -52,51 +52,35 @@
|
|||||||
<table class="table table-hover">
|
<table class="table table-hover">
|
||||||
<thead>
|
<thead>
|
||||||
<tr>
|
<tr>
|
||||||
<th ng-click="sort('BranchCode')">Course ID
|
<th ng-click="sort('CourseID')">Course ID
|
||||||
<span class="glyphicon sort-icon" ng-show="sortKey=='BranchCode'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||||
</th>
|
</th>
|
||||||
<th ng-click="sort('BranchName')">Course Name
|
<th ng-click="sort('CourseName')">Course Name
|
||||||
<span class="glyphicon sort-icon" ng-show="sortKey=='BranchName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||||
</th>
|
</th>
|
||||||
<th ng-click="sort('Address')">University
|
<th ng-click="sort('UniversityName')">University
|
||||||
<span class="glyphicon sort-icon" ng-show="sortKey=='Address'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
||||||
</th>
|
</th>
|
||||||
<!-- <th ng-click="sort('EmailID')">Email Id
|
<th></th>
|
||||||
<span class="glyphicon sort-icon" ng-show="sortKey=='EmailID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
|
||||||
</th>
|
|
||||||
<th ng-click="sort('MobileNumber')">Mobile Number
|
|
||||||
<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('AlternateNumber')">Alternate Mobile
|
|
||||||
<span class="glyphicon sort-icon" ng-show="sortKey=='AlternateNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
|
||||||
</th>
|
|
||||||
<th ng-click="sort('LandlineNumber')">Landline Number
|
|
||||||
<span class="glyphicon sort-icon" ng-show="sortKey=='LandlineNumber'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
|
|
||||||
</th>
|
|
||||||
<th>
|
|
||||||
</th>-->
|
|
||||||
</tr>
|
</tr>
|
||||||
</thead>
|
</thead>
|
||||||
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:5">
|
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:5">
|
||||||
<tr>
|
<tr>
|
||||||
<td>{{p.BranchCode}}</td>
|
<td>{{p.CourseID}}</td>
|
||||||
<td>{{p.BranchName}}</td>
|
<td>{{p.CourseName}}</td>
|
||||||
<td>{{p.Address}}</td>
|
<td>{{p.UniversityName}}</td>
|
||||||
<!-- <td>{{p.EmailID}}</td>
|
|
||||||
<td>{{p.MobileNumber}}</td>
|
|
||||||
<td>{{p.AlternateNumber}}</td>
|
|
||||||
<td>{{p.LandlineNumber}}</td>
|
|
||||||
<td>
|
|
||||||
<div class="pull-right margin-right-10">
|
|
||||||
<input type=button class="btn btn-info btn-sm"
|
|
||||||
id="editRowBtn{{p.BranchCode}}" value="Modify"
|
|
||||||
ng-click="setEditId(p.BranchCode);">
|
|
||||||
</div></td>-->
|
|
||||||
|
|
||||||
|
<td>
|
||||||
|
<input type=button class="btn btn-info btn-sm"
|
||||||
|
id="editRowBtn{{p.CourseID}}" value="Modify"
|
||||||
|
ng-click="setEditId(p.CourseID);">
|
||||||
|
|
||||||
|
</td>
|
||||||
</tr>
|
</tr>
|
||||||
<tr ng-show="editId === p.BranchCode" ng-if="editId === p.BranchCode" style="width: ">
|
<tr ng-show="editId === p.CourseID" ng-if="editId === p.CourseID" style="width: ">
|
||||||
<td colspan="6" ng-include
|
<td colspan="6" ng-include
|
||||||
src="'assets/views/editBranchDetails.html'"></td>
|
src="'assets/views/editCourseDetails.html'"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</tbody>
|
</tbody>
|
||||||
|
|
||||||
@ -125,139 +109,66 @@
|
|||||||
|
|
||||||
<tab heading="Add Course" id="addcourse">
|
<tab heading="Add Course" id="addcourse">
|
||||||
<div>
|
<div>
|
||||||
<form name="Form" id="form" novalidate ng-submit="branchForm.submit(Form, myModel, 'zoom-in')" method="post">
|
<form name="Form" id="form" novalidate ng-submit="courseForm.submit(Form, myModel, 'zoom-in')" method="post">
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
|
||||||
<div class="col-md-12">
|
<div class="col-md-12">
|
||||||
<fieldset>
|
<fieldset>
|
||||||
<legend>
|
<legend>
|
||||||
Add New Branch Details
|
Add New Course Details
|
||||||
</legend>
|
</legend>
|
||||||
|
|
||||||
<div class="row">
|
<div class="row">
|
||||||
<div class="col-md-4 form-group"
|
<div class="col-md-3 form-group"
|
||||||
ng-class="{'has-error':Form.branchcode.$dirty && Form.branchcode.$invalid, 'has-success':Form.branchcode.$valid}">
|
ng-class="{'has-error':Form.coursecode.$dirty && Form.coursecode.$invalid, 'has-success':Form.coursecode.$valid}">
|
||||||
<label>
|
<label>
|
||||||
Branch Code <span class="symbol required"></span>
|
Course ID <span class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
|
|
||||||
<input type="text" placeholder="Enter Branch Code"
|
<input type="text" placeholder="Enter Course ID"
|
||||||
tabindex="1" class="form-control" name="branchcode"
|
tabindex="1" class="form-control" name="coursecode"
|
||||||
ng-model="myModel.branchCode" ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
ng-model="myModel.courseCode" ng-pattern="/^[a-zA-Z0-9\s]*$/" required/>
|
||||||
<span class="error text-small block"
|
<span class="error text-small block"
|
||||||
ng-if="Form.branchcode.$dirty && Form.branchcode.$error.required">Branch Code required</span>
|
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.required">Course id is required</span>
|
||||||
<span class="error text-small block"
|
<span class="error text-small block"
|
||||||
ng-if="Form.branchcode.$dirty && Form.branchcode.$error.pattern">Invalid Branch Code </span>
|
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.pattern">Invalid course id </span>
|
||||||
|
|
||||||
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
<div class="col-md-3 form-group"
|
||||||
|
ng-class="{'has-error':Form.coursename.$dirty && Form.coursename.$invalid, 'has-success':Form.coursename.$valid}">
|
||||||
|
<label>
|
||||||
|
Course Name <span class="symbol required"></span>
|
||||||
|
</label>
|
||||||
|
|
||||||
|
<input type="text" placeholder="Enter Course Name"
|
||||||
|
tabindex="2" class="form-control" name="coursename"
|
||||||
|
ng-model="myModel.courseName" ng-pattern="/^[a-zA-Z-./\s]*$/" required/>
|
||||||
|
<span class="error text-small block"
|
||||||
|
ng-if="Form.coursename.$dirty && Form.coursename.$error.required">Course name is required</span>
|
||||||
|
<span class="error text-small block"
|
||||||
|
ng-if="Form.coursename.$dirty && Form.coursename.$error.pattern">Invalid course name </span>
|
||||||
<!--<span class="success text-small"-->
|
<!--<span class="success text-small"-->
|
||||||
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
<div class="col-md-3 form-group"
|
||||||
<div class="col-md-4 form-group"
|
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
|
||||||
ng-class="{'has-error':Form.branchname.$dirty && Form.branchname.$invalid, 'has-success':Form.branchname.$valid}">
|
|
||||||
<label>
|
<label>
|
||||||
Branch Name <span class="symbol required"></span>
|
University <span class="symbol required"></span>
|
||||||
</label>
|
</label>
|
||||||
|
<select class="form-control" name="university" tabindex="3" id="university"
|
||||||
<input type="text" placeholder="Enter Branch Name"
|
ng-model="myModel.universityName"
|
||||||
tabindex="2" class="form-control" name="branchname"
|
ng-options="details.UniversityID as details.UniversityName for details in university"
|
||||||
ng-model="myModel.branchName" ng-pattern="/^[a-zA-Z0-9.\s]*$/" required/>
|
required>
|
||||||
|
<option value=""> Select University</option>
|
||||||
|
</select>
|
||||||
<span class="error text-small block"
|
<span class="error text-small block"
|
||||||
ng-if="Form.branchname.$dirty && Form.branchname.$error.required">Branch Name required</span>
|
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
|
||||||
<span class="error text-small block"
|
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
|
||||||
ng-if="Form.branchname.$dirty && Form.branchname.$error.pattern">Invalid Branch Name </span>
|
|
||||||
<!--<span class="success text-small"-->
|
|
||||||
<!--ng-if="Form.stopname.$valid">Thank You!</span>-->
|
|
||||||
</div>
|
</div>
|
||||||
|
<div class="col-md-3">
|
||||||
<div class=" col-md-4 form-group"
|
|
||||||
ng-class="{'has-error':Form.Email.$dirty && Form.Email.$invalid, 'has-success':Form.Email.$valid}">
|
|
||||||
<label>
|
|
||||||
Email ID <span class="symbol required"></span>
|
|
||||||
</label>
|
|
||||||
<input type="email" tabindex="3"
|
|
||||||
placeholder="Enter Email ID"
|
|
||||||
class="form-control"
|
|
||||||
name="Email"
|
|
||||||
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.email" required>
|
|
||||||
<span class="error text-small block"
|
|
||||||
ng-if="Form.Email.$dirty && Form.primaryEmail.$invalid"
|
|
||||||
ng-hide="Form.Email.$error.email">Email is required.</span>
|
|
||||||
<span class="error text-small block"
|
|
||||||
ng-if="Form.Email.$error.email">Please, enter a valid email address.</span>
|
|
||||||
<!--<span style="color:#000" class="success text-small"
|
|
||||||
ng-if="Form.primaryEmail.$valid">It's a valid e-mail!</span>-->
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<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="4"
|
|
||||||
placeholder="Enter Mobile Number"
|
|
||||||
class="form-control"
|
|
||||||
ng-model="myModel.primaryPhone"
|
|
||||||
ng-minlength="10" ng-maxlength="12"
|
|
||||||
ng-pattern="/^[0-9]*$/" 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">Primary phone 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>
|
|
||||||
<!-- <span class="success text-small"
|
|
||||||
ng-if="Form.primaryPhone.$valid">Thank You!</span>-->
|
|
||||||
</div>
|
|
||||||
|
|
||||||
<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
|
|
||||||
</label>
|
|
||||||
<input type="text" name="secondaryPhone" tabindex="5"
|
|
||||||
placeholder="Enter Alternate Mobile Number"
|
|
||||||
class="form-control"
|
|
||||||
ng-model="myModel.secondaryPhone"
|
|
||||||
ng-minlength="10" ng-maxlength="12"
|
|
||||||
ng-pattern="/^[0-9]*$/"/>
|
|
||||||
<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 class="col-md-4 form-group"
|
|
||||||
ng-class="{'has-error':Form.Landline.$dirty && Form.Landline.$invalid, 'has-success':Form.Landline.$valid}">
|
|
||||||
<label class="control-label">
|
|
||||||
Landline Number
|
|
||||||
</label>
|
|
||||||
<input type="text" name="Landline" tabindex="6"
|
|
||||||
placeholder="Enter Landline Number"
|
|
||||||
class="form-control"
|
|
||||||
ng-model="myModel.landLine"
|
|
||||||
ng-minlength="11" ng-maxlength="13"
|
|
||||||
ng-pattern="/^[0-9-]*$/"/>
|
|
||||||
<span class="error text-small block"
|
|
||||||
ng-if="Form.Landline.$error.maxlength || Form.Landline.$error.minlength || Form.Landline.$error.pattern">Enter a Valid Number</span>
|
|
||||||
</div>
|
|
||||||
</div>
|
|
||||||
<div class="row">
|
|
||||||
|
|
||||||
<div class="col-md-4 form-group"
|
|
||||||
ng-class="{'has-error':Form.address.$dirty && Form.address.$invalid, 'has-success':Form.address.$valid}">
|
|
||||||
<label>
|
|
||||||
Address<span class="symbol required"></span>
|
|
||||||
</label>
|
|
||||||
<textarea placeholder="Enter Address" tabindex="7"
|
|
||||||
class="form-control textdsc" name="address"
|
|
||||||
ng-model="myModel.address" required></textarea>
|
|
||||||
<span class="error text-small block"
|
|
||||||
ng-if="Form.address.$dirty && Form.address.$invalid">Address is required</span>
|
|
||||||
<!--<span class="success text-small"-->
|
|
||||||
<!--ng-if="Form.address.$valid">Thank You!</span>-->
|
|
||||||
</div>
|
|
||||||
<div class="col-md-4">
|
|
||||||
<label>
|
<label>
|
||||||
Active/De-Active
|
Active/De-Active
|
||||||
</label>
|
</label>
|
||||||
@ -279,7 +190,6 @@
|
|||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user