apollodec/Apollo/assets/views/courseDetails.html
venbatechnologies@gmail.com 2a0a85e797 sem set for regular
2018-11-03 18:11:01 +05:30

557 lines
36 KiB
HTML
Executable File

<style>
b.fa {
display: inline-block;
border-radius: 60px;
box-shadow: 0px 0px 2px #007AFF;
padding: 0.5em 0.6em;
}
</style>
<!-- start: PAGE TITLE -->
<section id="page-title">
<div class="row">
<div class="col-sm-8">
<h1 class="mainTitle" translate="Course ">{{ mainTitle }}</h1>
<span class="mainDescription">Add/View Course Details. </span>
</div>
<!-- <div ncy-breadcrumb></div>-->
</div>
</section>
<!-- end: PAGE TITLE -->
<!-- start: LIST GROUP -->
<div class="container-fluid container-fullw bg-white">
<div class="row" ng-controller="courseCtrl" data-ng-init="init();initHead()">
<tabset class="tabbable">
<tab heading="View Course" id="viewcourse">
<div class="container-fluid container-fullw">
<div class="row">
<div ng-if="loader == ''" class="col-md-12" align="center">
<!--<img src="assets/images/ajax_loader_blue.gif" style="width: 5%; height: 30%">-->
<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 && loader != ''" style="min-height: 281px;">
<p style="color: red;" align="center"><strong><h3 class="text-center">oops! 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">
<fieldset>
<table class="table table-hover">
<thead>
<tr>
<th ng-click="sort('CourseID')">Course ID
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseID'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('CourseName')">Course Name
<span class="glyphicon sort-icon" ng-show="sortKey=='CourseName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th ng-click="sort('UniversityName')">University
<span class="glyphicon sort-icon" ng-show="sortKey=='UniversityName'" ng-class="{'glyphicon-chevron-up':reverse,'glyphicon-chevron-down':!reverse}"></span>
</th>
<th>Status</th>
<th></th>
</tr>
</thead>
<tbody dir-paginate="p in data|orderBy:sortKey:reverse|filter:search:strict|itemsPerPage:10">
<tr>
<td>{{p.CourseCode}}</td>
<td>{{p.CourseName}}</td>
<td>{{p.UniversityName}}</td>
<td><span ng-if="p.IsActive == 1"> Active </span><span ng-if="p.IsActive == 0">In-Active</span></td>
<td>
<a class="text-azure" id="editRowBtn{{p.CourseID}}" ng-click="setEditId(p.CourseID,p);"><b class="fa fa-hover fa-pencil " aria-hidden="true"></b>
</a>
</td>
</tr>
<tr ng-show="editId === p.CourseID" ng-if="editId === p.CourseID">
<td colspan="12" ng-include
src="'assets/views/editCourseDetails.html'"></td>
</tr>
</tbody>
</table>
<dir-pagination-controls max-size="10" direction-links="true" boundary-links="true">
</dir-pagination-controls>
</fieldset>
</div>
</div>
</div>
</div>
<!--
view tab end
-->
</tab>
<script>
$('#addcourse').click(function () {
$('#course').focus();
});
</script>
<tab heading="Add Course" id="addcourse">
<div>
<form name="Form" id="form" novalidate ng-submit="courseForm.submit(Form, myModel,MyModelsem,myModelRegular,myModelLateral,myModelSemYear, 'zoom-in',addMoreItems)" method="post">
<div class="row">
<div class="col-md-12">
<fieldset>
<legend>
Add New Course Details
</legend>
<div class="row">
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.university.$dirty && Form.university.$invalid, 'has-success':Form.university.$valid}">
<label>
University <span class="symbol required"></span>
</label>
<select class="form-control" name="university" tabindex="1" id="university"
ng-model="myModel.universityName"
ng-options="details.UniversityID as details.UniversityName for details in university"
required>
<option value=""> Select University</option>
</select>
<span class="error text-small block"
ng-if="Form.university.$dirty && Form.university.$invalid">University is required</span>
<!--<span class="success text-small" ng-if="Form.university.$valid">Thank You!</span>-->
</div>
<div class="col-md-3 form-group"
ng-class="{'has-error':Form.coursecode.$dirty && Form.coursecode.$invalid, 'has-success':Form.coursecode.$valid}">
<label>
Course ID <span class="symbol required"></span>
</label>
<input type="text" placeholder="Enter Course ID"
tabindex="2" class="form-control" name="coursecode" ng-maxlength="20"
ng-model="myModel.courseCode" ng-pattern="/^[a-zA-Z0-9-]*$/" required/>
<span class="error text-small block"
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.required">Course id is required</span>
<span class="error text-small block"
ng-if="Form.coursecode.$dirty && Form.coursecode.$error.pattern || Form.coursecode.$error.maxlength ">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="3" 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"-->
<!--ng-if="Form.coursename.$valid">Thank You!</span>-->
</div>
<!--<div class="col-md-3 form-group"
ng-class="{'has-error':Form.fees.$dirty && Form.fees.$invalid, 'has-success':Form.fees.$valid}">
<label>
Fees <span class="symbol required"></span>
</label>
<select class="form-control" name="fees" tabindex="4" id="fees"
ng-model="myModel.ListName"
ng-options="feesList.ListName for feesList in feesDetails" ng-change="getFeesProgram();"
required>
&lt;!&ndash; <option value=""> Select Fees</option>&ndash;&gt;
</select>
<span class="error text-small block"
ng-if="Form.fees.$dirty && Form.fees.$invalid">Fees is required</span>
&lt;!&ndash;<span class="success text-small" ng-if="Form.fees.$valid">Thank You!</span>&ndash;&gt;
</div>-->
<div class="col-md-3">
<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-6 form-group"
ng-class="{'has-error':Form.specilization1.$dirty && Form.specilization1.$invalid}">
<label>
Specilization 1
</label>
<input type="text" placeholder="Enter Specilization 1"
tabindex="4" class="form-control" name="specilization1"
ng-model="myModel.specilization1" ng-pattern="/^[a-zA-Z0-9-./\s]*$/"/>
<!--<span class="error text-small block"
ng-if="Form.specilization1.$dirty && Form.specilization1.$error.required">Specilization 1 is required</span>-->
<span class="error text-small block"
ng-if="Form.specilization1.$dirty && Form.specilization1.$error.pattern">Invalid Specilization 1 </span>
<!--<span class="success text-small"-->
<!--ng-if="Form.specilization1.$valid">Thank You!</span>-->
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.specilization2.$dirty && Form.specilization2.$invalid}">
<label>
Specilization 2
</label>
<input type="text" placeholder="Enter Specilization 2"
tabindex="5" class="form-control" name="specilization2"
ng-model="myModel.specilization2" ng-pattern="/^[a-zA-Z0-9-./\s]*$/"/>
<!--<span class="error text-small block"
ng-if="Form.specilization1.$dirty && Form.specilization1.$error.required">Specilization 1 is required</span>-->
<span class="error text-small block"
ng-if="Form.specilization2.$dirty && Form.specilization2.$error.pattern">Invalid Specilization 2 </span>
<!--<span class="success text-small"-->
<!--ng-if="Form.specilization1.$valid">Thank You!</span>-->
</div>
</div>
<!-- hide subject details start
<div class="row">
<div class="col-md-12 form-group">
<label>
Subjects
</label>
<ui-select multiple ng-model="myModel.subject" tabindex="6">
<ui-select-match placeholder="Select Subject">
{{$item.SubjectName}}
</ui-select-match>
<ui-select-choices
repeat="sub in subjectDetails | filter:$select.search">
{{sub.SubjectName}}
</ui-select-choices>
</ui-select>
<input class="ng-hide" type="text" name="subject"
ng-model="myModel.subject"
>
&lt;!&ndash;<span class="error text-small block"
ng-if="Form.subject.$dirty && Form.subject.$error.required && myModel.subject.length==0">Subject is required.</span>&ndash;&gt;
&lt;!&ndash;<span class="success text-small block"&ndash;&gt;
</div>
</div>
hide subject details end-->
<div class="row">
<div class="col-md-6">
<div class="row">
<div class="col-md-12">
<fieldset> <legend> {{myModelRegular.FeesName}} </legend>
<div class="row">
<div class="col-md-6 form-group" ng-class="{'has-error':Form.regularFees.$dirty && Form.regularFees.$invalid}">
<label>
{{myModelRegular.programName}} Fees
</label>
<input type="text" placeholder="Enter Regular Fees Amt"
autofocus tabindex="7" class="form-control" name="regularFees" id="regularFees" ng-maxlength="8"
ng-model="myModelRegular.FeesAmount" ng-disabled="myModelLateral.FeesAmount!='' || myModelSemYear.programName!='' || myModelSemYear.FeesAmount!='' || addMoreItems.length!=0" ng-pattern="/^[0-9]*$/"/>
<span class="error text-small block"
ng-if="Form.regularFees.$error.maxlength || Form.regularFees.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.lateralFees.$dirty && Form.lateralFees.$invalid}">
<label>
{{myModelLateral.programName}} Fees
</label>
<input type="text" placeholder="Enter Lateral Fees Amt"
autofocus tabindex="8" class="form-control" name="lateralFees" id="lateralFees" ng-maxlength="8"
ng-model="myModelLateral.FeesAmount" ng-disabled="myModelRegular.FeesAmount!='' || myModelSemYear.programName!='' || myModelSemYear.FeesAmount!='' || addMoreItems.length!=0" ng-pattern="/^[0-9]*$/"/>
<span class="error text-small block"
ng-if="Form.lateralFees.$error.maxlength || Form.lateralFees.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':Form.numberofsem.$dirty && Form.numberofsem.$invalid}">
<label>Number of Semesters</label>
<input type="text" placeholder="Enter Number of Semesters"
autofocus tabindex="8" class="form-control" name="numberofsem" id="numberofsem" ng-maxlength="8"
ng-model="MyModelsem.numberofsem" ng-pattern="/^[0-9]*$/"
ng-disabled="myModelSemYear.programName!='' || myModelSemYear.FeesAmount!='' || addMoreItems.length!=0" />
<span class="error text-small block"
ng-if="Form.numberofsem.$dirty && Form.numberofsem.$error.maxlength || Form.numberofsem.$error.pattern">Enter a valid number</span>
</div>
</div>
</fieldset>
</div>
</div>
<div class="row">
<div class="col-md-12">
<fieldset>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.provFess.$dirty && Form.provFess.$invalid}">
<label>
Prov Cert Fees
</label>
<input type="text" placeholder="Enter Prov Cert Fees"
autofocus tabindex="11" class="form-control" name="provFess" id="provFess" ng-maxlength="8"
ng-model="myModel.provFess" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.provFess.$error.maxlength || Form.provFess.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.transferAmount.$dirty && Form.transferAmount.$invalid}">
<label>
Transfer Cert Fees
</label>
<input type="text" placeholder="Enter transfer Cert Fees"
autofocus tabindex="12" class="form-control" name="transferAmount" id="transferAmount" ng-maxlength="8"
ng-model="myModel.transferAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.transferAmount.$error.maxlength || Form.transferAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.degreeAmount.$dirty && Form.degreeAmount.$invalid}">
<label>
Degree Cert Fees
</label>
<input type="text" placeholder="Enter Degree Cert Fees"
autofocus tabindex="13" class="form-control" name="degreeAmount" id="degreeAmount" ng-maxlength="8"
ng-model="myModel.degreeAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.degreeAmount.$error.maxlength || Form.degreeAmount.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.migrationAmount.$dirty && Form.migrationAmount.$invalid}">
<label>
Migration Cert Fees
</label>
<input type="text" placeholder="Enter Migration Cert Fees"
autofocus tabindex="14" class="form-control" name="migrationAmount" id="migrationAmount" ng-maxlength="8"
ng-model="myModel.migrationAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.migrationAmount.$error.maxlength || Form.migrationAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
<div class="row">
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.otherAmount.$dirty && Form.otherAmount.$invalid}">
<label>
Other Fees
</label>
<input type="text" placeholder="Enter Other Fees"
autofocus tabindex="15" class="form-control" name="otherAmount" id="otherAmount" ng-maxlength="8"
ng-model="myModel.otherAmount" ng-pattern="/^[0-9]*$/">
<span class="error text-small block"
ng-if="Form.otherAmount.$error.maxlength || Form.otherAmount.$error.pattern">Enter a valid amount</span>
</div>
</div>
</fieldset>
</div>
</div>
</div>
<div class="col-md-6">
<div class="col-md-12">
<fieldset>
<legend>{{myModelSemYear.FeesName}}</legend>
<div class="panel-body" >
<!--<div class="panel-scroll height-400" perfect-scrollbar wheel-propagation="false" suppress-scroll-x="true">-->
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.sem_year.$dirty && Form.sem_year.$invalid}">
<label>
Sem/Year
</label>
<input type="text" placeholder="Enter Sem/year"
tabindex="9" class="form-control" name="sem_year"
ng-model="myModelSemYear.programName" ng-disabled="myModelLateral.FeesAmount!='' || myModelRegular.FeesAmount!=''" ng-pattern="/^[a-zA-Z0-9-./\s]*$/"/>
<!--<span class="error text-small block"
ng-if="Form.sem_year.$dirty && Form.sem_year.$error.required">Sem/Year is required</span>-->
<span class="error text-small block"
ng-if="Form.sem_year.$dirty && Form.sem_year.$error.pattern">Invalid Sem/Year name </span>
</div>
<div class="col-md-6 form-group"
ng-class="{'has-error':Form.feesAmount.$dirty && Form.feesAmount.$invalid}">
<label>
Fees
</label>
<input type="text" placeholder="Enter Fees Amount"
autofocus tabindex="10" class="form-control" name="feesAmount" id="feesAmount" ng-maxlength="8"
ng-model="myModelSemYear.FeesAmount" ng-disabled="myModelLateral.FeesAmount!='' || myModelRegular.FeesAmount!=''" ng-pattern="/^[0-9]*$/"/>
<!--<span class="error text-small block"
ng-if="Form.feesAmount.$dirty && Form.feesAmount.$invalid"
ng-hide="Form.feesAmount.$error.maxlength || Form.feesAmount.$error.pattern">Fees amount is required</span>-->
<span class="error text-small block"
ng-if="Form.feesAmount.$error.maxlength || Form.feesAmount.$error.pattern">Enter a valid amount</span>
</div>
<div class="col-md-12">
<div class="pull-right">
<input type="button" class="btn btn-sm btn-info" title="Click to add one more fees items" value="Add More" ng-disabled="myModelLateral.FeesAmount!='' || myModelRegular.FeesAmount!=''" ng-click="addMoreFeesItems(myModelSemYear,Form);"/>
</div>
</div>
<div class="row" ng-repeat="n in addMoreItems">
<div class="col-md-6 form-group" ng-class="{'has-error':n.programName==undefined, 'has-success':n.programName!=undefined}">
<label>
</label>
<input type="text" placeholder="Enter Sem/year"
class="form-control" name="sem_year{{$index}}"
ng-model="n.programName" ng-pattern="/^[a-zA-Z0-9-./\s]*$/" required/>
<span class="error text-small block" ng-if="n.programName==undefined">Enter a valid name</span>
</div>
<div class="col-md-6 form-group" ng-class="{'has-error':n.FeesAmount==undefined, 'has-success':n.FeesAmount!=undefined}">
<label>
</label>
<input type="text" placeholder="Enter Fees Amount"
autofocus class="form-control" name="feesAmount{{$index}}" id="feesAmount{{$index}}" ng-maxlength="8"
ng-model="n.FeesAmount" ng-pattern="/^[0-9]*$/" required/>
<span class="error text-small block" ng-if="n.FeesAmount==undefined">Enter a valid amount</span>
</div>
</div>
<!--</div>-->
</div>
</fieldset>
</div>
</div>
</div>
<div class="col-md-12">
<div class="pull-right">
<button type="submit" ladda="ldloading1.zoom_in" tabindex="16" class="btn btn-wide btn-success" data-style="zoom-in">
Add
</button>
<!-- <button type="submit" class="btn btn-success btn-o" tabindex="8">
Submit
</button>-->
<button type="reset" class="btn btn-warning btn-wide" tabindex="17" ng-click="courseForm.reset(Form);"
ng-click="branchForm.reset(Form)">
Reset
</button>
</div>
</div>
</fieldset>
</div>
</div>
</form>
</div>
</tab>
</tabset>
</div>
</div>
<!-- end: LIST GROUP -->