UNPKG

unserver-unify

Version:

117 lines (116 loc) 5.17 kB
<div ng-controller="TargetSurveyDetailCtrl as ctrl"> <div class="news-v3 bg-color-white "> <div class="news-v3-in survey_container"> <h3> {{ ctrl.item.name }} : {{ctrl.reason.courseName}} &nbsp; {{ctrl.reason.teacherName}} </h3> <p style="font-size: 18px; border-bottom: solid 3px #72c02c; padding-bottom: 10px;"> {{ ctrl.item.description }} </p> <div ng-repeat="section in ctrl.item.sections"> <div class="headline"> <h4> {{section.title}} <span ng-if="section.teacher">{{section.teacher.fullname}}</span> </h4> </div> <div ng-repeat="id in section.lqids"> <div> <div class="tag-box tag-box-v2 adjust" style="color:{{ctrl.errorFlag&&!ctrl.lqinfo[id].selection&&ctrl.lqinfo[id].type!='multiple' ? 'red':'#2196F3'}};"> <div class="pull-left"> <b> Q{{ $index +1 }}.&nbsp; </b> </div> <div ng-bind-html="ctrl.lqinfo[id].content"> </div> </div> </div> <!-- SCQ --> <table class="margin-bottom-20 survey_ans" ng-if="!ctrl.lqinfo[id].type||ctrl.lqinfo[id].type=='single'"> <!-- radio SCQ--> <tr ng-repeat="opt in ctrl.lqinfo[id].options"> <td align="center" width="30"> {{ numToLetters($index ) }}. </td> <td for="opt{{ $index }}"> <input id="opt{{ $index }}" ng-model="ctrl.lqinfo[id].selection" type="radio" value="{{ opt.text }}"/> {{ opt.text }} </td> </tr> <tr> <td translate=""> Other </td> <td> <input id="optother" ng-model="ctrl.lqinfo[id].selection" type="text" placeholder="Other"/> </td> </tr> </table> <!-- MCQ --> <table ng-if="ctrl.lqinfo[id].type=='multiple'"> <!-- checkbox MCQ--> <tr ng-repeat="opt in ctrl.lqinfo[id].options"> <td align="center" width="30"> {{ numToLetters($index ) }}. </td> <td for="opt{{ $index }}"> <input ng-model="opt.selection" type="checkbox" value="{{ opt.text }}"/> {{ opt.text }} </td> </tr> </table> <!-- FILL --> <div class="col-md-6" ng-if="ctrl.lqinfo[id].type=='fill'"> <input class="form-control" ng-model="ctrl.lqinfo[id].selection" style="margin-top:15px;" type="text"/> </div> <div ng-if="ctrl.lqinfo[id].type=='rating'" class="survey_rating"> <span max="5" ng-model="ctrl.lqinfo[id].selection" class="color-blue" uib-rating=""> </span> {{ctrl.lqinfo[id].selection}} <span ng-if="!ctrl.lqinfo[id].selection"> &nbsp;&nbsp;&nbsp;&nbsp;{{'Please Rate it' | translate }} ! </span> <span class="survey_legend two_step"> <span class="color-red" style="margin-left: -5px;">1: {{'Below Expectation' | translate}}</span>&nbsp;&nbsp;<span class="color-green" style="margin-left: 165px;">5: {{'Above Expectation' | translate}}</span> </span> </div> <div ng-if="ctrl.lqinfo[id].type=='custRating'" class="survey_rating"> <span max="5" ng-model="ctrl.lqinfo[id].selection" class="color-blue" uib-rating=""> </span> {{ ctrl.lqinfo[id].options[ctrl.lqinfo[id].selection-1].text }} <span ng-if="!ctrl.lqinfo[id].selection"> &nbsp;&nbsp;&nbsp;&nbsp;{{'Please Rate it' | translate }} ! </span> <span class="survey_legend"> <span ng-repeat="opt in ctrl.lqinfo[id].options"> {{ ($index+1)+':'+opt.text}} </span>&nbsp;&nbsp; </span> </div> <div class="col-md-6" ng-if="ctrl.lqinfo[id].type=='number'"> <input class="form-control" ng-model="ctrl.lqinfo[id].selection" style="margin-top:15px;" type="number"/> </div> <div class="clearfix margin-bottom-20"> </div> </div> <div class="clearfix"> </div> </div> <div ng-if="docAvailable"> <input ng-model="ctrl.agree" type="checkbox"/> I agree with <a class="cursor-pointer" ng-click="readTerms(ctrl.item.questions)"> Terms and conditions </a> </div> <div class="clearfix margin-bottom-20"> </div> <button class="btn btn-u" ng-click="ctrl.submit()" ng-disabled="!ctrl.agree && docAvailable" style="padding:5px 20px" translate=""> Submit </button> <button class="btn btn-u" ng-click="ctrl.showresult()" ng-if="ctrl.item.public && ctrl.item.result " style="padding:5px 20px" translate=""> Result </button> <div class="clearfix"> </div> </div> </div> </div>