client-ui
Version:
Testing implementation of nodeJs Backend, angular frontend, and hopefully in a way that this can be deployed to s3/cloudfront
82 lines • 4.67 kB
HTML
<div ng-init="_ctrl = knowledgeAssessmentController; _ctrl.getQuizQuestions()">
<div class="col-sm-10 col-sm-offset-1">
<div class="row" ng-if="_ctrl.KBAsAccepted">
<h3 class="text-center no-space">Identity Verification</h3>
<h6 class="kba-form-heading">Your answers have already been saved.</h6>
</div>
<div class="row" ng-if="!_ctrl.KBAsAccepted">
<h3 class="text-center no-space">Identity Verification</h3>
<div class="text-center" ng-show="_ctrl.showSpinner">
<br>
<i class="fa fa-spinner fa-pulse fa-5x"></i>
<br>
</div>
<div ng-show="!_ctrl.showSpinner">
<div ng-if="_ctrl.quizzes <= 1">
<h6 class="kba-form-heading">In order to verify your identity, we'd like to ask you a few questions. Please note that fake questions may be asked as part of our identity verification process.</h6>
</div>
<div ng-if="_ctrl.quizzes > 1">
<div class="alert alert-info">
Thank you. We have a few more questions we would like to ask you.
</div>
</div>
<div ng-if="_ctrl.quizObj === false">
<h5>Please wait</h5>
<br>
<div class="text-center">
<i class="fa fa-spinner fa-pulse fa-4x"></i>
</div>
</div>
<div ng-if="_ctrl.quizObj !== false">
<form name="_ctrl.kbaform"
xt-form
role="form"
focus-error="true"
ng-submit="_ctrl.formSubmit()"
novalidate>
<div ng-repeat="question in _ctrl.quizObj.Quiz.Question">
<div class="row">
<div class="form-group"
ng-init="questionId = 'question_' + question.attributes.questionId"
ng-class="{'has-error': accountCreationController.acform[questionId].$invalid && accountCreationController.acform[questionId].$submitted}">
<br>
<p
class="col-sm-12 control-label"
for="{{questionId}}"
ng-bind="($index+1)+'.\t'+question.QuestionText"></p>
<br>
<div class="col-sm-12">
<select type="text"
ng-model="question.userAnswer"
class="form-control"
id="{{QuestionText}}"
name="{{QuestionText}}"
required
xt-validation-tooltip
msg-required="All questions are required"
ng-options="answer['$value'] for answer in question.AnswerChoice track by answer.attributes.answerId"
ng-init="">
<option value="">Please select an answer</option>
</select>
</div>
</div>
</div>
</div>
<div class="alert alert-danger" ng-show="_ctrl.errorMessage">
<strong ng-bind="_ctrl.errorMessage"></strong>
</div>
<div class="form-group text-center">
<br>
<button type="submit"
ng-click="_ctrl.submitQuizForm()"
ng-disabled="_ctrl.kbaform.$invalid"
id="submit"
class="btn btn-success large-btn large-block-btn"
ladda="_ctrl.working" data-style="expand-left">Continue</button>
</div>
</form>
</div>
</div>
</div>
</div>
</div>